Skip to content

Commit

Permalink
Merge branch 'main' into search-sessions-stabilization-stage-1
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jul 25, 2022
2 parents 4503157 + 0c97516 commit c7c2ff3
Show file tree
Hide file tree
Showing 2,892 changed files with 76,446 additions and 42,991 deletions.
1 change: 1 addition & 0 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ enabled:
- x-pack/test/security_api_integration/session_invalidate.config.ts
- x-pack/test/security_api_integration/session_lifespan.config.ts
- x-pack/test/security_api_integration/token.config.ts
- x-pack/test/security_api_integration/user_profiles.config.ts
- x-pack/test/security_functional/login_selector.config.ts
- x-pack/test/security_functional/oidc.config.ts
- x-pack/test/security_functional/saml.config.ts
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/pipelines/on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ steps:
- command: .buildkite/scripts/steps/lint.sh
label: 'Linting'
agents:
queue: n2-2-spot
queue: n2-8-spot
key: linting
timeout_in_minutes: 90
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
Expand Down
8 changes: 6 additions & 2 deletions .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ steps:
- command: .buildkite/scripts/steps/lint.sh
label: 'Linting'
agents:
queue: n2-2
queue: n2-8-spot
key: linting
timeout_in_minutes: 90
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/lint_with_types.sh
label: 'Linting (with types)'
Expand Down
13 changes: 13 additions & 0 deletions .buildkite/pipelines/purge_cloud_deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
steps:
- block: "Purge deployment"
prompt: "Fill out the details to shutdown a PR deployment"
fields:
- text: "Pull Request Number"
key: "kibana-pull-request"
if: "build.env('KIBANA_PULL_REQUEST') == null || build.env('KIBANA_PULL_REQUEST') == ''"

- command: .buildkite/scripts/steps/cloud/purge_deployment.sh
label: Purge a cloud deployment
timeout_in_minutes: 10
agents:
queue: kibana-default
2 changes: 1 addition & 1 deletion .buildkite/pipelines/purge_cloud_deployments.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
steps:
- command: .buildkite/scripts/steps/cloud/purge.sh
- command: .buildkite/scripts/steps/cloud/purge_deployments.sh
label: Purge old cloud deployments
timeout_in_minutes: 10
agents:
Expand Down
10 changes: 6 additions & 4 deletions .buildkite/pull_requests.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@
"^src/dev/prs/kibana_qa_pr_list\\.json$",
"^\\.buildkite/pull_requests\\.json$"
],
"always_require_ci_on_changed": [
"^docs/developer/plugin-list.asciidoc$"
],
"kibana_versions_check": true
"always_require_ci_on_changed": ["^docs/developer/plugin-list.asciidoc$"],
"kibana_versions_check": true,
"kibana_build_reuse": true,
"kibana_build_reuse_pipeline_slugs": ["kibana-pull-request", "kibana-on-merge"],
"kibana_build_reuse_regexes": ["^test/", "^x-pack/test/"],
"kibana_build_reuse_label": "ci:reuse-kibana-build"
}
]
}
5 changes: 0 additions & 5 deletions .buildkite/scripts/steps/cloud/purge.sh

This file was deleted.

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

set -euo pipefail

ts-node .buildkite/scripts/steps/cloud/purge_deployment.ts
35 changes: 35 additions & 0 deletions .buildkite/scripts/steps/cloud/purge_deployment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import { execSync } from 'child_process';

const deploymentsListJson = execSync('ecctl deployment list --output json').toString();
const { deployments } = JSON.parse(deploymentsListJson);

const prNumber = parseInt(
process.env.KIBANA_PULL_REQUEST ||
execSync('buildkite-agent meta-data get kibana-pull-request').toString(),
10
);
const deploymentName = `kibana-pr-${prNumber}`;
const deployment = deployments.find((d: any) => d.name === deploymentName);

if (!prNumber || !deployment) {
console.error(`${deploymentName} not found`);
process.exit(1);
}

