Skip to content

Commit

Permalink
Merge branch 'master' into feature/exploratory-view-chart-creation-co…
Browse files Browse the repository at this point in the history
…ntext
  • Loading branch information
kibanamachine authored Oct 19, 2021
2 parents 162b0b4 + 1a5570b commit 20ea354
Show file tree
Hide file tree
Showing 148 changed files with 8,666 additions and 3,747 deletions.
2 changes: 1 addition & 1 deletion .bazeliskversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.5
1.10.1
3 changes: 0 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ build --remote_timeout=30
build --remote_header=x-buildbuddy-api-key=3EYk49W2NefOx2n3yMze
build --remote_accept_cached=true

# BuildBuddy
## Metadata settings
build --workspace_status_command="node ./src/dev/bazel_workspace_status.js"
# Enable this in case you want to share your build info
# build --build_metadata=VISIBILITY=PUBLIC
build --build_metadata=TEST_GROUPS=//packages
Expand Down
4 changes: 2 additions & 2 deletions .bazelrc.common
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ test --incompatible_strict_action_env
# collect coverage information from test targets
coverage --instrument_test_targets

# Settings for CI
# Bazel flags for CI are in /src/dev/ci_setup/.bazelrc-ci
# Metadata settings
build --workspace_status_command="node ./src/dev/bazel_workspace_status.js"

# Load any settings specific to the current user.
# .bazelrc.user should appear in .gitignore so that settings are not shared with team members
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.0
4.2.1
4 changes: 4 additions & 0 deletions .buildkite/pipelines/es_snapshots/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ steps:

- command: .buildkite/scripts/lifecycle/pre_build.sh
label: Pre-Build
timeout_in_minutes: 10

- wait

Expand All @@ -22,6 +23,7 @@ steps:
queue: c2-16
key: build
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
timeout_in_minutes: 60

- command: .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Default CI Group'
Expand Down Expand Up @@ -81,6 +83,7 @@ steps:

- command: .buildkite/scripts/steps/es_snapshots/trigger_promote.sh
label: Trigger promotion
timeout_in_minutes: 10
depends_on:
- default-cigroup
- default-cigroup-docker
Expand All @@ -93,3 +96,4 @@ steps:

- command: .buildkite/scripts/lifecycle/post_build.sh
label: Post-Build
timeout_in_minutes: 10
6 changes: 6 additions & 0 deletions .buildkite/pipelines/hourly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ env:
steps:
- command: .buildkite/scripts/lifecycle/pre_build.sh
label: Pre-Build
timeout_in_minutes: 10

- wait

Expand All @@ -12,6 +13,7 @@ steps:
queue: c2-16
key: build
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
timeout_in_minutes: 60

- command: .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Default CI Group'
Expand Down Expand Up @@ -143,21 +145,25 @@ steps:
agents:
queue: n2-2
key: linting
timeout_in_minutes: 90

- command: .buildkite/scripts/steps/checks.sh
label: 'Checks'
agents:
queue: c2-4
key: checks
timeout_in_minutes: 120

- command: .buildkite/scripts/steps/storybooks/build_and_upload.sh
label: 'Build Storybooks'
agents:
queue: c2-4
key: storybooks
timeout_in_minutes: 60

- wait: ~
continue_on_failure: true

- command: .buildkite/scripts/lifecycle/post_build.sh
label: Post-Build
timeout_in_minutes: 10
6 changes: 6 additions & 0 deletions .buildkite/pipelines/on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,27 @@ env:
steps:
- command: .buildkite/scripts/lifecycle/pre_build.sh
label: Pre-Build
timeout_in_minutes: 10

- wait

- command: .buildkite/scripts/steps/on_merge_build_and_metrics.sh
label: Default Build and Metrics
env:
BAZEL_CACHE_MODE: read-write
agents:
queue: c2-8
timeout_in_minutes: 60

- command: .buildkite/scripts/steps/on_merge_ts_refs_api_docs.sh
label: Build TS Refs and Check Public API Docs
agents:
queue: c2-4
timeout_in_minutes: 80

- wait: ~
continue_on_failure: true

