Skip to content

Commit

Permalink
Merge branch 'master' into dev/search-session-management-visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Feb 11, 2021
2 parents 2cccde7 + c0a974a commit e46e555
Show file tree
Hide file tree
Showing 332 changed files with 8,963 additions and 3,323 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
5 changes: 2 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,8 @@
/x-pack/plugins/telemetry_collection_xpack/ @elastic/kibana-core
/.telemetryrc.json @elastic/kibana-core
/x-pack/.telemetryrc.json @elastic/kibana-core
src/plugins/telemetry/schema/legacy_oss_plugins.json @elastic/kibana-core
src/plugins/telemetry/schema/oss_plugins.json @elastic/kibana-core
x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kibana-core
src/plugins/telemetry/schema/ @elastic/kibana-core @elastic/kibana-telemetry @elastic/infra-telemetry
x-pack/plugins/telemetry_collection_xpack/schema/ @elastic/kibana-core @elastic/kibana-telemetry @elastic/infra-telemetry

# Kibana Localization
/src/dev/i18n/ @elastic/kibana-localization @elastic/kibana-core
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ on:
jobs:
backport:
name: Backport PR
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'auto-backport')
if: |
github.event.pull_request.merged == true
&& contains(github.event.pull_request.labels.*.name, 'auto-backport')
&& (
(github.event.action == 'labeled' && github.event.label.name == 'auto-backport')
|| (github.event.action == 'closed')
)
runs-on: ubuntu-latest

steps:
- name: 'Get backport config'
run: |
Expand Down
2 changes: 1 addition & 1 deletion docs/dev-tools/searchprofiler/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[[profiler-getting-started]]
=== Getting Started

The {searchprofiler} is automatically enabled in {kib}. Open the main menu, click *Dev Tools*, then click *Search Profiler*
The {searchprofiler} is automatically enabled in {kib}. Open the main menu, click *Dev Tools*, then click *{searchprofiler}*
to get started.

{searchprofiler} displays the names of the indices searched, the shards in each index,
Expand Down
4 changes: 0 additions & 4 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,6 @@ Failure to have auth enabled in Kibana will make for a broken UI. UI-based error
|The cloud plugin adds cloud specific features to Kibana.
|{kib-repo}blob/{branch}/x-pack/plugins/code[code]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/console_extensions/README.md[consoleExtensions]
|This plugin provides autocomplete definitions of licensed APIs to the OSS Console plugin.
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 @@ -156,6 +156,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 @@ -149,6 +149,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
7 changes: 6 additions & 1 deletion 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
2 changes: 1 addition & 1 deletion docs/user/dev-tools.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ a| <<console-kibana, Console>>
| Interact with the REST API of Elasticsearch, including sending requests
and viewing API documentation.

a| <<xpack-profiler, Search&nbsp;Profiler>>
a| <<xpack-profiler, {searchprofiler}>>

| Inspect and analyze your search queries.

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,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 @@ -772,7 +772,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
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
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();
1 change: 1 addition & 0 deletions src/dev/build/tasks/copy_source_task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const CopySource: Task = {
'!src/cli/dev.js',
'!src/functional_test_runner/**',
'!src/dev/**',
'!src/plugins/telemetry/schema/**', // Skip telemetry schemas
// this is the dev-only entry
'!src/setup_node_env/index.js',
'!**/public/**/*.{js,ts,tsx,json}',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"id": "codeCoverageTestPlugin",
"version": "kibana",
"server": true,
"ui": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* 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.
*/

import { Plugin } from './plugin';

export function plugin() {
return new Plugin();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* 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.
*/

import { CoreSetup } from 'kibana/server';

export class Plugin {
constructor() {}

public setup(core: CoreSetup) {}

public start() {
// called after all plugins are set up
}

public stop() {
// called when plugin is torn down during Kibana's shutdown sequence
}
}
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# For more info, see https://help.github.com/articles/about-codeowners/

# App
/x-pack/plugins/code/ @elastic/kibana-tre
/src/dev/code_coverage/ingest_coverage/integration_tests/fixtures/test_plugin @elastic/kibana-tre
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,8 @@ describe('Team Assignment', () => {
const { stdout } = await execa('grep', ['tre', teamAssignmentsPath], { cwd: ROOT_DIR });
const lines = stdout.split('\n').filter((line) => !line.includes('/target'));
expect(lines).toEqual([
'x-pack/plugins/code/jest.config.js kibana-tre',
'x-pack/plugins/code/server/config.ts kibana-tre',
'x-pack/plugins/code/server/index.ts kibana-tre',
'x-pack/plugins/code/server/plugin.test.ts kibana-tre',
'x-pack/plugins/code/server/plugin.ts kibana-tre',
'src/dev/code_coverage/ingest_coverage/integration_tests/fixtures/test_plugin/server/index.ts kibana-tre',
'src/dev/code_coverage/ingest_coverage/integration_tests/fixtures/test_plugin/server/plugin.ts kibana-tre',
]);
});
});
Expand Down
35 changes: 0 additions & 35 deletions src/dev/typescript/build_refs.ts

This file was deleted.

24 changes: 24 additions & 0 deletions src/dev/typescript/build_ts_refs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* 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.
*/

import Path from 'path';

import execa from 'execa';
import { ToolingLog, REPO_ROOT } from '@kbn/dev-utils';

export const REF_CONFIG_PATHS = [Path.resolve(REPO_ROOT, 'tsconfig.refs.json')];

export async function buildAllTsRefs(log: ToolingLog) {
for (const path of REF_CONFIG_PATHS) {
const relative = Path.relative(REPO_ROOT, path);
log.debug(`Building TypeScript projects refs for ${relative}...`);
await execa(require.resolve('typescript/bin/tsc'), ['-b', relative, '--pretty'], {
cwd: REPO_ROOT,
});
}
}
Loading

0 comments on commit e46e555

Please sign in to comment.