Skip to content

Commit

Permalink
Merge branch 'main' into fix-control-styling_2024-01-17
Browse files Browse the repository at this point in the history
  • Loading branch information
Heenawter authored Jan 22, 2024
2 parents 286f1a1 + 6871387 commit 5f4a38b
Show file tree
Hide file tree
Showing 932 changed files with 21,447 additions and 4,407 deletions.
5 changes: 4 additions & 1 deletion .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ enabled:
- x-pack/test_serverless/api_integration/test_suites/security/common_configs/config.group1.ts
- x-pack/test_serverless/functional/test_suites/observability/config.ts
- x-pack/test_serverless/functional/test_suites/observability/config.examples.ts
- x-pack/test_serverless/functional/test_suites/observability/config.saved_objects_management.ts
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group1.ts
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group2.ts
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group3.ts
Expand All @@ -426,6 +427,7 @@ enabled:
- x-pack/test_serverless/functional/test_suites/search/config.ts
- x-pack/test_serverless/functional/test_suites/search/config.examples.ts
- x-pack/test_serverless/functional/test_suites/search/config.screenshots.ts
- x-pack/test_serverless/functional/test_suites/search/config.saved_objects_management.ts
- x-pack/test_serverless/functional/test_suites/search/common_configs/config.group1.ts
- x-pack/test_serverless/functional/test_suites/search/common_configs/config.group2.ts
- x-pack/test_serverless/functional/test_suites/search/common_configs/config.group3.ts
Expand All @@ -435,6 +437,7 @@ enabled:
- x-pack/test_serverless/functional/test_suites/security/config.ts
- x-pack/test_serverless/functional/test_suites/security/config.examples.ts
- x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.ts
- x-pack/test_serverless/functional/test_suites/security/config.saved_objects_management.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group2.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group3.ts
Expand Down Expand Up @@ -516,4 +519,4 @@ enabled:
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_read/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_read/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_bulk_actions/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_bulk_actions/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_bulk_actions/configs/serverless.config.ts
30 changes: 22 additions & 8 deletions .buildkite/scripts/common/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,23 @@ download_artifact() {
retry 3 1 timeout 3m buildkite-agent artifact download "$@"
}

# TODO: remove after https://github.com/elastic/kibana-operations/issues/15 is done
if [[ "$VAULT_ADDR" == *"secrets.elastic.co"* ]]; then
VAULT_PATH_PREFIX="secret/kibana-issues/dev"
VAULT_KV_PREFIX="secret/kibana-issues/dev"
IS_LEGACY_VAULT_ADDR=true
else
VAULT_PATH_PREFIX="secret/ci/elastic-kibana"
VAULT_KV_PREFIX="kv/ci-shared/kibana-deployments"
IS_LEGACY_VAULT_ADDR=false
fi
export IS_LEGACY_VAULT_ADDR

