Skip to content

Commit

Permalink
Merge branch 'main' into d/2022-01-24-version-type-support
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jan 27, 2022
2 parents 69e47bb + b8b7edf commit a5790d6
Show file tree
Hide file tree
Showing 390 changed files with 6,855 additions and 2,940 deletions.
7 changes: 7 additions & 0 deletions .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,10 @@ steps:
queue: c2-4
key: storybooks
timeout_in_minutes: 60

- command: .buildkite/scripts/steps/webpack_bundle_analyzer/build_and_upload.sh
label: 'Build Webpack Bundle Analyzer reports'
agents:
queue: n2-2
key: webpack_bundle_analyzer
timeout_in_minutes: 60
2 changes: 1 addition & 1 deletion .buildkite/pull_requests.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))",
"always_trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))",
"skip_ci_labels": ["skip-ci", "jenkins-ci"],
"skip_target_branches": ["6.8"]
"skip_target_branches": ["6.8", "7.11", "7.12"]
}
]
}
9 changes: 0 additions & 9 deletions .buildkite/scripts/common/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,3 @@ fi

export BUILD_TS_REFS_DISABLE=true
export DISABLE_BOOTSTRAP_VALIDATION=true

export TEST_KIBANA_HOST=localhost
export TEST_KIBANA_PORT=6101
export TEST_KIBANA_URL="http://elastic:changeme@localhost:6101"
export TEST_ES_URL="http://elastic:changeme@localhost:6102"
export TEST_ES_TRANSPORT_PORT=6301-6309
export TEST_CORS_SERVER_PORT=6106
export ALERTING_PROXY_PORT=6105
export TEST_PROXY_SERVER_PORT=6107
9 changes: 9 additions & 0 deletions .buildkite/scripts/lifecycle/pre_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ export SYNTHETICS_SERVICE_PASSWORD
SYNTHETICS_SERVICE_MANIFEST="$(retry 5 5 vault read -field=manifest secret/kibana-issues/dev/kibana-ci-synthetics-credentials)"
export SYNTHETICS_SERVICE_MANIFEST

SYNTHETICS_REMOTE_KIBANA_USERNAME="$(retry 5 5 vault read -field=username secret/kibana-issues/dev/kibana-ci-synthetics-remote-credentials)"
export SYNTHETICS_REMOTE_KIBANA_USERNAME

SYNTHETICS_REMOTE_KIBANA_PASSWORD="$(retry 5 5 vault read -field=password secret/kibana-issues/dev/kibana-ci-synthetics-remote-credentials)"
export SYNTHETICS_REMOTE_KIBANA_PASSWORD

SYNTHETICS_REMOTE_KIBANA_URL="$(retry 5 5 vault read -field=url secret/kibana-issues/dev/kibana-ci-synthetics-remote-credentials)"
export SYNTHETICS_REMOTE_KIBANA_URL