- command: .buildkite/scripts/lifecycle/post_build.sh
label: Post-Build
timeout_in_minutes: 10
7 changes: 6 additions & 1 deletion .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
steps:
- command: .buildkite/scripts/lifecycle/pre_build.sh
label: Pre-Build
timeout_in_minutes: 10

- wait

Expand All @@ -10,14 +11,15 @@ steps:
queue: c2-16
key: build
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
timeout_in_minutes: 60

- command: .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Default CI Group'
parallelism: 13
agents:
queue: ci-group-6
depends_on: build
timeout_in_minutes: 120
timeout_in_minutes: 150
key: default-cigroup
retry:
automatic:
Expand Down Expand Up @@ -141,15 +143,18 @@ steps:
agents:
queue: n2-2
key: linting
timeout_in_minutes: 90

- command: .buildkite/scripts/steps/checks.sh
label: 'Checks'
agents:
queue: c2-4
key: checks
timeout_in_minutes: 120

- command: .buildkite/scripts/steps/storybooks/build_and_upload.sh
label: 'Build Storybooks'
agents:
queue: c2-4
key: storybooks
timeout_in_minutes: 60
2 changes: 2 additions & 0 deletions .buildkite/pipelines/update_demo_env.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
steps:
- command: .buildkite/scripts/steps/demo_env/es_and_init.sh
label: Initialize Environment and Deploy ES
timeout_in_minutes: 10

- command: .buildkite/scripts/steps/demo_env/kibana.sh
label: Build and Deploy Kibana
agents:
queue: c2-8
timeout_in_minutes: 60
1 change: 1 addition & 0 deletions .buildkite/scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -euo pipefail

source .buildkite/scripts/common/util.sh
source .buildkite/scripts/common/setup_bazel.sh

echo "--- yarn install and bootstrap"
retry 2 15 yarn kbn bootstrap
Expand Down
15 changes: 0 additions & 15 deletions .buildkite/scripts/common/persist_bazel_cache.sh

This file was deleted.

38 changes: 38 additions & 0 deletions .buildkite/scripts/common/setup_bazel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash

source .buildkite/scripts/common/util.sh

KIBANA_BUILDBUDDY_CI_API_KEY=$(retry 5 5 vault read -field=value secret/kibana-issues/dev/kibana-buildbuddy-ci-api-key)
export KIBANA_BUILDBUDDY_CI_API_KEY

echo "[bazel] writing .bazelrc"
cat <<EOF > $KIBANA_DIR/.bazelrc
# Generated by .buildkite/scripts/common/setup_bazel.sh
import %workspace%/.bazelrc.common
build --build_metadata=ROLE=CI
EOF

if [[ "${BAZEL_CACHE_MODE:-none}" == read* ]]; then
echo "[bazel] enabling caching"
cat <<EOF >> $KIBANA_DIR/.bazelrc
build --bes_results_url=https://app.buildbuddy.io/invocation/
build --bes_backend=grpcs://cloud.buildbuddy.io
build --remote_cache=grpcs://cloud.buildbuddy.io
build --remote_timeout=3600
build --remote_header=x-buildbuddy-api-key=$KIBANA_BUILDBUDDY_CI_API_KEY
EOF
fi

if [[ "${BAZEL_CACHE_MODE:-none}" == "read" ]]; then
echo "[bazel] cache set to read-only"
cat <<EOF >> $KIBANA_DIR/.bazelrc
build --noremote_upload_local_results
EOF
fi

