Skip to content

Commit

Permalink
Merge branch 'master' into alert-status-refresh-pt2
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Oct 11, 2021
2 parents b570bb0 + b03237a commit 8c03277
Show file tree
Hide file tree
Showing 1,503 changed files with 178,894 additions and 31,428 deletions.
11 changes: 6 additions & 5 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
# Import shared settings first so we can override below
import %workspace%/.bazelrc.common

## Disabled for now
# Remote cache settings for local env
# build --remote_cache=https://storage.googleapis.com/kibana-bazel-cache
# build --incompatible_remote_results_ignore_disk=true
# build --remote_accept_cached=true
# build --remote_upload_local_results=false
build --remote_cache=grpcs://cloud.buildbuddy.io
build --incompatible_remote_results_ignore_disk=true
build --noremote_upload_local_results
build --remote_timeout=30
build --remote_header=x-buildbuddy-api-key=3EYk49W2NefOx2n3yMze
build --remote_accept_cached=true

# BuildBuddy
## Metadata settings
Expand Down
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
Empty file modified .buildkite/scripts/common/setup_bazel.sh
100644 → 100755
Empty file.
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
5 changes: 2 additions & 3 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 Expand Up @@ -89,7 +89,6 @@ if [[ "${SKIP_CI_SETUP:-}" != "true" ]]; then
if [[ -d .buildkite/scripts && "${BUILDKITE_COMMAND:-}" != "buildkite-agent pipeline upload"* ]]; then
source .buildkite/scripts/common/env.sh
source .buildkite/scripts/common/setup_node.sh
source .buildkite/scripts/common/setup_bazel.sh
fi
fi

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);
}
}
})();
3 changes: 3 additions & 0 deletions .buildkite/scripts/steps/on_merge_build_and_metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -euo pipefail

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

.buildkite/scripts/bootstrap.sh
.buildkite/scripts/build_kibana.sh
.buildkite/scripts/post_build_kibana.sh
Expand Down
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1595,7 +1595,6 @@ module.exports = {
*/
{
files: [
'src/plugins/security_oss/**/*.{js,mjs,ts,tsx}',
'src/plugins/interactive_setup/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/encrypted_saved_objects/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/security/**/*.{js,mjs,ts,tsx}',
Expand Down
3 changes: 1 addition & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
/src/plugins/visualize/ @elastic/kibana-vis-editors
/src/plugins/visualizations/ @elastic/kibana-vis-editors
/src/plugins/chart_expressions/expression_tagcloud/ @elastic/kibana-vis-editors
/src/plugins/chart_expressions/expression_metric/ @elastic/kibana-vis-editors
/src/plugins/url_forwarding/ @elastic/kibana-vis-editors
/packages/kbn-tinymath/ @elastic/kibana-vis-editors
/x-pack/test/functional/apps/lens @elastic/kibana-vis-editors
Expand Down Expand Up @@ -287,9 +288,7 @@

# Security
/src/core/server/csp/ @elastic/kibana-security @elastic/kibana-core
/src/plugins/security_oss/ @elastic/kibana-security
/src/plugins/interactive_setup/ @elastic/kibana-security
/test/security_functional/ @elastic/kibana-security
/x-pack/plugins/spaces/ @elastic/kibana-security
/x-pack/plugins/encrypted_saved_objects/ @elastic/kibana-security
/x-pack/plugins/security/ @elastic/kibana-security
Expand Down
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"expressionRevealImage": "src/plugins/expression_reveal_image",
"expressionShape": "src/plugins/expression_shape",
"expressionTagcloud": "src/plugins/chart_expressions/expression_tagcloud",
"expressionMetricVis": "src/plugins/chart_expressions/expression_metric",
"inputControl": "src/plugins/input_control_vis",
"inspector": "src/plugins/inspector",
"inspectorViews": "src/legacy/core_plugins/inspector_views",
Expand All @@ -55,7 +56,6 @@
"newsfeed": "src/plugins/newsfeed",
"savedObjects": "src/plugins/saved_objects",
"savedObjectsManagement": "src/plugins/saved_objects_management",
"security": "src/plugins/security_oss",
"server": "src/legacy/server",
"statusPage": "src/legacy/core_plugins/status_page",
"telemetry": ["src/plugins/telemetry", "src/plugins/telemetry_management_section"],
Expand Down
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 8c03277

Please sign in to comment.