# Setup Failed Test Reporter Elasticsearch credentials
{
TEST_FAILURES_ES_CLOUD_ID=$(retry 5 5 vault read -field=cloud_id secret/kibana-issues/dev/failed_tests_reporter_es)
Expand Down
17 changes: 17 additions & 0 deletions .buildkite/scripts/steps/functional/synthetics.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/common/util.sh

.buildkite/scripts/bootstrap.sh
.buildkite/scripts/download_build_artifacts.sh

export JOB=kibana-uptime-playwright

echo "--- Uptime @elastic/synthetics Tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "Uptime @elastic/synthetics Tests" \
node plugins/uptime/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" --grep "MonitorManagement*"
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -euo pipefail

.buildkite/scripts/bootstrap.sh

node scripts/build_kibana_platform_plugins.js --dist --profile

mkdir -p built_assets/webpack_bundle_analyzer
find . -path "*target/public/*" -name "stats.json" | while read line; do
PLUGIN=$(echo $line | xargs dirname | xargs dirname | xargs dirname | xargs basename)
./node_modules/.bin/webpack-bundle-analyzer $line --report "built_assets/webpack_bundle_analyzer/$PLUGIN.html" --mode static --no-open
done

node .buildkite/scripts/steps/webpack_bundle_analyzer/upload.js
79 changes: 79 additions & 0 deletions .buildkite/scripts/steps/webpack_bundle_analyzer/upload.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

const execSync = require('child_process').execSync;
const fs = require('fs');
const path = require('path');

const GITHUB_CONTEXT = 'Build and Publish Webpack bundle analyzer reports';

const WEBPACK_REPORTS =
process.env.BUILDKITE_PULL_REQUEST && process.env.BUILDKITE_PULL_REQUEST !== 'false'
? `pr-${process.env.BUILDKITE_PULL_REQUEST}`
: process.env.BUILDKITE_BRANCH.replace('/', '__');
const WEBPACK_REPORTS_BUCKET = 'ci-artifacts.kibana.dev/webpack_bundle_analyzer';
const WEBPACK_REPORTS_BUCKET_URL = `https://${WEBPACK_REPORTS_BUCKET}/${WEBPACK_REPORTS}`;
const WEBPACK_REPORTS_BASE_URL = `${WEBPACK_REPORTS_BUCKET_URL}/${process.env.BUILDKITE_COMMIT}`;

const exec = (...args) => execSync(args.join(' '), { stdio: 'inherit' });

const ghStatus = (state, description) =>
exec(
`gh api "repos/elastic/kibana/statuses/${process.env.BUILDKITE_COMMIT}"`,
`-f state=${state}`,
`-f target_url="${process.env.BUILDKITE_BUILD_URL}"`,
`-f context="${GITHUB_CONTEXT}"`,
`-f description="${description}"`,
`--silent`
);

const upload = () => {
const originalDirectory = process.cwd();
process.chdir(path.join('.', 'built_assets', 'webpack_bundle_analyzer'));
try {
const reports = execSync(`ls -1`).toString().trim().split('\n');
const listHtml = reports
.map((report) => `<li><a href="${WEBPACK_REPORTS_BASE_URL}/${report}">${report}</a></li>`)
.join('\n');

const html = `
<html>
<body>
<h1>Webpack Bundle Analyzer</h1>
<ul>
${listHtml}
</ul>
</body>
</html>
`;

fs.writeFileSync('index.html', html);
console.log('--- Uploading Webpack Bundle Analyzer reports');
exec(`
gsutil -q -m cp -r -z html '*' 'gs://${WEBPACK_REPORTS_BUCKET}/${WEBPACK_REPORTS}/${process.env.BUILDKITE_COMMIT}/'
gsutil -h "Cache-Control:no-cache, max-age=0, no-transform" cp -z html 'index.html' 'gs://${WEBPACK_REPORTS_BUCKET}/${WEBPACK_REPORTS}/latest/'
`);

if (process.env.BUILDKITE_PULL_REQUEST && process.env.BUILDKITE_PULL_REQUEST !== 'false') {
exec(
`buildkite-agent meta-data set pr_comment:webpack_bundle_reports:head '* [Webpack Bundle Analyzer](${WEBPACK_REPORTS_BASE_URL})'`
);
}
} finally {
process.chdir(originalDirectory);
}
};

try {
ghStatus('pending', 'Building Webpack Bundle Analyzer reports');
upload();
ghStatus('success', 'Webpack bundle analyzer reports built');
} catch (error) {
ghStatus('error', 'Building Webpack Bundle Analyzer reports failed');
throw error;
}
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,13 @@ module.exports = {
'@typescript-eslint/no-duplicate-imports': ['error'],
},
},
{
files: ['x-pack/plugins/cases/public/**/*.{js,mjs,ts,tsx}'],
excludedFiles: ['x-pack/plugins/cases/**/*.{test,mock,test_helper}.{ts,tsx}'],
rules: {
'react/display-name': ['error', { ignoreTranspilerName: true }],
},
},

