Skip to content

Commit

Permalink
Merge branch 'master' into apm-109104-hardcoded-data-streams
Browse files Browse the repository at this point in the history
  • Loading branch information
ogupte committed Oct 7, 2021
2 parents 66953af + b9f0965 commit 82aa5b0
Show file tree
Hide file tree
Showing 895 changed files with 154,567 additions and 25,518 deletions.
21 changes: 21 additions & 0 deletions .buildkite/pull_requests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"jobs": [
{
"repoOwner": "elastic",
"repoName": "kibana",
"pipelineSlug": "kibana-pull-request",

"enabled": true,
"allow_org_users": true,
"allowed_repo_permissions": ["admin", "write"],
"allowed_list": ["barlowm", "renovate[bot]"],
"set_commit_status": true,
"commit_status_context": "kibana-ci",
"build_on_commit": true,
"build_on_comment": true,
"trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))",
"always_trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))",
"labels": ["buildkite-ci"]
}
]
}
2 changes: 0 additions & 2 deletions .buildkite/scripts/build_kibana_plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ node scripts/build_kibana_platform_plugins \
--scan-dir "$KIBANA_DIR/test/interpreter_functional/plugins" \
--scan-dir "$KIBANA_DIR/test/common/fixtures/plugins" \
--scan-dir "$KIBANA_DIR/examples" \
--scan-dir "$KIBANA_DIR/test/plugin_functional/plugins" \
--scan-dir "$KIBANA_DIR/test/common/fixtures/plugins" \
--scan-dir "$XPACK_DIR/test/plugin_functional/plugins" \
--scan-dir "$XPACK_DIR/test/functional_with_es_ssl/fixtures/plugins" \
--scan-dir "$XPACK_DIR/test/alerting_api_integration/plugins" \
Expand Down
4 changes: 4 additions & 0 deletions .buildkite/scripts/lifecycle/post_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

set -euo pipefail

node .buildkite/scripts/lifecycle/print_agent_links.js || true

IS_TEST_EXECUTION_STEP="$(buildkite-agent meta-data get "${BUILDKITE_JOB_ID}_is_test_execution_step" --default '')"

if [[ "$IS_TEST_EXECUTION_STEP" == "true" ]]; then
echo "--- Upload Artifacts"
buildkite-agent artifact upload 'target/junit/**/*'
buildkite-agent artifact upload 'target/kibana-*'
buildkite-agent artifact upload 'target/kibana-coverage/jest/**/*'
Expand All @@ -22,6 +25,7 @@ if [[ "$IS_TEST_EXECUTION_STEP" == "true" ]]; then
buildkite-agent artifact upload 'x-pack/test/functional/failure_debug/html/*.html'
buildkite-agent artifact upload '.es/**/*.hprof'

echo "--- Run Failed Test Reporter"
node scripts/report_failed_tests --build-url="${BUILDKITE_BUILD_URL}#${BUILDKITE_JOB_ID}" 'target/junit/**/*.xml'

if [[ -d 'target/test_failures' ]]; then
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/scripts/lifecycle/pre_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ set -euo pipefail

source .buildkite/scripts/common/util.sh

node .buildkite/scripts/lifecycle/print_agent_links.js
node .buildkite/scripts/lifecycle/print_agent_links.js || true

echo '--- Job Environment Setup'

cd '.buildkite'
yarn install
retry 5 15 yarn install
cd -

BUILDKITE_TOKEN="$(retry 5 5 vault read -field=buildkite_token_all_jobs secret/kibana-issues/dev/buildkite-ci)"
Expand Down
53 changes: 35 additions & 18 deletions .buildkite/scripts/lifecycle/print_agent_links.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,38 @@
const NOW = new Date();
const TWO_HOURS = new Date(NOW.getTime() + 2 * 60 * 60 * 1000);
const { BuildkiteClient } = require('kibana-buildkite-library');