console.log(`Scheduling deployment for deletion: ${deployment.name} / ${deployment.id}`);
try {
execSync(`ecctl deployment shutdown --force '${deployment.id}'`, { stdio: 'inherit' });
execSync(`vault delete secret/kibana-issues/dev/cloud-deploy/${deployment.name}`, {
stdio: 'inherit',
});
} catch (ex) {
console.error(ex.toString());
}
5 changes: 5 additions & 0 deletions .buildkite/scripts/steps/cloud/purge_deployments.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -euo pipefail

ts-node .buildkite/scripts/steps/cloud/purge_deployments.ts
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ for i in "${scalabilityJourneys[@]}"; do
--buildId "${BUILD_ID}" \
--es-url "${ES_SERVER_URL}" \
--es-username "${USER_FROM_VAULT}" \
--es-password "${PASS_FROM_VAULT}"
--es-password "${PASS_FROM_VAULT}" \
--without-static-resources
done

echo "--- Upload Kibana build, plugins and scalability traces to the public bucket"
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/scripts/steps/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ echo '--- Lint: eslint'
# after possibly commiting fixed files to the repo
set +e;
if is_pr && ! is_auto_commit_disabled; then
node scripts/eslint --no-cache --fix
git ls-files | grep -E '\.(js|mjs|ts|tsx)$' | xargs -n 250 -P 6 node scripts/eslint --no-cache --fix
else
node scripts/eslint --no-cache
git ls-files | grep -E '\.(js|mjs|ts|tsx)$' | xargs -n 250 -P 6 node scripts/eslint --no-cache
fi

eslint_exit=$?
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ module.exports = {
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': [
'error',
{ additionalHooks: '^(useFetcher|useProgressiveFetcher)$' },
{ additionalHooks: '^(useFetcher|useProgressiveFetcher|useBreadcrumb)$' },
],
},
},
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
pull_request_target:
branches: ["main"]
types: ["labeled", "closed"]
branches: ['main']
types: ['labeled', 'closed']

jobs:
backport:
Expand All @@ -16,7 +16,7 @@ jobs:
)
steps:
- name: Backport Action
uses: sqren/backport-github-action@v8.8.0
uses: sqren/backport-github-action@v8.9.2
with:
github_token: ${{secrets.KIBANAMACHINE_TOKEN}}

