Skip to content

Commit

Permalink
Merge branch 'main' into 126941/optimize-percentiles-fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jun 16, 2022
2 parents 3ca5e4f + 5958878 commit d35a3f3
Show file tree
Hide file tree
Showing 1,094 changed files with 30,732 additions and 14,323 deletions.
13 changes: 13 additions & 0 deletions .buildkite/pipelines/build_api_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
env:
PUBLISH_API_DOCS_CHANGES: 'true'
steps:
- command: .buildkite/scripts/steps/build_api_docs.sh
label: 'Build API Docs'
agents:
queue: n2-4-spot
key: build_api_docs
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3
6 changes: 6 additions & 0 deletions .buildkite/pipelines/flaky_tests/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ for (const testSuite of testSuites) {
concurrency: concurrency,
concurrency_group: process.env.UUID,
concurrency_method: 'eager',
env: {
// disable split of test cases between parallel jobs when running them in flaky test runner
// by setting chunks vars to value 1, which means all test will run in one job
CLI_NUMBER: 1,
CLI_COUNT: 1,
},
});
break;
default:
Expand Down
16 changes: 15 additions & 1 deletion .buildkite/pipelines/on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,23 @@ steps:
automatic:
- exit_status: '*'
limit: 1

- wait

- label: 'Triggering changes-based pipelines'
branches: main
agents:
queue: kibana-default
plugins:
- chronotc/monorepo-diff#v2.0.4:
watch:
- path:
- 'versions.json'
config:
command: 'node .buildkite/scripts/steps/trigger_pipeline.js kibana-buildkite-pipelines-deploy main'
label: 'Trigger pipeline deploy'
agents:
queue: 'kibana-default'

- command: .buildkite/scripts/steps/on_merge_build_and_metrics.sh
label: Build Kibana Distribution and Plugins
agents:
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/pull_requests.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
"^\\.github/",
"\\.md$",
"\\.mdx$",
"^api_docs/.+\\.devdocs\\.json$",
"^\\.backportrc\\.json$",
"^nav-kibana-dev\\.docnav\\.json$",
"^src/dev/prs/kibana_qa_pr_list\\.json$",
"^\\.buildkite/pull_requests\\.json$"
],
"always_require_ci_on_changed": [
"^docs/developer/plugin-list.asciidoc$",
"/plugins/[^/]+/readme\\.(md|asciidoc)$"
"^docs/developer/plugin-list.asciidoc$"
],
"kibana_versions_check": true
}
Expand Down
3 changes: 3 additions & 0 deletions .buildkite/scripts/lifecycle/pre_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ EOF
GITHUB_TOKEN=$(retry 5 5 vault read -field=github_token secret/kibana-issues/dev/kibanamachine)
export GITHUB_TOKEN

KIBANA_CI_GITHUB_TOKEN=$(retry 5 5 vault read -field=github_token secret/kibana-issues/dev/kibana-ci-github)
export KIBANA_CI_GITHUB_TOKEN

KIBANA_CI_REPORTER_KEY=$(retry 5 5 vault read -field=value secret/kibana-issues/dev/kibanamachine-reporter)
export KIBANA_CI_REPORTER_KEY

Expand Down
21 changes: 21 additions & 0 deletions .buildkite/scripts/steps/build_api_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,24 @@ node scripts/build_ts_refs \

echo "--- Build API Docs"
node --max-old-space-size=12000 scripts/build_api_docs

if [[ "${PUBLISH_API_DOCS_CHANGES:-}" == "true" ]]; then
echo "--- Publish API Docs"

git config --global user.name kibanamachine
git config --global user.email '[email protected]'

