Skip to content

Commit

Permalink
Merge branch 'main' into repeat-image-expression-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Dec 20, 2021
2 parents eac7a17 + d25e38d commit fd282cb
Show file tree
Hide file tree
Showing 455 changed files with 6,645 additions and 3,628 deletions.
2 changes: 1 addition & 1 deletion .buildkite/scripts/build_kibana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if [[ "${GITHUB_PR_LABELS:-}" == *"ci:deploy-cloud"* ]]; then
--docker-tag-qualifier="$GIT_COMMIT" \
--docker-push \
--skip-docker-ubi \
--skip-docker-centos \
--skip-docker-ubuntu \
--skip-docker-contexts

CLOUD_IMAGE=$(docker images --format "{{.Repository}}:{{.Tag}}" docker.elastic.co/kibana-ci/kibana-cloud)
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/demo_env/kibana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source "$(dirname "${0}")/config.sh"
export KIBANA_IMAGE="gcr.io/elastic-kibana-184716/demo/kibana:$DEPLOYMENT_NAME-$(git rev-parse HEAD)"

echo '--- Build Kibana'
node scripts/build --debug --docker-images --example-plugins --skip-os-packages --skip-docker-ubi
node scripts/build --debug --docker-images --example-plugins --skip-docker-ubi

echo '--- Build Docker image with example plugins'
cd target/example_plugins
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
/packages/elastic-datemath/ @elastic/kibana-app-services
/packages/kbn-interpreter/ @elastic/kibana-app-services
/packages/kbn-react-field/ @elastic/kibana-app-services
/packages/kbn-es-query/ @elastic/kibana-app-services
/packages/kbn-field-types/ @elastic/kibana-app-services
/src/plugins/bfetch/ @elastic/kibana-app-services
/src/plugins/data/ @elastic/kibana-app-services
/src/plugins/data_views/ @elastic/kibana-app-services
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"@elastic/apm-rum": "^5.10.0",
"@elastic/apm-rum-react": "^1.3.2",
"@elastic/apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace",
"@elastic/charts": "40.1.0",
"@elastic/charts": "40.2.0",
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.35",
"@elastic/ems-client": "8.0.0",
Expand Down Expand Up @@ -197,7 +197,7 @@
"base64-js": "^1.3.1",
"bitmap-sdf": "^1.0.3",
"brace": "0.11.1",
"broadcast-channel": "^4.7.1",
"broadcast-channel": "^4.8.0",
"canvg": "^3.0.9",
"chalk": "^4.1.0",
"cheerio": "^1.0.0-rc.10",
Expand All @@ -211,7 +211,7 @@
"constate": "^1.3.2",
"content-disposition": "0.5.3",
"copy-to-clipboard": "^3.0.8",
"core-js": "^3.19.1",
"core-js": "^3.19.3",
"cronstrue": "^1.51.0",
"cytoscape": "^3.10.0",
"cytoscape-dagre": "^2.2.2",
Expand Down Expand Up @@ -577,6 +577,8 @@
"@types/kbn__mapbox-gl": "link:bazel-bin/packages/kbn-mapbox-gl/npm_module_types",
"@types/kbn__monaco": "link:bazel-bin/packages/kbn-monaco/npm_module_types",
"@types/kbn__optimizer": "link:bazel-bin/packages/kbn-optimizer/npm_module_types",
"@types/kbn__plugin-generator": "link:bazel-bin/packages/kbn-plugin-generator/npm_module_types",
"@types/kbn__plugin-helpers": "link:bazel-bin/packages/kbn-plugin-helpers/npm_module_types",
"@types/license-checker": "15.0.0",
"@types/listr": "^0.14.0",
"@types/loader-utils": "^1.1.3",
Expand Down
2 changes: 2 additions & 0 deletions packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ filegroup(
"//packages/kbn-mapbox-gl:build_types",
"//packages/kbn-monaco:build_types",
"//packages/kbn-optimizer:build_types",
"//packages/kbn-plugin-generator:build_types",
"//packages/kbn-plugin-helpers:build_types",
],
)

Expand Down
26 changes: 22 additions & 4 deletions packages/kbn-plugin-generator/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
load("//src/dev/bazel:index.bzl", "jsts_transpiler")
load("@npm//@bazel/typescript:index.bzl", "ts_config")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")

