Skip to content

Commit

Permalink
Merge branch '7.x' into 7.12_Console_Autocomplete_Definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Feb 11, 2021
2 parents c2ee0a6 + 51140f1 commit e356c8c
Show file tree
Hide file tree
Showing 505 changed files with 12,019 additions and 6,471 deletions.
22 changes: 13 additions & 9 deletions .ci/Jenkinsfile_flaky
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,20 @@ kibanaPipeline(timeoutMinutes: 180) {
catchErrors {
print "Agent ${agentNumberInside} - ${agentExecutions} executions"

workers.functional('flaky-test-runner', {
if (!IS_XPACK) {
kibanaPipeline.buildOss()
if (CI_GROUP == '1') {
runbld("./test/scripts/jenkins_build_kbn_sample_panel_action.sh", "Build kbn tp sample panel action for ciGroup1")
withEnv([
'IGNORE_SHIP_CI_STATS_ERROR=true',
]) {
workers.functional('flaky-test-runner', {
if (!IS_XPACK) {
kibanaPipeline.buildOss()
if (CI_GROUP == '1') {
runbld("./test/scripts/jenkins_build_kbn_sample_panel_action.sh", "Build kbn tp sample panel action for ciGroup1")
}
} else {
kibanaPipeline.buildXpack()
}
} else {
kibanaPipeline.buildXpack()
}
}, getWorkerMap(agentNumberInside, agentExecutions, worker, workerFailures))()
}, getWorkerMap(agentNumberInside, agentExecutions, worker, workerFailures))()
}
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion .ci/Jenkinsfile_security_cypress
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ kibanaPipeline(timeoutMinutes: 180) {
) {
catchError {
withEnv([
'CI_PARALLEL_PROCESS_NUMBER=1'
'CI_PARALLEL_PROCESS_NUMBER=1',
'IGNORE_SHIP_CI_STATS_ERROR=true',
]) {
def job = 'xpack-securityCypress'

Expand Down
4 changes: 2 additions & 2 deletions .ci/end2end.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ pipeline {
}

def notifyStatus(String description, String status) {
withGithubNotify.notify('end2end-for-apm-ui', description, status, getBlueoceanTabURL('pipeline'))
withGithubStatus.notify('end2end-for-apm-ui', description, status, getBlueoceanTabURL('pipeline'))
}

def notifyTestStatus(String description, String status) {
withGithubNotify.notify('end2end-for-apm-ui', description, status, getBlueoceanTabURL('tests'))
withGithubStatus.notify('end2end-for-apm-ui', description, status, getBlueoceanTabURL('tests'))
}
5 changes: 4 additions & 1 deletion .ci/es-snapshots/Jenkinsfile_verify_es
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ kibanaPipeline(timeoutMinutes: 150) {
message: "[${SNAPSHOT_VERSION}] ES Snapshot Verification Failure",
) {
retryable.enable(2)
withEnv(["ES_SNAPSHOT_MANIFEST=${SNAPSHOT_MANIFEST}"]) {
withEnv([
"ES_SNAPSHOT_MANIFEST=${SNAPSHOT_MANIFEST}",
'IGNORE_SHIP_CI_STATS_ERROR=true',
]) {
parallel([
'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'),
'kibana-oss-agent': workers.functional('kibana-oss-tests', { kibanaPipeline.buildOss() }, [
Expand Down
5 changes: 1 addition & 4 deletions docs/CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,8 @@ For detailed information about the n.n.n release, review the following sections.
[[release-notes-7.11.0]]
== {kib} 7.11.0

coming::[7.11.0]

For detailed information about the 7.11.0 release, review the <<deprecation-v7.11.0,Deprecations>>, <<enhancement-v7.11.0,Enhancements>>, and <<bug-v7.11.0,Bug fixes>>.

//For the 7.11.0 breaking changes, refer to <<breaking-changes-7.11,breaking changes in 7.11>>.
For the 7.11.0 breaking changes, refer to <<breaking-changes-7.11,breaking changes in 7.11>>.

[float]
[[deprecation-v7.11.0]]
Expand Down
13 changes: 10 additions & 3 deletions docs/developer/contributing/development-ci-metrics.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,20 @@ Changes to the {kib-repo}blob/{branch}/packages/kbn-optimizer/limits.yml[`limits
[[ci-metric-validating-limits]]
=== Validating `page load bundle size` limits

Once you've fixed any issues discovered while diagnosing overages you probably should just push the changes to your PR and let CI validate them.
While you're trying to track down changes which will improve the bundle size, try running the following command locally:

If you have a pretty powerful dev machine, or the necessary patience/determination, you can validate the limits locally by running the following command:
[source,shell]
-----------
node scripts/build_kibana_platform_plugins --dist --watch --focus {pluginId}
-----------

This will build the front-end bundles for your plugin and only the plugins your plugin depends on. Whenever you make changes the bundles are rebuilt and you can inspect the metrics of that build in the `target/public/metrics.json` file within your plugin. This file will be updated as you save changes to the source and should be helpful to determine if your changes are lowering the `page load asset size` enough.

If you only want to run the build once you can run:

[source,shell]
-----------
node scripts/build_kibana_platform_plugins --validate-limits
node scripts/build_kibana_platform_plugins --validate-limits --focus {pluginId}
-----------

This command needs to apply production optimizations to get the right sizes, which means that the optimizer will take significantly longer to run and on most developmer machines will consume all of your machines resources for 20 minutes or more. If you'd like to multi-task while this is running you might need to limit the number of workers using the `--max-workers` flag.
4 changes: 0 additions & 4 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,6 @@ using the CURL scripts in the scripts folder.
|Visualize geo data from Elasticsearch or 3rd party geo-services.
|{kib-repo}blob/{branch}/x-pack/plugins/maps_file_upload/README.md[mapsFileUpload]
|Deprecated - plugin targeted for removal and will get merged into file_upload plugin
|{kib-repo}blob/{branch}/x-pack/plugins/maps_legacy_licensing/README.md[mapsLegacyLicensing]
|This plugin provides access to the detailed tile map services from Elastic.
Expand Down
2 changes: 0 additions & 2 deletions docs/migration/migrate_7_11.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
<titleabbrev>7.11</titleabbrev>
++++

coming::[7.11.0]

This page discusses the breaking changes that you need to be aware of when migrating
your application to {kib} 7.11.

Expand Down
1 change: 1 addition & 0 deletions docs/setup/install/deb.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ locations for a Debian-based system:
| config
| Configuration files including `kibana.yml`
| /etc/kibana
| <<settings,KBN_PATH_CONF>>
d|

| data
Expand Down
1 change: 1 addition & 0 deletions docs/setup/install/rpm.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ locations for an RPM-based system:
| config
| Configuration files including `kibana.yml`
| /etc/kibana
| <<settings,KBN_PATH_CONF>>
d|

| data
Expand Down
1 change: 1 addition & 0 deletions docs/setup/install/targz.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ important data later on.
| config
| Configuration files including `kibana.yml`
| $KIBANA_HOME\config
| <<settings,KBN_PATH_CONF>>
d|

| data
Expand Down
1 change: 1 addition & 0 deletions docs/setup/install/windows.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ important data later on.
| config
| Configuration files including `kibana.yml`
| $KIBANA_HOME\config
| <<settings,KBN_PATH_CONF>>
d|

| data
Expand Down
10 changes: 8 additions & 2 deletions docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ The {kib} server reads properties from the `kibana.yml` file on startup. The
location of this file differs depending on how you installed {kib}. For example,
if you installed {kib} from an archive distribution (`.tar.gz` or `.zip`), by
default it is in `$KIBANA_HOME/config`. By default, with package distributions
(Debian or RPM), it is in `/etc/kibana`.
(Debian or RPM), it is in `/etc/kibana`. The config directory can be changed via the
`KBN_PATH_CONF` environment variable:

```
KBN_PATH_CONF=/home/kibana/config ./bin/kibana
```

The default host and port settings configure {kib} to run on `localhost:5601`. To change this behavior and allow remote users to connect, you'll need to update your `kibana.yml` file. You can also enable SSL and set a
variety of other options. Finally, environment variables can be injected into
Expand Down Expand Up @@ -309,7 +314,8 @@ suppress all logging output. *Default: `false`*
| Set to the canonical time zone ID
(for example, `America/Los_Angeles`) to log events using that time zone.
For possible values, refer to
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones[database time zones]. *Default: `UTC`*
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones[database time zones].
When not set, log events use the host timezone

| [[logging-verbose]] `logging.verbose:` {ess-icon}
| Set to `true` to log all events, including system usage information and all
Expand Down
3 changes: 1 addition & 2 deletions docs/user/dashboard/vega-reference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,7 @@ Additionally, you can use `latitude`, `longitude`, and `zoom` signals.
These signals can be used in the graph, or can be updated to modify the
position of the map.

experimental[] You can use the *Vega* https://vega.github.io/vega/docs/data/[data] element to access https://www.elastic.co/elastic-maps-service[Elastic Maps Service (EMS)]
vector shapes of administrative boundaries in your Vega map by setting `url.data` to `emsFile`:
experimental[] You can use the *Vega* https://vega.github.io/vega/docs/data/[data] element to access https://www.elastic.co/elastic-maps-service[Elastic Maps Service (EMS)] vector shapes of administrative boundaries in your Vega map by setting `url.data` to `emsFile`:

[source,yaml]
----
Expand Down
4 changes: 3 additions & 1 deletion docs/user/whats-new.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
This section summarizes the most important changes in this release. For previous
releases, refer to:

* {kibana-ref-all}/7.11/whats-new.html[7.11]
* {kibana-ref-all}/7.10/whats-new.html[7.10]
* {kibana-ref-all}/7.9/whats-new.html[7.9]
* {kibana-ref-all}/7.8/whats-new.html[7.8]
* {kibana-ref-all}/7.7/release-highlights-7.7.0.html[7.7]
Expand All @@ -16,7 +18,7 @@ releases, refer to:
* {kibana-ref-all}/7.0/release-highlights-7.0.0.html[7.0]

For the full list of changes in {minor-version}, see <<release-notes>> and
<<breaking-changes>>.
<<breaking-changes>>.

//NOTE: The notable-highlights tagged regions are re-used in the
//Installation and Upgrade Guide
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"@babel/runtime": "^7.12.5",
"@elastic/datemath": "link:packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^7.12.0-canary",
"@elastic/ems-client": "7.11.0",
"@elastic/ems-client": "7.12.0",
"@elastic/eui": "31.4.0",
"@elastic/filesaver": "1.1.2",
"@elastic/good": "^9.0.1-kibana3",
Expand Down Expand Up @@ -244,7 +244,7 @@
"moment": "^2.24.0",
"moment-duration-format": "^2.3.2",
"moment-timezone": "^0.5.27",
"monaco-editor": "^0.17.0",
"monaco-editor": "^0.22.3",
"mustache": "^2.3.2",
"ngreact": "^0.5.1",
"nock": "12.0.3",
Expand Down Expand Up @@ -769,7 +769,7 @@
"react-fast-compare": "^2.0.4",
"react-grid-layout": "^0.16.2",
"react-markdown": "^4.3.1",
"react-monaco-editor": "^0.27.0",
"react-monaco-editor": "^0.41.2",
"react-popper-tooltip": "^2.10.1",
"react-resize-detector": "^4.2.0",
"react-reverse-portal": "^1.0.4",
Expand Down Expand Up @@ -848,4 +848,4 @@
"yargs": "^15.4.1",
"zlib": "^1.0.5"
}
}
}
12 changes: 10 additions & 2 deletions packages/kbn-dev-utils/src/ci_stats_reporter/ship_ci_stats_cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,18 @@ export function shipCiStatsCli() {
throw createFlagError('expected --metrics to be a string');
}

const maybeFail = (message: string) => {
const error = createFailError(message);
if (process.env.IGNORE_SHIP_CI_STATS_ERROR === 'true') {
error.exitCode = 0;
}
return error;
};

const reporter = CiStatsReporter.fromEnv(log);

if (!reporter.isEnabled()) {
throw createFailError('unable to initilize the CI Stats reporter');
throw maybeFail('unable to initilize the CI Stats reporter');
}

for (const path of metricPaths) {
Expand All @@ -35,7 +43,7 @@ export function shipCiStatsCli() {
if (await reporter.metrics(JSON.parse(json))) {
log.success('shipped metrics from', path);
} else {
throw createFailError('failed to ship metrics');
throw maybeFail('failed to ship metrics');
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-monaco/src/monaco_imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import 'monaco-editor/esm/vs/editor/browser/controller/coreCommands.js';
import 'monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js';

import 'monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js'; // Needed for word-wise char navigation

import 'monaco-editor/esm/vs/editor/contrib/folding/folding.js'; // Needed for folding
import 'monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js'; // Needed for suggestions
import 'monaco-editor/esm/vs/editor/contrib/hover/hover.js'; // Needed for hover
import 'monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js'; // Needed for signature
Expand Down
2 changes: 2 additions & 0 deletions packages/kbn-monaco/src/register_globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ const mapLanguageIdToWorker: { [key: string]: any } = {

// @ts-ignore
window.MonacoEnvironment = {
// needed for functional tests so that we can get value from 'editor'
monaco,
getWorker: (module: string, languageId: string) => {
const workerSrc = mapLanguageIdToWorker[languageId] || defaultWorkerSrc;

Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ pageLoadAssetSize:
presentationUtil: 28545
spacesOss: 18817
osquery: 107090
mapsFileUpload: 23775
fileUpload: 25664
8 changes: 4 additions & 4 deletions packages/kbn-pm/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48147,13 +48147,13 @@ async function installBazelTools(repoRootPath) {
const bazeliskVersion = await readBazelToolsVersionFile(repoRootPath, '.bazeliskversion');
const bazelVersion = await readBazelToolsVersionFile(repoRootPath, '.bazelversion'); // Check what globals are installed

_log__WEBPACK_IMPORTED_MODULE_4__["log"].debug(`[bazel_tools] verify if bazelisk is installed`); // Test if bazelisk is already installed in the correct version
_log__WEBPACK_IMPORTED_MODULE_4__["log"].debug(`[bazel_tools] verify if bazelisk is installed`); // Check if we need to remove bazelisk from yarn

const isBazeliskPkgInstalled = await isBazeliskInstalled(bazeliskVersion); // Test if bazel bin is available
await tryRemoveBazeliskFromYarnGlobal(); // Test if bazelisk is already installed in the correct version

const isBazelBinAlreadyAvailable = await isBazelBinAvailable(); // Check if we need to remove bazelisk from yarn
const isBazeliskPkgInstalled = await isBazeliskInstalled(bazeliskVersion); // Test if bazel bin is available

await tryRemoveBazeliskFromYarnGlobal(); // Install bazelisk if not installed
const isBazelBinAlreadyAvailable = await isBazelBinAvailable(); // Install bazelisk if not installed

if (!isBazeliskPkgInstalled || !isBazelBinAlreadyAvailable) {
_log__WEBPACK_IMPORTED_MODULE_4__["log"].info(`[bazel_tools] installing Bazel tools`);
Expand Down
6 changes: 3 additions & 3 deletions packages/kbn-pm/src/utils/bazel/install_tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ export async function installBazelTools(repoRootPath: string) {
// Check what globals are installed
log.debug(`[bazel_tools] verify if bazelisk is installed`);

// Check if we need to remove bazelisk from yarn
await tryRemoveBazeliskFromYarnGlobal();

// Test if bazelisk is already installed in the correct version
const isBazeliskPkgInstalled = await isBazeliskInstalled(bazeliskVersion);

// Test if bazel bin is available
const isBazelBinAlreadyAvailable = await isBazelBinAvailable();

// Check if we need to remove bazelisk from yarn
await tryRemoveBazeliskFromYarnGlobal();

// Install bazelisk if not installed
if (!isBazeliskPkgInstalled || !isBazelBinAlreadyAvailable) {
log.info(`[bazel_tools] installing Bazel tools`);
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-test/jest-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ module.exports = {

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
transformIgnorePatterns: [
// ignore all node_modules except monaco-editor which requires babel transforms to handle dynamic import()
// ignore all node_modules except monaco-editor and react-monaco-editor which requires babel transforms to handle dynamic import()
// since ESM modules are not natively supported in Jest yet (https://github.com/facebook/jest/issues/4842)
'[/\\\\]node_modules(?![\\/\\\\]monaco-editor)[/\\\\].+\\.js$',
'[/\\\\]node_modules(?![\\/\\\\](monaco-editor|react-monaco-editor))[/\\\\].+\\.js$',
'packages/kbn-pm/dist/index.js',
],

Expand Down
7 changes: 7 additions & 0 deletions packages/kbn-ui-shared-deps/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ exports.getWebpackConfig = ({ dev = false } = {}) => ({
},
],
},
{
test: /\.(ttf)(\?|$)/,
loader: 'url-loader',
options: {
limit: 8192,
},
},
],
},

Expand Down
2 changes: 1 addition & 1 deletion scripts/build_ts_refs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
*/

require('../src/setup_node_env');
require('../src/dev/typescript/build_refs').runBuildRefs();
require('../src/dev/typescript').runBuildRefsCli();
20 changes: 20 additions & 0 deletions src/core/server/config/deprecation/core_deprecations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,4 +318,24 @@ describe('core deprecations', () => {
expect(messages).toEqual([]);
});
});

describe('logging.timezone', () => {
it('warns when ops events are used', () => {
const { messages } = applyCoreDeprecations({
logging: { timezone: 'GMT' },
});
expect(messages).toMatchInlineSnapshot(`
Array [
"\\"logging.timezone\\" has been deprecated and will be removed in 8.0. To set the timezone moving forward, please add a timezone date modifier to the log pattern in your logging configuration. For more details, see https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.md",
]
`);
});

it('does not warn when other events are configured', () => {
const { messages } = applyCoreDeprecations({
logging: { events: { log: '*' } },
});
expect(messages).toEqual([]);
});
});
});
Loading

0 comments on commit e356c8c

Please sign in to comment.