vault_get() {
key_path=$1
field=$2

fullPath="secret/ci/elastic-kibana/$key_path"
if [[ "$VAULT_ADDR" == *"secrets.elastic.co"* ]]; then
fullPath="secret/kibana-issues/dev/$key_path"
fi
fullPath="$VAULT_PATH_PREFIX/$key_path"

if [[ -z "${2:-}" || "${2:-}" =~ ^-.* ]]; then
retry 5 5 vault read "$fullPath" "${@:2}"
Expand All @@ -193,11 +201,17 @@ vault_set() {
shift
fields=("$@")

fullPath="secret/ci/elastic-kibana/$key_path"
if [[ "$VAULT_ADDR" == *"secrets.elastic.co"* ]]; then
fullPath="secret/kibana-issues/dev/$key_path"
fi

fullPath="$VAULT_PATH_PREFIX/$key_path"

# shellcheck disable=SC2068
retry 5 5 vault write "$fullPath" ${fields[@]}
}

vault_kv_set() {
kv_path=$1
shift
fields=("$@")

vault kv put "$VAULT_KV_PREFIX/$kv_path" "${fields[@]}"
}
17 changes: 3 additions & 14 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,20 +300,9 @@ const uploadPipeline = (pipelineContent: string | object) => {
}

if (
(await doAnyChangesMatch([
/^src\/plugins\/controls/,
/^packages\/kbn-securitysolution-.*/,
/^x-pack\/plugins\/lists/,
/^x-pack\/plugins\/security_solution/,
/^x-pack\/plugins\/timelines/,
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/sections\/action_connector_form/,
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/sections\/alerts_table/,
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/context\/connectors_context\.tsx/,
/^x-pack\/test\/defend_workflows_cypress/,
/^x-pack\/test\/security_solution_cypress/,
/^fleet_packages\.json/, // It contains reference to prebuilt detection rules, we want to run security solution tests if it changes
])) ||
GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
((await doAnyChangesMatch([/^x-pack\/plugins\/osquery/, /^x-pack\/test\/osquery_cypress/])) ||
GITHUB_PR_LABELS.includes('ci:all-cypress-suites')) &&
!GITHUB_PR_LABELS.includes('ci:skip-cypress-osquery')
) {
pipeline.push(
getPipeline('.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml')
Expand Down
17 changes: 12 additions & 5 deletions .buildkite/scripts/steps/cloud/build_and_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ if [ -z "${CLOUD_DEPLOYMENT_ID}" ] || [ "${CLOUD_DEPLOYMENT_ID}" = 'null' ]; the
VAULT_SECRET_ID="$(retry 5 15 gcloud secrets versions access latest --secret=kibana-buildkite-vault-secret-id)"
VAULT_TOKEN=$(retry 5 30 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID")
retry 5 30 vault login -no-print "$VAULT_TOKEN"
vault_set "cloud-deploy/$CLOUD_DEPLOYMENT_NAME" username="$CLOUD_DEPLOYMENT_USERNAME" password="$CLOUD_DEPLOYMENT_PASSWORD"

# TODO: remove after https://github.com/elastic/kibana-operations/issues/15 is done
if [[ "$IS_LEGACY_VAULT_ADDR" == "true" ]]; then
vault_set "cloud-deploy/$CLOUD_DEPLOYMENT_NAME" username="$CLOUD_DEPLOYMENT_USERNAME" password="$CLOUD_DEPLOYMENT_PASSWORD"
else
vault_kv_set "cloud-deploy/$CLOUD_DEPLOYMENT_NAME" username="$CLOUD_DEPLOYMENT_USERNAME" password="$CLOUD_DEPLOYMENT_PASSWORD"
fi

echo "Enabling Stack Monitoring..."
jq '
Expand Down Expand Up @@ -121,10 +127,11 @@ fi
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')

if [[ "$VAULT_ADDR" == *"secrets.elastic.co"* ]]; then
VAULT_PATH_PREFIX="secret/kibana-issues/dev"
# TODO: remove after https://github.com/elastic/kibana-operations/issues/15 is done
if [[ "$IS_LEGACY_VAULT_ADDR" == "true" ]]; then
VAULT_READ_COMMAND="vault read $VAULT_PATH_PREFIX/cloud-deploy/$CLOUD_DEPLOYMENT_NAME"
else
VAULT_PATH_PREFIX="secret/ci/elastic-kibana"
VAULT_READ_COMMAND="vault kv get $VAULT_KV_PREFIX/cloud-deploy/$CLOUD_DEPLOYMENT_NAME"
fi

cat << EOF | buildkite-agent annotate --style "info" --context cloud
Expand All @@ -134,7 +141,7 @@ cat << EOF | buildkite-agent annotate --style "info" --context cloud
Elasticsearch: $CLOUD_DEPLOYMENT_ELASTICSEARCH_URL
Credentials: \`vault read $VAULT_PATH_PREFIX/cloud-deploy/$CLOUD_DEPLOYMENT_NAME\`
Credentials: \`$VAULT_READ_COMMAND\`
Kibana image: \`$KIBANA_CLOUD_IMAGE\`
Expand Down
3 changes: 3 additions & 0 deletions .buildkite/scripts/steps/package_testing/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ set -euo pipefail
source "$(dirname "$0")/../../common/util.sh"
.buildkite/scripts/bootstrap.sh

# temporary adding this to get screenshots
is_test_execution_step

echo "--- Package Testing for $TEST_PACKAGE"

mkdir -p target
Expand Down
18 changes: 13 additions & 5 deletions .buildkite/scripts/steps/serverless/build_and_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,14 @@ deploy() {
VAULT_SECRET_ID="$(retry 5 15 gcloud secrets versions access latest --secret=kibana-buildkite-vault-secret-id)"
VAULT_TOKEN=$(retry 5 30 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID")
retry 5 30 vault login -no-print "$VAULT_TOKEN"
vault_set "cloud-deploy/$PROJECT_NAME" username="$PROJECT_USERNAME" password="$PROJECT_PASSWORD" id="$PROJECT_ID"

# TODO: remove after https://github.com/elastic/kibana-operations/issues/15 is done
if [[ "$IS_LEGACY_VAULT_ADDR" == "true" ]]; then
vault_set "cloud-deploy/$PROJECT_NAME" username="$PROJECT_USERNAME" password="$PROJECT_PASSWORD" id="$PROJECT_ID"
else
vault_kv_set "cloud-deploy/$PROJECT_NAME" username="$PROJECT_USERNAME" password="$PROJECT_PASSWORD" id="$PROJECT_ID"
fi

else
echo "Updating project..."
curl -s \
Expand All @@ -91,10 +98,11 @@ deploy() {
PROJECT_KIBANA_LOGIN_URL="${PROJECT_KIBANA_URL}/login"
PROJECT_ELASTICSEARCH_URL=$(jq -r --slurp '.[1].endpoints.elasticsearch' $DEPLOY_LOGS)

if [[ "$VAULT_ADDR" == *"secrets.elastic.co"* ]]; then
VAULT_PATH_PREFIX="secret/kibana-issues/dev"
# TODO: remove after https://github.com/elastic/kibana-operations/issues/15 is done
if [[ "$IS_LEGACY_VAULT_ADDR" == "true" ]]; then
VAULT_READ_COMMAND="vault read $VAULT_PATH_PREFIX/cloud-deploy/$PROJECT_NAME"
else
VAULT_PATH_PREFIX="secret/ci/elastic-kibana"
VAULT_READ_COMMAND="vault kv get $VAULT_KV_PREFIX/cloud-deploy/$PROJECT_NAME"
fi

cat << EOF | buildkite-agent annotate --style "info" --context "project-$PROJECT_TYPE"
Expand All @@ -104,7 +112,7 @@ Kibana: $PROJECT_KIBANA_LOGIN_URL
Elasticsearch: $PROJECT_ELASTICSEARCH_URL
Credentials: \`vault read $VAULT_PATH_PREFIX/cloud-deploy/$PROJECT_NAME\`
Credentials: \`$VAULT_READ_COMMAND\`
Kibana image: \`$KIBANA_IMAGE\`
EOF
Expand Down
2 changes: 1 addition & 1 deletion api_docs/actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions
title: "actions"
image: https://source.unsplash.com/400x175/?github
description: API docs for the actions plugin
date: 2024-01-17
date: 2024-01-22
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
---
import actionsObj from './actions.devdocs.json';
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 @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings
title: "advancedSettings"
image: https://source.unsplash.com/400x175/?github
description: API docs for the advancedSettings plugin
date: 2024-01-17
date: 2024-01-22
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings']
---
import advancedSettingsObj from './advanced_settings.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/ai_assistant_management_observability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiAssistantManagementObservability
title: "aiAssistantManagementObservability"
image: https://source.unsplash.com/400x175/?github
description: API docs for the aiAssistantManagementObservability plugin
date: 2024-01-17
date: 2024-01-22
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementObservability']
---
import aiAssistantManagementObservabilityObj from './ai_assistant_management_observability.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/ai_assistant_management_selection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiAssistantManagementSelection
title: "aiAssistantManagementSelection"
image: https://source.unsplash.com/400x175/?github
description: API docs for the aiAssistantManagementSelection plugin
date: 2024-01-17
date: 2024-01-22
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementSelection']
---
import aiAssistantManagementSelectionObj from './ai_assistant_management_selection.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/aiops.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops
title: "aiops"
image: https://source.unsplash.com/400x175/?github
description: API docs for the aiops plugin
date: 2024-01-17
date: 2024-01-22
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
---
import aiopsObj from './aiops.devdocs.json';
Expand Down
14 changes: 7 additions & 7 deletions api_docs/alerting.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2822,7 +2822,7 @@
"label": "actions",
"description": [],
"signature": [
"Readonly<{ frequency?: Readonly<{} & { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; }> | undefined; alertsFilter?: Readonly<{ query?: Readonly<{ dsl?: string | undefined; } & { kql: string; filters: Readonly<{ query?: Record<string, any> | undefined; $state?: Readonly<{} & { store: \"appState\" | \"globalState\"; }> | undefined; } & { meta: Record<string, any>; }>[]; }> | undefined; timeframe?: Readonly<{} & { days: (2 | 7 | 6 | 5 | 4 | 3 | 1)[]; hours: Readonly<{} & { start: string; end: string; }>; timezone: string; }> | undefined; } & {}> | undefined; uuid?: string | undefined; useAlertDataForTemplate?: boolean | undefined; } & { id: string; params: Record<string, any>; actionTypeId: string; group: string; }>[]"
"Readonly<{ frequency?: Readonly<{} & { summary: boolean; throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; }> | undefined; alertsFilter?: Readonly<{ query?: Readonly<{ dsl?: string | undefined; } & { kql: string; filters: Readonly<{ query?: Record<string, any> | undefined; $state?: Readonly<{} & { store: \"appState\" | \"globalState\"; }> | undefined; } & { meta: Record<string, any>; }>[]; }> | undefined; timeframe?: Readonly<{} & { days: (2 | 7 | 6 | 5 | 4 | 3 | 1)[]; hours: Readonly<{} & { start: string; end: string; }>; timezone: string; }> | undefined; } & {}> | undefined; uuid?: string | undefined; useAlertDataForTemplate?: boolean | undefined; } & { id: string; params: Record<string, any>; actionTypeId: string; group: string; }>[]"
],
"path": "x-pack/plugins/alerting/server/application/rule/types/rule.ts",
"deprecated": false,
Expand Down Expand Up @@ -4527,15 +4527,15 @@
"section": "def-common.ActionGroup",
"text": "ActionGroup"
},
"<infer groups> ? groups : T extends Readonly<",
"<infer groups extends string> ? groups : T extends Readonly<",
{
"pluginId": "@kbn/alerting-types",
"scope": "common",
"docId": "kibKbnAlertingTypesPluginApi",
"section": "def-common.ActionGroup",
"text": "ActionGroup"
},
"<infer groups>> ? groups : never"
"<infer groups extends string>> ? groups : never"
],
"path": "packages/kbn-alerting-types/rule_type.ts",
"deprecated": false,
Expand Down Expand Up @@ -4580,7 +4580,7 @@
"label": "BulkEditOperation",
"description": [],
"signature": [
"Readonly<{} & { value: string[]; operation: \"delete\" | \"add\" | \"set\"; field: \"tags\"; }> | Readonly<{} & { value: Readonly<{ frequency?: Readonly<{} & { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; }> | undefined; uuid?: string | undefined; } & { id: string; params: Record<string, any>; group: string; }>[]; operation: \"add\" | \"set\"; field: \"actions\"; }> | Readonly<{} & { value: Readonly<{} & { interval: string; }>; operation: \"set\"; field: \"schedule\"; }> | Readonly<{} & { value: string | null; operation: \"set\"; field: \"throttle\"; }> | Readonly<{} & { value: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; operation: \"set\"; field: \"notifyWhen\"; }> | Readonly<{} & { value: Readonly<{ id?: string | undefined; } & { duration: number; rRule: Readonly<{ count?: number | undefined; interval?: number | undefined; freq?: 0 | 2 | 3 | 1 | undefined; until?: string | undefined; byweekday?: string[] | undefined; bymonthday?: number[] | undefined; bymonth?: number[] | undefined; } & { dtstart: string; tzid: string; }>; }>; operation: \"set\"; field: \"snoozeSchedule\"; }> | Readonly<{ value?: string[] | undefined; } & { operation: \"delete\"; field: \"snoozeSchedule\"; }> | Readonly<{} & { operation: \"set\"; field: \"apiKey\"; }>"
"Readonly<{} & { value: string[]; operation: \"delete\" | \"add\" | \"set\"; field: \"tags\"; }> | Readonly<{} & { value: Readonly<{ frequency?: Readonly<{} & { summary: boolean; throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; }> | undefined; uuid?: string | undefined; } & { id: string; params: Record<string, any>; group: string; }>[]; operation: \"add\" | \"set\"; field: \"actions\"; }> | Readonly<{} & { value: Readonly<{} & { interval: string; }>; operation: \"set\"; field: \"schedule\"; }> | Readonly<{} & { value: string | null; operation: \"set\"; field: \"throttle\"; }> | Readonly<{} & { value: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; operation: \"set\"; field: \"notifyWhen\"; }> | Readonly<{} & { value: Readonly<{ id?: string | undefined; } & { duration: number; rRule: Readonly<{ count?: number | undefined; interval?: number | undefined; freq?: 0 | 2 | 3 | 1 | undefined; until?: string | undefined; byweekday?: string[] | undefined; bymonthday?: number[] | undefined; bymonth?: number[] | undefined; } & { dtstart: string; tzid: string; }>; }>; operation: \"set\"; field: \"snoozeSchedule\"; }> | Readonly<{ value?: string[] | undefined; } & { operation: \"delete\"; field: \"snoozeSchedule\"; }> | Readonly<{} & { operation: \"set\"; field: \"apiKey\"; }>"
],
"path": "x-pack/plugins/alerting/server/application/rule/methods/bulk_edit/types/bulk_edit_rules_options.ts",
"deprecated": false,
Expand Down Expand Up @@ -5084,7 +5084,7 @@
"section": "def-server.AuditLogger",
"text": "AuditLogger"
},
" | undefined; getTags: (params: Readonly<{ search?: string | undefined; perPage?: number | undefined; } & { page: number; }>) => Promise<Readonly<{} & { page: number; perPage: number; total: number; data: string[]; }>>; getScheduleFrequency: () => Promise<Readonly<{} & { totalScheduledPerMinute: number; remainingSchedulesPerMinute: number; }>>; getAlertFromRaw: (params: ",
" | undefined; getTags: (params: Readonly<{ search?: string | undefined; perPage?: number | undefined; } & { page: number; }>) => Promise<Readonly<{} & { page: number; data: string[]; perPage: number; total: number; }>>; getScheduleFrequency: () => Promise<Readonly<{} & { totalScheduledPerMinute: number; remainingSchedulesPerMinute: number; }>>; getAlertFromRaw: (params: ",
"GetAlertFromRawParams",
") => ",
{
Expand Down Expand Up @@ -9986,15 +9986,15 @@
"section": "def-common.ActionGroup",
"text": "ActionGroup"
},
"<infer groups> ? groups : T extends Readonly<",
"<infer groups extends string> ? groups : T extends Readonly<",
{
"pluginId": "@kbn/alerting-types",
"scope": "common",
"docId": "kibKbnAlertingTypesPluginApi",
"section": "def-common.ActionGroup",
"text": "ActionGroup"
},
"<infer groups>> ? groups : never"
"<infer groups extends string>> ? groups : never"
],
"path": "packages/kbn-alerting-types/rule_type.ts",
"deprecated": false,
Expand Down
2 changes: 1 addition & 1 deletion api_docs/alerting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting
title: "alerting"
image: https://source.unsplash.com/400x175/?github
description: API docs for the alerting plugin
date: 2024-01-17
date: 2024-01-22
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting']
---
import alertingObj from './alerting.devdocs.json';
Expand Down
Loading

0 comments on commit 5f4a38b

Please sign in to comment.