PKG_BASE_NAME = "kbn-plugin-generator"
PKG_REQUIRE_NAME = "@kbn/plugin-generator"
TYPES_PKG_REQUIRE_NAME = "@types/kbn__plugin-generator"

SOURCE_FILES = glob(
[
Expand Down Expand Up @@ -96,7 +97,7 @@ ts_project(
js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = RUNTIME_DEPS + [":target_node", ":tsc_types"],
deps = RUNTIME_DEPS + [":target_node"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
Expand All @@ -115,3 +116,20 @@ filegroup(
],
visibility = ["//visibility:public"],
)

pkg_npm_types(
name = "npm_module_types",
srcs = SRCS,
deps = [":tsc_types"],
package_name = TYPES_PKG_REQUIRE_NAME,
tsconfig = ":tsconfig",
visibility = ["//visibility:public"],
)

filegroup(
name = "build_types",
srcs = [
":npm_module_types",
],
visibility = ["//visibility:public"],
)
3 changes: 1 addition & 2 deletions packages/kbn-plugin-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
"version": "1.0.0",
"private": true,
"license": "SSPL-1.0 OR Elastic License 2.0",
"main": "target_node/index.js",
"types": "target_types/index.d.ts"
"main": "target_node/index.js"
}
26 changes: 22 additions & 4 deletions packages/kbn-plugin-helpers/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@

load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
load("//src/dev/bazel:index.bzl", "jsts_transpiler")
load("@npm//@bazel/typescript:index.bzl", "ts_config")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")

PKG_BASE_NAME = "kbn-plugin-helpers"
PKG_REQUIRE_NAME = "@kbn/plugin-helpers"
TYPES_PKG_REQUIRE_NAME = "@types/kbn__plugin-helpers"

SOURCE_FILES = glob(
[
Expand Down Expand Up @@ -89,7 +90,7 @@ ts_project(
js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = RUNTIME_DEPS + [":target_node", ":tsc_types"],
deps = RUNTIME_DEPS + [":target_node"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
Expand All @@ -108,3 +109,20 @@ filegroup(
],
visibility = ["//visibility:public"],
)

pkg_npm_types(
name = "npm_module_types",
srcs = SRCS,
deps = [":tsc_types"],
package_name = TYPES_PKG_REQUIRE_NAME,
tsconfig = ":tsconfig",
visibility = ["//visibility:public"],
)

filegroup(
name = "build_types",
srcs = [
":npm_module_types",
],
visibility = ["//visibility:public"],
)
1 change: 0 additions & 1 deletion packages/kbn-plugin-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"devOnly": true
},
"main": "target_node/index.js",
"types": "target_types/index.d.ts",
"bin": {
"plugin-helpers": "bin/plugin-helpers.js"
}
Expand Down
12 changes: 0 additions & 12 deletions packages/kbn-rule-data-utils/src/technical_field_names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,8 @@ const ALERT_RULE_NAME = `${ALERT_RULE_NAMESPACE}.name` as const;
const ALERT_RULE_NOTE = `${ALERT_RULE_NAMESPACE}.note` as const;
const ALERT_RULE_PARAMETERS = `${ALERT_RULE_NAMESPACE}.parameters` as const;
const ALERT_RULE_REFERENCES = `${ALERT_RULE_NAMESPACE}.references` as const;
const ALERT_RULE_RISK_SCORE = `${ALERT_RULE_NAMESPACE}.risk_score` as const;
const ALERT_RULE_RISK_SCORE_MAPPING = `${ALERT_RULE_NAMESPACE}.risk_score_mapping` as const;
const ALERT_RULE_RULE_ID = `${ALERT_RULE_NAMESPACE}.rule_id` as const;
const ALERT_RULE_RULE_NAME_OVERRIDE = `${ALERT_RULE_NAMESPACE}.rule_name_override` as const;
const ALERT_RULE_SEVERITY = `${ALERT_RULE_NAMESPACE}.severity` as const;
const ALERT_RULE_SEVERITY_MAPPING = `${ALERT_RULE_NAMESPACE}.severity_mapping` as const;
const ALERT_RULE_TAGS = `${ALERT_RULE_NAMESPACE}.tags` as const;
const ALERT_RULE_TO = `${ALERT_RULE_NAMESPACE}.to` as const;
const ALERT_RULE_TYPE = `${ALERT_RULE_NAMESPACE}.type` as const;
Expand Down Expand Up @@ -114,12 +110,8 @@ const fields = {
ALERT_RULE_NOTE,
ALERT_RULE_PARAMETERS,
ALERT_RULE_REFERENCES,
ALERT_RULE_RISK_SCORE,
ALERT_RULE_RISK_SCORE_MAPPING,
ALERT_RULE_RULE_ID,
ALERT_RULE_RULE_NAME_OVERRIDE,
ALERT_RULE_SEVERITY,
ALERT_RULE_SEVERITY_MAPPING,
ALERT_RULE_TAGS,
ALERT_RULE_TO,
ALERT_RULE_TYPE,
Expand Down Expand Up @@ -171,19 +163,15 @@ export {
ALERT_RULE_NOTE,
ALERT_RULE_PARAMETERS,
ALERT_RULE_REFERENCES,
ALERT_RULE_RISK_SCORE,
ALERT_RULE_RISK_SCORE_MAPPING,
ALERT_RULE_RULE_ID,
ALERT_RULE_RULE_NAME_OVERRIDE,
ALERT_RULE_SEVERITY_MAPPING,
ALERT_RULE_TAGS,
ALERT_RULE_TO,
ALERT_RULE_TYPE,
ALERT_RULE_TYPE_ID,
ALERT_RULE_UPDATED_AT,
ALERT_RULE_UPDATED_BY,
ALERT_RULE_VERSION,
ALERT_RULE_SEVERITY,
ALERT_SEVERITY,
ALERT_START,
ALERT_SYSTEM_STATUS,
Expand Down
11 changes: 8 additions & 3 deletions packages/kbn-test/src/kbn_client/kbn_client_saved_objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ interface SavedObjectResponse<Attributes extends Record<string, any>> {
interface GetOptions {
type: string;
id: string;
space?: string;
}

interface IndexOptions<Attributes> {
Expand Down Expand Up @@ -110,11 +111,13 @@ export class KbnClientSavedObjects {
* Get an object
*/
public async get<Attributes extends Record<string, any>>(options: GetOptions) {
this.log.debug('Gettings saved object: %j', options);
this.log.debug('Getting saved object: %j', options);

const { data } = await this.requester.request<SavedObjectResponse<Attributes>>({
description: 'get saved object',
path: uriencode`/api/saved_objects/${options.type}/${options.id}`,
path: options.space
? uriencode`/s/${options.space}/api/saved_objects/${options.type}/${options.id}`
: uriencode`/api/saved_objects/${options.type}/${options.id}`,
method: 'GET',
});
return data;
Expand Down Expand Up @@ -174,7 +177,9 @@ export class KbnClientSavedObjects {

const { data } = await this.requester.request({
description: 'delete saved object',
path: uriencode`/api/saved_objects/${options.type}/${options.id}`,
path: options.space
? uriencode`/s/${options.space}/api/saved_objects/${options.type}/${options.id}`
: uriencode`/api/saved_objects/${options.type}/${options.id}`,
method: 'DELETE',
});

Expand Down
19 changes: 17 additions & 2 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"matchPackageNames": ["@elastic/charts"],
"reviewers": ["team:datavis"],
"matchBaseBranches": ["main"],
"labels": ["release_note:skip", "v8.0.0", "v7.16.0", "auto-backport"],
"labels": ["release_note:skip", "auto-backport", "Team:DataVis", "v8.1.0", "v7.17.0"],
"draftPR": true,
"enabled": true
},
Expand All @@ -35,7 +35,7 @@
"matchPackageNames": ["@elastic/elasticsearch"],
"reviewers": ["team:kibana-operations", "team:kibana-core"],
"matchBaseBranches": ["main"],
"labels": ["release_note:skip", "v8.0.0", "Team:Operations", "Team:Core", "backport:skip"],
"labels": ["release_note:skip", "backport:skip", "Team:Operations", "Team:Core", "v8.1.0"],
"enabled": true
},
{
Expand Down Expand Up @@ -126,6 +126,21 @@
"matchBaseBranches": ["main"],
"labels": ["Team:Security", "release_note:skip", "auto-backport"],
"enabled": true
},
{
"groupName": "ftr",
"packageNames": [
"@types/chromedriver",
"@types/selenium-webdriver",
"chromedriver",
"geckodriver",
"ms-chromium-edge-driver",
"selenium-webdriver"
],
"reviewers": ["team:kibana-operations"],
"matchBaseBranches": ["main"],
"labels": ["Team:Operations", "release_note:skip"],
"enabled": true
}
]
}
18 changes: 9 additions & 9 deletions src/dev/build/args.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ it('build default and oss dist for current platform, without packages, by defaul
"buildOptions": Object {
"createArchives": true,
"createDebPackage": false,
"createDockerCentOS": false,
"createDockerCloud": false,
"createDockerContexts": true,
"createDockerUBI": false,
"createDockerUbuntu": false,
"createExamplePlugins": false,
"createGenericFolders": true,
"createPlatformFolders": true,
Expand All @@ -58,10 +58,10 @@ it('builds packages if --all-platforms is passed', () => {
"buildOptions": Object {
"createArchives": true,
"createDebPackage": true,
"createDockerCentOS": true,
"createDockerCloud": true,
"createDockerContexts": true,
"createDockerUBI": true,
"createDockerUbuntu": true,
"createExamplePlugins": false,
"createGenericFolders": true,
"createPlatformFolders": true,
Expand All @@ -88,10 +88,10 @@ it('limits packages if --rpm passed with --all-platforms', () => {
"buildOptions": Object {
"createArchives": true,
"createDebPackage": false,
"createDockerCentOS": false,
"createDockerCloud": false,
"createDockerContexts": true,
"createDockerUBI": false,
"createDockerUbuntu": false,
"createExamplePlugins": false,
"createGenericFolders": true,
"createPlatformFolders": true,
Expand All @@ -118,10 +118,10 @@ it('limits packages if --deb passed with --all-platforms', () => {
"buildOptions": Object {
"createArchives": true,
"createDebPackage": true,
"createDockerCentOS": false,
"createDockerCloud": false,
"createDockerContexts": true,
"createDockerUBI": false,
"createDockerUbuntu": false,
"createExamplePlugins": false,
"createGenericFolders": true,
"createPlatformFolders": true,
Expand Down Expand Up @@ -149,10 +149,10 @@ it('limits packages if --docker passed with --all-platforms', () => {
"buildOptions": Object {
"createArchives": true,
"createDebPackage": false,
"createDockerCentOS": true,
"createDockerCloud": true,
"createDockerContexts": true,
"createDockerUBI": true,
"createDockerUbuntu": true,
"createExamplePlugins": false,
"createGenericFolders": true,
"createPlatformFolders": true,
Expand Down Expand Up @@ -187,10 +187,10 @@ it('limits packages if --docker passed with --skip-docker-ubi and --all-platform
"buildOptions": Object {
"createArchives": true,
"createDebPackage": false,
"createDockerCentOS": true,
"createDockerCloud": true,
"createDockerContexts": true,
"createDockerUBI": false,
"createDockerUbuntu": true,
"createExamplePlugins": false,
"createGenericFolders": true,
"createPlatformFolders": true,
Expand All @@ -211,17 +211,17 @@ it('limits packages if --docker passed with --skip-docker-ubi and --all-platform
`);
});

it('limits packages if --all-platforms passed with --skip-docker-centos', () => {
expect(readCliArgs(['node', 'scripts/build', '--all-platforms', '--skip-docker-centos']))
it('limits packages if --all-platforms passed with --skip-docker-ubuntu', () => {
expect(readCliArgs(['node', 'scripts/build', '--all-platforms', '--skip-docker-ubuntu']))
.toMatchInlineSnapshot(`
Object {
"buildOptions": Object {
"createArchives": true,
"createDebPackage": true,
"createDockerCentOS": false,
"createDockerCloud": true,
"createDockerContexts": true,
"createDockerUBI": true,
"createDockerUbuntu": false,
"createExamplePlugins": false,
"createGenericFolders": true,
"createPlatformFolders": true,
Expand Down
Loading

0 comments on commit fd282cb

Please sign in to comment.