const METRICS_URL = [
`https://kibana-ops-buildkite-monitoring.kb.us-central1.gcp.cloud.es.io:9243`,
`/app/metrics/link-to/host-detail/${process.env.BUILDKITE_AGENT_NAME}`,
`?to=${TWO_HOURS.getTime()}`,
`&from=${NOW.getTime()}`,
].join('');
(async () => {
try {
const client = new BuildkiteClient();
const build = await client.getCurrentBuild();

const LOGS_URL = [
`https://kibana-ops-buildkite-monitoring.kb.us-central1.gcp.cloud.es.io:9243`,
`/app/logs/link-to/host-logs/${process.env.BUILDKITE_AGENT_NAME}`,
`?time=${NOW.getTime()}`,
].join('');
const job = build.jobs.find((j) => j.id === process.env.BUILDKITE_JOB_ID);
const startTime = job ? new Date(job.started_at) : new Date().getTime() - 60 * 60 * 1000;
const twoHours = new Date(startTime.getTime() + 2 * 60 * 60 * 1000);

console.log('--- Agent Debug Links');
console.log('Agent Metrics:');
console.log('\u001b]1339;' + `url='${METRICS_URL}'\u0007`);
console.log('Agent Logs:');
console.log('\u001b]1339;' + `url='${LOGS_URL}'\u0007`);
const METRICS_URL = [
`https://kibana-ops-buildkite-monitoring.kb.us-central1.gcp.cloud.es.io:9243`,
`/app/metrics/link-to/host-detail/${process.env.BUILDKITE_AGENT_NAME}`,
`?to=${twoHours.getTime()}`,
`&from=${startTime.getTime()}`,
].join('');

const LOGS_URL = [
`https://kibana-ops-buildkite-monitoring.kb.us-central1.gcp.cloud.es.io:9243`,
`/app/logs/link-to/host-logs/${process.env.BUILDKITE_AGENT_NAME}`,
`?time=${startTime.getTime()}`,
].join('');

console.log('--- Agent Debug Links');
console.log('Agent Metrics:');
console.log('\u001b]1339;' + `url='${METRICS_URL}'\u0007`);
console.log('Agent Logs:');
console.log('\u001b]1339;' + `url='${LOGS_URL}'\u0007`);
} catch (ex) {
// Probably don't need to fail the build for this failure, just log it
console.error('Buildkite API Error', ex.message);
if (ex.response) {
console.error('HTTP Error Response Status', ex.response.status);
console.error('HTTP Error Response Body', ex.response.data);
}
}
})();
4 changes: 2 additions & 2 deletions api_docs/actions.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: kibActionsPluginApi
slug: /kibana-dev-docs/actionsPluginApi
title: actions
slug: /kibana-dev-docs/api/actions
title: "actions"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the actions plugin
date: 2020-11-16
Expand Down
4 changes: 2 additions & 2 deletions api_docs/advanced_settings.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: kibAdvancedSettingsPluginApi
slug: /kibana-dev-docs/advancedSettingsPluginApi
title: advancedSettings
slug: /kibana-dev-docs/api/advancedSettings
title: "advancedSettings"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the advancedSettings plugin
date: 2020-11-16
Expand Down
61 changes: 55 additions & 6 deletions api_docs/alerting.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@
"text": "Alert"
},
"<never>, \"enabled\" | \"id\" | \"name\" | \"tags\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">) => string | ",
"JsonObject"
{
"pluginId": "@kbn/utility-types",
"scope": "server",
"docId": "kibKbnUtilityTypesPluginApi",
"section": "def-server.JsonObject",
"text": "JsonObject"
}
],
"path": "x-pack/plugins/alerting/public/alert_navigation_registry/types.ts",
"deprecated": false,
Expand Down Expand Up @@ -510,9 +516,21 @@
", filterOpts: ",
"AlertingAuthorizationFilterOpts",
") => Promise<{ filter?: ",
"KueryNode",
{
"pluginId": "@kbn/es-query",
"scope": "common",
"docId": "kibKbnEsQueryPluginApi",
"section": "def-common.KueryNode",
"text": "KueryNode"
},
" | ",
"JsonObject",
{
"pluginId": "@kbn/utility-types",
"scope": "server",
"docId": "kibKbnUtilityTypesPluginApi",
"section": "def-server.JsonObject",
"text": "JsonObject"
},
" | undefined; ensureRuleTypeIsAuthorized: (ruleTypeId: string, consumer: string, auth: string) => void; logSuccessfulAuthorization: () => void; }>"
],
"path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts",
Expand Down Expand Up @@ -590,9 +608,21 @@
"text": "WriteOperations"
},
") => Promise<{ filter?: ",
"KueryNode",
{
"pluginId": "@kbn/es-query",
"scope": "common",
"docId": "kibKbnEsQueryPluginApi",
"section": "def-common.KueryNode",
"text": "KueryNode"
},
" | ",
"JsonObject",
{
"pluginId": "@kbn/utility-types",
"scope": "server",
"docId": "kibKbnUtilityTypesPluginApi",
"section": "def-server.JsonObject",
"text": "JsonObject"
},
" | undefined; ensureRuleTypeIsAuthorized: (ruleTypeId: string, consumer: string, auth: string) => void; logSuccessfulAuthorization: () => void; }>"
],
"path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts",
Expand Down Expand Up @@ -1537,6 +1567,19 @@
"description": [],
"path": "x-pack/plugins/alerting/server/types.ts",
"deprecated": false
},
{
"parentPluginId": "alerting",
"id": "def-server.AlertType.ruleTaskTimeout",
"type": "string",
"tags": [],
"label": "ruleTaskTimeout",
"description": [],
"signature": [
"string | undefined"
],
"path": "x-pack/plugins/alerting/server/types.ts",
"deprecated": false
}
],
"initialIsOpen": false
Expand Down Expand Up @@ -3390,7 +3433,13 @@
"label": "state",
"description": [],
"signature": [
"JsonObject"
{
"pluginId": "@kbn/utility-types",
"scope": "server",
"docId": "kibKbnUtilityTypesPluginApi",
"section": "def-server.JsonObject",
"text": "JsonObject"
}
],
"path": "x-pack/plugins/alerting/common/alert_navigation.ts",
"deprecated": false
Expand Down
6 changes: 3 additions & 3 deletions api_docs/alerting.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: kibAlertingPluginApi
slug: /kibana-dev-docs/alertingPluginApi
title: alerting
slug: /kibana-dev-docs/api/alerting
title: "alerting"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the alerting plugin
date: 2020-11-16
Expand All @@ -18,7 +18,7 @@ Contact [Kibana Alerting](https://github.com/orgs/elastic/teams/kibana-alerting-

| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
| 248 | 0 | 240 | 17 |
| 249 | 0 | 241 | 17 |

## Client

Expand Down
Loading

0 comments on commit 82aa5b0

Please sign in to comment.