Skip to content

Commit

Permalink
Merge branch 'main' into controls/fatalErrorHandling
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine committed Jun 15, 2022
2 parents 2a39ec5 + 89de75d commit 129f9dc
Show file tree
Hide file tree
Showing 1,092 changed files with 23,505 additions and 12,542 deletions.
13 changes: 13 additions & 0 deletions .buildkite/pipelines/build_api_docs.yml
@@ -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
16 changes: 15 additions & 1 deletion .buildkite/pipelines/on_merge.yml
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
7 changes: 4 additions & 3 deletions .buildkite/pull_requests.json
Expand Up @@ -28,15 +28,16 @@
"^\\.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
}
]
}
3 changes: 3 additions & 0 deletions .buildkite/scripts/lifecycle/pre_command.sh
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
16 changes: 8 additions & 8 deletions .buildkite/scripts/steps/artifacts/cloud.sh
Expand Up @@ -56,8 +56,8 @@ CLOUD_DEPLOYMENT_PASSWORD=$(jq -r --slurp '.[]|select(.resources).resources[] |
CLOUD_DEPLOYMENT_ID=$(jq -r --slurp '.[0].id' "$LOGS")
CLOUD_DEPLOYMENT_STATUS_MESSAGES=$(jq --slurp '[.[]|select(.resources == null)]' "$LOGS")

CLOUD_DEPLOYMENT_KIBANA_URL=$(ecctl deployment show "$CLOUD_DEPLOYMENT_ID" | jq -r '.resources.kibana[0].info.metadata.aliased_url')
CLOUD_DEPLOYMENT_ELASTICSEARCH_URL=$(ecctl deployment show "$CLOUD_DEPLOYMENT_ID" | jq -r '.resources.elasticsearch[0].info.metadata.aliased_url')
export CLOUD_DEPLOYMENT_KIBANA_URL=$(ecctl deployment show "$CLOUD_DEPLOYMENT_ID" | jq -r '.resources.kibana[0].info.metadata.aliased_url')
export CLOUD_DEPLOYMENT_ELASTICSEARCH_URL=$(ecctl deployment show "$CLOUD_DEPLOYMENT_ID" | jq -r '.resources.elasticsearch[0].info.metadata.aliased_url')

echo "Kibana: $CLOUD_DEPLOYMENT_KIBANA_URL"
echo "ES: $CLOUD_DEPLOYMENT_ELASTICSEARCH_URL"
Expand All @@ -68,15 +68,15 @@ function shutdown {
}
trap "shutdown" EXIT

export TEST_KIBANA_PROTOCOL=$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_KIBANA_URL').protocol.replace(':', ''))")
export TEST_KIBANA_HOSTNAME=$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_KIBANA_URL').hostname)")
export TEST_KIBANA_PORT=$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_KIBANA_URL').port)")
export TEST_KIBANA_PROTOCOL=$(node -e "console.log(new URL(process.env.CLOUD_DEPLOYMENT_KIBANA_URL).protocol.replace(':', ''))")
export TEST_KIBANA_HOSTNAME=$(node -e "console.log(new URL(process.env.CLOUD_DEPLOYMENT_KIBANA_URL).hostname)")
export TEST_KIBANA_PORT=$(node -e "console.log(new URL(process.env.CLOUD_DEPLOYMENT_KIBANA_URL).port || 443)")
export TEST_KIBANA_USERNAME="$CLOUD_DEPLOYMENT_USERNAME"
export TEST_KIBANA_PASSWORD="$CLOUD_DEPLOYMENT_PASSWORD"

export TEST_ES_PROTOCOL=$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_ELASTICSEARCH_URL').protocol.replace(':', ''))")
export TEST_ES_HOSTNAME=$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_ELASTICSEARCH_URL').hostname)")
export TEST_ES_PORT=$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_ELASTICSEARCH_URL').port)")
export TEST_ES_PROTOCOL=$(node -e "console.log(new URL(process.env.CLOUD_DEPLOYMENT_ELASTICSEARCH_URL).protocol.replace(':', ''))")
export TEST_ES_HOSTNAME=$(node -e "console.log(new URL(process.env.CLOUD_DEPLOYMENT_ELASTICSEARCH_URL).hostname)")
export TEST_ES_PORT=$(node -e "console.log(new URL(process.env.CLOUD_DEPLOYMENT_ELASTICSEARCH_URL).port || 443)")
export TEST_ES_USERNAME="$CLOUD_DEPLOYMENT_USERNAME"
export TEST_ES_PASSWORD="$CLOUD_DEPLOYMENT_PASSWORD"

Expand Down
21 changes: 21 additions & 0 deletions .buildkite/scripts/steps/build_api_docs.sh
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 '42973632+kibanamachine@users.noreply.github.com'

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/promote.sh
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
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 …
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
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
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-15
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
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-15
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
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-15
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
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
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-15
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

0 comments on commit 129f9dc

Please sign in to comment.