branch="api_docs_$(date +%F_%H-%M-%S)"
git checkout -b "$branch"
git add ./*.docnav.json
git add api_docs
git commit -m "[api-docs] Daily api_docs build"

git remote add kibanamachine https://github.com/kibanamachine/kibana.git
git push -u kibanamachine "$branch"
prUrl=$(gh pr create --repo elastic/kibana --title "[api-docs] $(date +%F) Daily api_docs build" --body "Generated by $BUILDKITE_BUILD_URL" --label "release_note:skip" --label "backport:auto-version")
echo "Opened PR: $prUrl"
gh pr merge --repo elastic/kibana --auto --squash "$prUrl"

GH_TOKEN="$KIBANA_CI_GITHUB_TOKEN" gh pr review --repo elastic/kibana --approve -b "Automated review from $BUILDKITE_BUILD_URL" "$prUrl"
fi
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/es_snapshots/create_manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const { BASE_BUCKET_DAILY } = require('./bucket_config');
cd "${destination}"
gsutil -m cp -r *.* gs://${BASE_BUCKET_DAILY}/${DESTINATION}
cp manifest.json manifest-latest.json
gsutil cp manifest-latest.json gs://${BASE_BUCKET_DAILY}/${VERSION}
gsutil -h "Cache-Control:no-cache, max-age=0, no-transform" cp manifest-latest.json gs://${BASE_BUCKET_DAILY}/${VERSION}
buildkite-agent meta-data set ES_SNAPSHOT_MANIFEST 'https://storage.googleapis.com/${BASE_BUCKET_DAILY}/${DESTINATION}/manifest.json'
buildkite-agent meta-data set ES_SNAPSHOT_VERSION '${VERSION}'
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/es_snapshots/promote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ node "$(dirname "${0}")/promote_manifest.js" "$ES_SNAPSHOT_MANIFEST"

if [[ "$BUILDKITE_BRANCH" == "main" ]]; then
echo "--- Trigger agent packer cache pipeline"
node .buildkite/scripts/steps/trigger_packer_cache.js
node .buildkite/scripts/steps/trigger_pipeline.js kibana-agent-packer-cache main
fi
4 changes: 2 additions & 2 deletions .buildkite/scripts/steps/es_snapshots/promote_manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ const { BASE_BUCKET_DAILY, BASE_BUCKET_PERMANENT } = require('./bucket_config');
`
set -euo pipefail
cp manifest.json manifest-latest-verified.json
gsutil cp manifest-latest-verified.json gs://${BASE_BUCKET_DAILY}/${version}/
gsutil -h "Cache-Control:no-cache, max-age=0, no-transform" cp manifest-latest-verified.json gs://${BASE_BUCKET_DAILY}/${version}/
rm manifest.json
cp manifest-permanent.json manifest.json
gsutil -m cp -r gs://${bucket}/* gs://${BASE_BUCKET_PERMANENT}/${version}/
gsutil cp manifest.json gs://${BASE_BUCKET_PERMANENT}/${version}/
gsutil -h "Cache-Control:no-cache, max-age=0, no-transform" cp manifest.json gs://${BASE_BUCKET_PERMANENT}/${version}/
`,
{ shell: '/bin/bash' }
);
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/scripts/steps/functional/security_solution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ set -euo pipefail
source .buildkite/scripts/steps/functional/common.sh

export JOB=kibana-security-solution-chrome
export CLI_NUMBER=$((BUILDKITE_PARALLEL_JOB+1))
export CLI_COUNT=$BUILDKITE_PARALLEL_JOB_COUNT
export CLI_NUMBER=${CLI_NUMBER:-$((BUILDKITE_PARALLEL_JOB+1))}
export CLI_COUNT=${CLI_COUNT:-$BUILDKITE_PARALLEL_JOB_COUNT}

echo "--- Security Solution tests (Chrome)"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@

const { BuildkiteClient } = require('kibana-buildkite-library');

const pipelineSlug = process.argv[2];
const branch = process.argv[3] || 'main';
const commit = process.argv[4] || 'HEAD';

(async () => {
try {
const client = new BuildkiteClient();
const build = await client.triggerBuild('kibana-agent-packer-cache', {
commit: 'HEAD',
branch: 'main',
const build = await client.triggerBuild(pipelineSlug, {
commit,
branch,
ignore_pipeline_branch_filters: true, // Required because of a Buildkite bug
});
console.log(`Triggered build: ${build.web_url}`);
Expand Down
19 changes: 12 additions & 7 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@
#CC# /packages/kbn-expect/ @elastic/kibana-operations
/.buildkite/ @elastic/kibana-operations

# Scalability testing
/packages/kbn-performance-testing-dataset-extractor/ @elastic/kibana-scalability-testing
/packages/kbn-scalability-simulation-generator/ @elastic/kibana-scalability-testing

# Quality Assurance
/src/dev/code_coverage @elastic/kibana-qa
/vars/*Coverage.groovy @elastic/kibana-qa
Expand All @@ -276,6 +280,7 @@
/x-pack/plugins/saved_objects_tagging/ @elastic/kibana-core
/x-pack/test/saved_objects_field_count/ @elastic/kibana-core
/x-pack/test/saved_object_tagging/ @elastic/kibana-core
/packages/core/ @elastic/kibana-core
/packages/analytics/ @elastic/kibana-core
/packages/kbn-config-schema/ @elastic/kibana-core
/packages/kbn-std/ @elastic/kibana-core
Expand All @@ -285,10 +290,6 @@
/packages/kbn-http-tools/ @elastic/kibana-core
/src/plugins/saved_objects_management/ @elastic/kibana-core
/src/dev/run_check_published_api_changes.ts @elastic/kibana-core
/src/plugins/home/public @elastic/kibana-core
/src/plugins/home/server/*.ts @elastic/kibana-core
/src/plugins/home/server/services/ @elastic/kibana-core
/src/plugins/kibana_overview/ @elastic/kibana-core
/src/plugins/advanced_settings/ @elastic/kibana-core
/x-pack/plugins/global_search_bar/ @elastic/kibana-core
/test/analytics @elastic/kibana-core
Expand All @@ -298,9 +299,6 @@
#CC# /x-pack/plugins/features/ @elastic/kibana-core
#CC# /x-pack/plugins/global_search/ @elastic/kibana-core
#CC# /src/plugins/newsfeed @elastic/kibana-core
#CC# /src/plugins/home/public @elastic/kibana-core
#CC# /src/plugins/home/server/services/ @elastic/kibana-core
#CC# /src/plugins/home/ @elastic/kibana-core
#CC# /x-pack/plugins/global_search_providers/ @elastic/kibana-core

# Kibana Docs
Expand Down Expand Up @@ -647,3 +645,10 @@ x-pack/plugins/security_solution/public/kubernetes @elastic/awp-platform
/packages/shared-ux-*/ @elastic/shared-ux
/src/plugins/kibana_react/ @elastic/shared-ux
/src/plugins/kibana_react/public/code_editor @elastic/shared-ux @elastic/kibana-presentation
/src/plugins/home/public @elastic/shared-ux
/src/plugins/home/server/*.ts @elastic/shared-ux
/src/plugins/home/server/services/ @elastic/shared-ux
#CC# /src/plugins/home/public @elastic/shared-ux
#CC# /src/plugins/home/server/services/ @elastic/shared-ux
#CC# /src/plugins/home/ @elastic/shared-ux
/src/plugins/kibana_overview/ @elastic/shared-ux
2 changes: 1 addition & 1 deletion api_docs/actions.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1781,7 +1781,7 @@
},
"<",
"ActionTypeConfig",
">[]>; getOAuthAccessToken: ({ type, options }: Readonly<{} & { type: \"client\" | \"jwt\"; options: Readonly<{} & { tokenUrl: string; config: Readonly<{} & { clientId: string; jwtKeyId: string; userIdentifierValue: string; }>; secrets: Readonly<{ privateKeyPassword?: string | undefined; } & { clientSecret: string; privateKey: string; }>; }> | Readonly<{} & { scope: string; tokenUrl: string; config: Readonly<{} & { clientId: string; tenantId: string; }>; secrets: Readonly<{} & { clientSecret: string; }>; }>; }>, configurationUtilities: ",
">[]>; getOAuthAccessToken: ({ type, options }: Readonly<{} & { type: \"client\" | \"jwt\"; options: Readonly<{} & { config: Readonly<{} & { clientId: string; jwtKeyId: string; userIdentifierValue: string; }>; tokenUrl: string; secrets: Readonly<{ privateKeyPassword?: string | undefined; } & { clientSecret: string; privateKey: string; }>; }> | Readonly<{} & { scope: string; config: Readonly<{} & { clientId: string; tenantId: string; }>; tokenUrl: string; secrets: Readonly<{} & { clientSecret: string; }>; }>; }>, configurationUtilities: ",
"ActionsConfigurationUtilities",
") => Promise<{ accessToken: string | null; }>; enqueueExecution: (options: ",
"ExecuteOptions",
Expand Down
2 changes: 1 addition & 1 deletion api_docs/actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/actions
title: "actions"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the actions plugin
date: 2022-06-07
date: 2022-06-16
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
Expand Down
2 changes: 1 addition & 1 deletion api_docs/advanced_settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/advancedSettings
title: "advancedSettings"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the advancedSettings plugin
date: 2022-06-07
date: 2022-06-16
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
Expand Down
2 changes: 1 addition & 1 deletion api_docs/aiops.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/aiops
title: "aiops"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the aiops plugin
date: 2022-06-07
date: 2022-06-16
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
Expand Down
21 changes: 10 additions & 11 deletions api_docs/alerting.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1487,16 +1487,7 @@
"text": "KibanaRequest"
},
"<unknown, unknown, unknown, any>) => ",
"PublicMethodsOf",
"<",
{
"pluginId": "alerting",
"scope": "server",
"docId": "kibAlertingPluginApi",
"section": "def-server.RulesClient",
"text": "RulesClient"
},
">"
"RulesClientApi"
],
"path": "x-pack/plugins/alerting/server/plugin.ts",
"deprecated": false,
Expand Down Expand Up @@ -2770,7 +2761,15 @@
"label": "BulkEditOperation",
"description": [],
"signature": [
"{ operation: \"delete\" | \"set\" | \"add\"; field: \"tags\"; value: string[]; } | { operation: \"set\" | \"add\"; field: \"actions\"; value: NormalizedAlertAction[]; }"
"{ operation: \"delete\" | \"set\" | \"add\"; field: \"tags\"; value: string[]; } | { operation: \"set\" | \"add\"; field: \"actions\"; value: NormalizedAlertAction[]; } | { operation: \"set\"; field: \"schedule\"; value: ",
{
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertingPluginApi",
"section": "def-common.IntervalSchedule",
"text": "IntervalSchedule"
},
"; } | { operation: \"set\"; field: \"throttle\"; value: string | null; } | { operation: \"set\"; field: \"notifyWhen\"; value: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\" | null; }"
],
"path": "x-pack/plugins/alerting/server/rules_client/rules_client.ts",
"deprecated": false,
Expand Down
4 changes: 2 additions & 2 deletions api_docs/alerting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/alerting
title: "alerting"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the alerting plugin
date: 2022-06-07
date: 2022-06-16
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
Expand All @@ -18,7 +18,7 @@ Contact [Response Ops](https://github.com/orgs/elastic/teams/response-ops) for q

| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
| 359 | 0 | 350 | 19 |
| 359 | 0 | 350 | 20 |

## Client

Expand Down
Loading

0 comments on commit d35a3f3

Please sign in to comment.