if [[ "${BAZEL_CACHE_MODE:-none}" != @(read|read-write|none|) ]]; then
echo "invalid value for BAZEL_CACHE_MODE received ($BAZEL_CACHE_MODE), expected one of [read,read-write,none]"
exit 1
fi
2 changes: 1 addition & 1 deletion .buildkite/scripts/common/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ verify_no_git_changes() {
RED='\033[0;31m'
C_RESET='\033[0m' # Reset color

GIT_CHANGES="$(git ls-files --modified)"
GIT_CHANGES="$(git ls-files --modified -- . ':!:.bazelrc')"
if [ "$GIT_CHANGES" ]; then
echo -e "\n${RED}ERROR: '$1' caused changes to the following files:${C_RESET}\n"
echo -e "$GIT_CHANGES\n"
Expand Down
3 changes: 0 additions & 3 deletions .buildkite/scripts/steps/on_merge_build_and_metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

set -euo pipefail

# Write Bazel cache for Linux
.buildkite/scripts/common/persist_bazel_cache.sh

.buildkite/scripts/bootstrap.sh
.buildkite/scripts/build_kibana.sh
.buildkite/scripts/post_build_kibana.sh
Expand Down
1 change: 1 addition & 0 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ check_rules_nodejs_version(minimum_version_string = "3.8.0")
node_repositories(
node_repositories = {
"16.11.1-darwin_amd64": ("node-v16.11.1-darwin-x64.tar.gz", "node-v16.11.1-darwin-x64", "ba54b8ed504bd934d03eb860fefe991419b4209824280d4274f6a911588b5e45"),
"16.11.1-darwin_arm64": ("node-v16.11.1-darwin-arm64.tar.gz", "node-v16.11.1-darwin-arm64", "5e772e478390fab3001b7148a923e4f22fca50170000f18b28475337d3a97248"),
"16.11.1-linux_arm64": ("node-v16.11.1-linux-arm64.tar.xz", "node-v16.11.1-linux-arm64", "083fc51f0ea26de9041aaf9821874651a9fd3b20d1cf57071ce6b523a0436f17"),
"16.11.1-linux_s390x": ("node-v16.11.1-linux-s390x.tar.xz", "node-v16.11.1-linux-s390x", "855b5c83c2ccb05273d50bb04376335c68d47df57f3187cdebe1f22b972d2825"),
"16.11.1-linux_amd64": ("node-v16.11.1-linux-x64.tar.xz", "node-v16.11.1-linux-x64", "493bcc9b660eff983a6de65a0f032eb2717f57207edf74c745bcb86e360310b3"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ readonly links: {
clusterPrivileges: string;
elasticsearchSettings: string;
elasticsearchEnableSecurity: string;
elasticsearchEnableApiKeys: string;
indicesPrivileges: string;
kibanaTLS: string;
kibanaPrivileges: string;
Expand Down
3 changes: 1 addition & 2 deletions docs/user/alerting/alerting-setup.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ If you are using an *on-premises* Elastic Stack deployment:

If you are using an *on-premises* Elastic Stack deployment with <<using-kibana-with-security, *security*>>:

* You must enable Transport Layer Security (TLS) for communication <<configuring-tls-kib-es, between {es} and {kib}>>. {kib} alerting uses <<api-keys, API keys>> to secure background rule checks and actions, and API keys require {ref}/configuring-tls.html#tls-http[TLS on the HTTP interface]. A proxy will not suffice.
* If you have enabled TLS and are still unable to access Alerting, ensure that you have not {ref}/security-settings.html#api-key-service-settings[explicitly disabled API keys].
* If you are unable to access Alerting, ensure that you have not {ref}/security-settings.html#api-key-service-settings[explicitly disabled API keys].

The Alerting framework uses queries that require the `search.allow_expensive_queries` setting to be `true`. See the scripts {ref}/query-dsl-script-query.html#_allow_expensive_queries_4[documentation].

Expand Down
2 changes: 2 additions & 0 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ export class DocLinksService {
clusterPrivileges: `${ELASTICSEARCH_DOCS}security-privileges.html#privileges-list-cluster`,
elasticsearchSettings: `${ELASTICSEARCH_DOCS}security-settings.html`,
elasticsearchEnableSecurity: `${ELASTICSEARCH_DOCS}configuring-stack-security.html`,
elasticsearchEnableApiKeys: `${ELASTICSEARCH_DOCS}security-settings.html#api-key-service-settings`,
indicesPrivileges: `${ELASTICSEARCH_DOCS}security-privileges.html#privileges-list-indices`,
kibanaTLS: `${ELASTICSEARCH_DOCS}security-basic-setup.html#encrypt-internode-communication`,
kibanaPrivileges: `${KIBANA_DOCS}kibana-privileges.html`,
Expand Down Expand Up @@ -715,6 +716,7 @@ export interface DocLinksStart {
clusterPrivileges: string;
elasticsearchSettings: string;
elasticsearchEnableSecurity: string;
elasticsearchEnableApiKeys: string;
indicesPrivileges: string;
kibanaTLS: string;
kibanaPrivileges: string;
Expand Down
1 change: 1 addition & 0 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ export interface DocLinksStart {
clusterPrivileges: string;
elasticsearchSettings: string;
elasticsearchEnableSecurity: string;
elasticsearchEnableApiKeys: string;
indicesPrivileges: string;
kibanaTLS: string;
kibanaPrivileges: string;
Expand Down
3 changes: 2 additions & 1 deletion src/dev/build/lib/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ describe('#getTargetPlatforms()', () => {
.sort()
).toMatchInlineSnapshot(`
Array [
"darwin-arm64",
"darwin-x64",
"linux-arm64",
"linux-x64",
Expand All @@ -132,7 +133,7 @@ describe('#getNodePlatforms()', () => {
.getTargetPlatforms()
.map((p) => p.getNodeArch())
.sort()
).toEqual(['darwin-x64', 'linux-arm64', 'linux-x64', 'win32-x64']);
).toEqual(['darwin-arm64', 'darwin-x64', 'linux-arm64', 'linux-x64', 'win32-x64']);
});

it('returns this platform and linux, when targetAllPlatforms = false', async () => {
Expand Down
3 changes: 3 additions & 0 deletions src/dev/build/lib/platform.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ describe('isWindows()', () => {
expect(new Platform('win32', 'x64', 'foo').isWindows()).toBe(true);
expect(new Platform('linux', 'x64', 'foo').isWindows()).toBe(false);
expect(new Platform('darwin', 'x64', 'foo').isWindows()).toBe(false);
expect(new Platform('darwin', 'arm64', 'foo').isWindows()).toBe(false);
});
});

Expand All @@ -39,6 +40,7 @@ describe('isLinux()', () => {
expect(new Platform('win32', 'x64', 'foo').isLinux()).toBe(false);
expect(new Platform('linux', 'x64', 'foo').isLinux()).toBe(true);
expect(new Platform('darwin', 'x64', 'foo').isLinux()).toBe(false);
expect(new Platform('darwin', 'arm64', 'foo').isLinux()).toBe(false);
});
});

Expand All @@ -47,5 +49,6 @@ describe('isMac()', () => {
expect(new Platform('win32', 'x64', 'foo').isMac()).toBe(false);
expect(new Platform('linux', 'x64', 'foo').isMac()).toBe(false);
expect(new Platform('darwin', 'x64', 'foo').isMac()).toBe(true);
expect(new Platform('darwin', 'arm64', 'foo').isMac()).toBe(true);
});
});
1 change: 1 addition & 0 deletions src/dev/build/lib/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ export const ALL_PLATFORMS = [
new Platform('linux', 'x64', 'linux-x86_64'),
new Platform('linux', 'arm64', 'linux-aarch64'),
new Platform('darwin', 'x64', 'darwin-x86_64'),
new Platform('darwin', 'arm64', 'darwin-aarch64'),
new Platform('win32', 'x64', 'windows-x86_64'),
];
6 changes: 5 additions & 1 deletion src/dev/build/tasks/install_chromium.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ export const InstallChromium = {

async run(config, log, build) {
for (const platform of config.getNodePlatforms()) {
log.info(`Installing Chromium for ${platform.getName()}-${platform.getArchitecture()}`);
const target = `${platform.getName()}-${platform.getArchitecture()}`;
log.info(`Installing Chromium for ${target}`);

// revert after https://github.com/elastic/kibana/issues/109949
if (target === 'darwin-arm64') continue;

const { binaryPath$ } = installBrowser(
log,
Expand Down
9 changes: 9 additions & 0 deletions src/dev/build/tasks/nodejs/download_node_builds_task.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ it('downloads node builds for each platform', async () => {
"url": "darwin:url",
},
],
Array [
Object {
"destination": "darwin:downloadPath",
"log": <ToolingLog>,
"retries": 3,
"sha256": "darwin:sha256",
"url": "darwin:url",
},
],
Array [
Object {
"destination": "win32:downloadPath",
Expand Down
Loading

0 comments on commit 20ea354

Please sign in to comment.