/**
* Lists overrides. These rules below are maintained and owned by
Expand Down
93 changes: 89 additions & 4 deletions docs/CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,101 @@

Review important information about the {kib} 8.0.0 releases.

* <<release-notes-8.0.0-rc2>>
* <<release-notes-8.0.0-rc1>>
* <<release-notes-8.0.0-beta1>>
* <<release-notes-8.0.0-alpha2>>
* <<release-notes-8.0.0-alpha1>>

--
[[release-notes-8.0.0-rc2]]
== {kib} 8.0.0-rc2

coming::[8.0.0-rc2]

For information about the {kib} 8.0.0-rc2 release, review the following information.

[float]
[[breaking-changes-8.0.0-rc2]]
=== Breaking change

Breaking changes can prevent your application from optimal operation and performance.
Before you upgrade, review the breaking change, then mitigate the impact to your application.

// tag::notable-breaking-changes[]

[discrete]
[[breaking-122722]]
.Removes the ability to use `elasticsearch.username: elastic` in production
[%collapsible]
====
*Details* +
In production, you are no longer able to use the `elastic` superuser to authenticate to {es}. For more information, refer to {kibana-pull}122722[#122722].
*Impact* +
When you configure `elasticsearch.username: elastic`, {kib} fails.
====

// end::notable-breaking-changes[]

To review the breaking changes in previous versions, refer to the following:

<<breaking-changes-8.0.0-rc1,8.0.0-rc1>> | <<breaking-changes-8.0.0-beta1,8.0.0-beta1>> | <<breaking-changes-8.0.0-alpha2,8.0.0-alpha2>> |
<<breaking-changes-8.0.0-alpha1,8.0.0-alpha1>>

[float]
[[features-8.0.0-rc2]]
=== Features
{kib} 8.0.0-rc2 adds the following new and notable features.

Dashboard::
Dashboard Integration {kibana-pull}115991[#115991]
Elastic Security::
For the Elastic Security 8.0.0-rc2 release information, refer to {security-guide}/release-notes.html[_Elastic Security Solution Release Notes_].
Monitoring::
Enterprise Search Stack Monitoring {kibana-pull}114303[#114303]
Observability::
* Adds Agent Keys in APM settings - Create agent keys {kibana-pull}120373[#120373]
* Adds Agent Keys in APM settings - Agent key table {kibana-pull}119543[#119543]
* Allows users to set Download Speed, Upload Speed, and Latency for their synthetic monitors in Uptime {kibana-pull}118594[#118594]
Platform::
Changes saved objects management inspect view to a read-only JSON view of the whole saved object {kibana-pull}112034[#112034]

[[enhancements-and-bug-fixes-v8.0.0-rc2]]
=== Enhancements and bug fixes

For detailed information about the 8.0.0-rc2 release, review the enhancements and bug fixes.

[float]
[[enhancement-v8.0.0-rc2]]
==== Enhancements
Elastic Security::
For the Elastic Security 8.0.0-rc2 release information, refer to {security-guide}/release-notes.html[_Elastic Security Solution Release Notes_].
Security::
Adds session cleanup audit logging {kibana-pull}122419[#122419]
Observability::
Make a monitor's steps details page work on mobile resolutions in Uptime {kibana-pull}122171[#122171]

[float]
[[fixes-v8.0.0-rc2]]
==== Bug Fixes
Alerting::
Fixes PagerDuty timestamp validation {kibana-pull}122321[#122321]
Dashboard::
* Creates Explicit Diffing System {kibana-pull}121241[#121241]
* Fixes blank panel save and display issue {kibana-pull}120815[#120815]
* Fixes full screen error when pressing back arrow on browser {kibana-pull}118113[#118113]
Elastic Security::
For the Elastic Security 8.0.0-rc2 release information, refer to {security-guide}/release-notes.html[_Elastic Security Solution Release Notes_].
Maps::
* Fixes Point to point and Tracks layers label properties not showing in the legend {kibana-pull}122993[#122993]
* Fixes Color ramp UI for percent of a top term in join layer is broken {kibana-pull}122718[#122718]
Observability::
* Updates index pattern permission error in APM {kibana-pull}122680[#122680]
* Honor time unit for Inventory Threshold in Metrics {kibana-pull}122294[#122294]
* Adds locator to aid other plugins in linking properly to Uptime {kibana-pull}123004[#123004]
* Fixes a bug in which headers would be incorrectly centered on desktop in Uptime {kibana-pull}122643[#122643]

[[release-notes-8.0.0-rc1]]
== {kib} 8.0.0-rc1

Expand All @@ -28,8 +117,6 @@ Review the {kib} 8.0.0-rc1 changes, then use the <<upgrade-assistant,Upgrade Ass
Breaking changes can prevent your application from optimal operation and performance.
Before you upgrade, review the breaking changes, then mitigate the impact to your application.

// tag::notable-breaking-changes[]

[discrete]
[[breaking-118854]]
.Splits package policy `upgrade` endpoint for Fleet
Expand Down Expand Up @@ -110,8 +197,6 @@ For more information, refer to {kibana-pull}116821[#116821] and {kibana-pull}115
When you upgrade to 8.0.0, you are unable to use references to the deprecated fields.
====

// end::notable-breaking-changes[]

To review the breaking changes in previous versions, refer to the following:

<<breaking-changes-8.0.0-beta1,8.0.0-beta1>> | <<breaking-changes-8.0.0-alpha2,8.0.0-alpha2>> |
Expand Down
28 changes: 19 additions & 9 deletions docs/canvas/canvas-tutorial.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@ To customize your workpad to look the way you want, add your own images.
+
The default Elastic logo image appears on the page.

. To add your own image, click the Elastic logo, then drag the image file to the *Select or drag and drop an image* field.
. Add your own image.

.. Click the Elastic logo.

.. Drag the image file to the *Select or drag and drop an image* field.
+
[role="screenshot"]
image::images/canvas-image-element.png[Image showing how to add the image element]
image::images/canvas_tutorialCustomImage_7.17.0.png[The Analytics logo added to the workpad]

[float]
=== Customize your data with metrics
Expand All @@ -42,9 +46,12 @@ By default, the element is connected to the demo data, which enables you to expe

. To connect the element to your own data source, make sure that the element is selected, click *Data > Demo data > Elasticsearch SQL*.

.. In the *Query* field, enter the following:
.. In the *Query* field, enter:
+
`SELECT sum(taxless_total_price) AS sum_total_price FROM "kibana_sample_data_ecommerce"`
[source,text]
--
SELECT sum(taxless_total_price) AS sum_total_price FROM "kibana_sample_data_ecommerce"
--

.. Click *Save*.
+
Expand All @@ -54,7 +61,7 @@ The query selects the total price field and sets it to the sum_total_price field

.. Click *Display*

.. From the *Value* drop-down lists, make sure that *Unique* is selected, then select *sum_total_price*.
.. From the *Value* dropdowns, make sure *Unique* is selected, then select *sum_total_price*.

.. Change the *Label* to `Total sales`.

Expand All @@ -69,7 +76,7 @@ You're now looking at the raw data syntax that Canvas uses to display the elemen
.. Click *Run*.

[role="screenshot"]
image::images/canvas-metric-element.png[Image showing changes to the Canvas workpad]
image::images/canvas_tutorialCustomMetric_7.17.0.png[The total sales metric added to the workpad using Elasticsearch SQL]

[float]
=== Show off your data with charts
Expand All @@ -82,7 +89,10 @@ To show what your data can do, add charts, graphs, progress monitors, and more t

.. To obtain the taxless total price by date, enter the following in the *Query* field:
+
`SELECT order_date, taxless_total_price FROM "kibana_sample_data_ecommerce" ORDER BY order_date`
[source,text]
--
SELECT order_date, taxless_total_price FROM "kibana_sample_data_ecommerce" ORDER BY order_date
--

.. Click *Save*.

Expand All @@ -95,7 +105,7 @@ To show what your data can do, add charts, graphs, progress monitors, and more t
.. From the *Y-axis* drop-down lists, select *Value*, then select *taxless_total_price*.

[role="screenshot"]
image::images/canvas-chart-element.png[Image showing Canvas workpad with sample data graph]
image::images/canvas_tutorialCustomChart_7.17.0.png[Custom line chart added to the workpad using Elasticsearch SQL]

[float]
=== Show how your data changes over time
Expand All @@ -109,7 +119,7 @@ To focus your data on a specific time range, add the time filter.
. To use the date time field from the sample data, enter `order_date` in the *Column* field, then click *Set*.

[role="screenshot"]
image::images/canvas-timefilter-element.png[Image showing Canvas workpad with filtered sample data graph]
image::images/canvas_tutorialCustomTimeFilter_7.17.0.png[Custom time filter added to the workpad]

To see how the data changes, set the time filter to *Last 7 days*. As you change the time filter options, the elements automatically update.

Expand Down
Binary file removed docs/canvas/images/canvas-add-pages.gif
Binary file not shown.
Binary file removed docs/canvas/images/canvas-chart-element.png
Binary file not shown.
Binary file removed docs/canvas/images/canvas-image-element.png
Binary file not shown.
Binary file removed docs/canvas/images/canvas-metric-element.png
Binary file not shown.
Binary file removed docs/canvas/images/canvas-timefilter-element.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/management/watcher-ui/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Watches are helpful for analyzing mission-critical and business-critical
streaming data. For example, you might watch application logs for performance
outages or audit access logs for security threats.

To get started, open then main menu,
To get started, open the main menu,
then click *Stack Management > Watcher*.
With this UI, you can:

Expand Down Expand Up @@ -43,7 +43,7 @@ and either of these watcher roles:
* `watcher_admin`. You can perform all Watcher actions, including create and edit watches.
* `watcher_user`. You can view watches, but not create or edit them.

To manage roles, open then main menu, then click *Stack Management > Roles*, or use the
To manage roles, open the main menu, then click *Stack Management > Roles*, or use the
<<role-management-api, Kibana Role Management API>>. Watches are shared between
all users with the same role.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a5790d6

Please sign in to comment.