Expand Down
2 changes: 1 addition & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins:
- stylelint-scss
customSyntax: postcss-scss
rules:
color-no-invalid-hex: true
function-calc-no-invalid: true
string-no-newline: true
unit-no-unknown: true
property-no-unknown:
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-07-19
date: 2022-07-25
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-07-19
date: 2022-07-25
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
6 changes: 3 additions & 3 deletions api_docs/aiops.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"tags": [],
"label": "ExplainLogRateSpikes",
"description": [
"\nLazy-wrapped ExplainLogRateSpikesWrapper React component"
"\nLazy-wrapped ExplainLogRateSpikesAppState React component"
],
"signature": [
"(props: React.PropsWithChildren<",
"ExplainLogRateSpikesWrapperProps",
"ExplainLogRateSpikesAppStateProps",
">) => JSX.Element"
],
"path": "x-pack/plugins/aiops/public/shared_lazy_components.tsx",
Expand All @@ -31,7 +31,7 @@
],
"signature": [
"React.PropsWithChildren<",
"ExplainLogRateSpikesWrapperProps",
"ExplainLogRateSpikesAppStateProps",
">"
],
"path": "x-pack/plugins/aiops/public/shared_lazy_components.tsx",
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-07-19
date: 2022-07-25
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
99 changes: 58 additions & 41 deletions api_docs/alerting.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"section": "def-common.RuleSnooze",
"text": "RuleSnooze"
},
" | undefined; isSnoozedUntil?: Date | null | undefined; }"
" | undefined; activeSnoozes?: string[] | undefined; isSnoozedUntil?: Date | null | undefined; }"
],
"path": "x-pack/plugins/alerting/public/alert_navigation_registry/types.ts",
"deprecated": false
Expand Down Expand Up @@ -2215,13 +2215,7 @@
"label": "scopedClusterClient",
"description": [],
"signature": [
{
"pluginId": "core",
"scope": "server",
"docId": "kibCorePluginApi",
"section": "def-server.IScopedClusterClient",
"text": "IScopedClusterClient"
}
"IScopedClusterClient"
],
"path": "x-pack/plugins/alerting/server/types.ts",
"deprecated": false
Expand Down Expand Up @@ -2929,9 +2923,9 @@
"section": "def-common.RuleTypeParams",
"text": "RuleTypeParams"
},
" = never>({ options: { fields, ...options }, excludeFromPublicApi, }?: { options?: ",
" = never>({ options: { fields, ...options }, excludeFromPublicApi, includeSnoozeData, }?: { options?: ",
"FindOptions",
" | undefined; excludeFromPublicApi?: boolean | undefined; }) => Promise<",
" | undefined; excludeFromPublicApi?: boolean | undefined; includeSnoozeData?: boolean | undefined; }) => Promise<",
{
"pluginId": "alerting",
"scope": "server",
Expand Down Expand Up @@ -3008,8 +3002,18 @@
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertingPluginApi",
"section": "def-common.IExecutionLogWithErrorsResult",
"text": "IExecutionLogWithErrorsResult"
"section": "def-common.IExecutionLogResult",
"text": "IExecutionLogResult"
},
">; getActionErrorLog: ({ id, dateStart, dateEnd, filter, page, perPage, sort, }: ",
"GetActionErrorLogByIdParams",
") => Promise<",
{
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertingPluginApi",
"section": "def-common.IExecutionErrorsResult",
"text": "IExecutionErrorsResult"
},
">; bulkEdit: <Params extends ",
{
Expand Down Expand Up @@ -4913,6 +4917,19 @@
"path": "x-pack/plugins/alerting/common/rule.ts",
"deprecated": false
},
{
"parentPluginId": "alerting",
"id": "def-common.Rule.activeSnoozes",
"type": "Array",
"tags": [],
"label": "activeSnoozes",
"description": [],
"signature": [
"string[] | undefined"
],
"path": "x-pack/plugins/alerting/common/rule.ts",
"deprecated": false
},
{
"parentPluginId": "alerting",
"id": "def-common.Rule.isSnoozedUntil",
Expand Down Expand Up @@ -5627,6 +5644,34 @@
}
],
"misc": [
{
"parentPluginId": "alerting",
"id": "def-common.actionErrorLogSortableColumns",
"type": "Array",
"tags": [],
"label": "actionErrorLogSortableColumns",
"description": [],
"signature": [
"string[]"
],
"path": "x-pack/plugins/alerting/common/execution_log_types.ts",
"deprecated": false,
"initialIsOpen": false
},
{
"parentPluginId": "alerting",
"id": "def-common.ActionErrorLogSortFields",
"type": "Type",
"tags": [],
"label": "ActionErrorLogSortFields",
"description": [],
"signature": [
"string"
],
"path": "x-pack/plugins/alerting/common/execution_log_types.ts",
"deprecated": false,
"initialIsOpen": false
},
{
"parentPluginId": "alerting",
"id": "def-common.ActionGroupIdsOf",
Expand Down Expand Up @@ -5769,34 +5814,6 @@
"deprecated": false,
"initialIsOpen": false
},
{
"parentPluginId": "alerting",
"id": "def-common.IExecutionLogWithErrorsResult",
"type": "Type",
"tags": [],
"label": "IExecutionLogWithErrorsResult",
"description": [],
"signature": [
{
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertingPluginApi",
"section": "def-common.IExecutionLogResult",
"text": "IExecutionLogResult"
},
" & ",
{
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertingPluginApi",
"section": "def-common.IExecutionErrorsResult",
"text": "IExecutionErrorsResult"
}
],
"path": "x-pack/plugins/alerting/common/execution_log_types.ts",
"deprecated": false,
"initialIsOpen": false
},
{
"parentPluginId": "alerting",
"id": "def-common.INTERNAL_BASE_ALERTING_API_PATH",
Expand Down Expand Up @@ -6170,7 +6187,7 @@
"section": "def-common.RuleSnooze",
"text": "RuleSnooze"
},
" | undefined; isSnoozedUntil?: Date | null | undefined; }"
" | undefined; activeSnoozes?: string[] | undefined; isSnoozedUntil?: Date | null | undefined; }"
],
"path": "x-pack/plugins/alerting/common/rule.ts",
"deprecated": false,
Expand Down
Loading

0 comments on commit c7c2ff3

Please sign in to comment.