Skip to content

Commit

Permalink
Merge branch 'main' into elastic#3402
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwizp authored Jun 6, 2024
2 parents fe8e8e7 + 584362e commit e629cc4
Show file tree
Hide file tree
Showing 1,898 changed files with 38,570 additions and 16,853 deletions.
27 changes: 13 additions & 14 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
disabled:
# TODO: Enable once RBAC timeline search strategy test updated
- x-pack/test/timeline/security_and_spaces/config_basic.ts

# Base config files, only necessary to inform config finding script
- test/functional/config.base.js
- test/functional/firefox/config.base.ts
Expand All @@ -16,6 +13,8 @@ disabled:
- x-pack/test/security_solution_api_integration/config/ess/config.base.basic.ts
- x-pack/test/security_solution_api_integration/config/serverless/config.base.ts
- x-pack/test/security_solution_api_integration/config/serverless/config.base.essentials.ts
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint/configs/config.base.ts
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint_api_int/configs/config.base.ts
- x-pack/test/security_solution_endpoint/config.base.ts
- x-pack/test/security_solution_endpoint_api_int/config.base.ts

Expand Down Expand Up @@ -311,7 +310,6 @@ enabled:
- x-pack/test/functional/apps/ml/short_tests/config.ts
- x-pack/test/functional/apps/ml/stack_management_jobs/config.ts
- x-pack/test/functional/apps/monitoring/config.ts
- x-pack/test/functional/apps/navigation/config.ts
- x-pack/test/functional/apps/observability_logs_explorer/config.ts
- x-pack/test/functional/apps/dataset_quality/config.ts
- x-pack/test/functional/apps/painless_lab/config.ts
Expand All @@ -325,7 +323,6 @@ enabled:
- x-pack/test/functional/apps/search_playground/config.ts
- x-pack/test/functional/apps/snapshot_restore/config.ts
- x-pack/test/functional/apps/spaces/config.ts
- x-pack/test/functional/apps/spaces/in_solution_navigation/config.ts
- x-pack/test/functional/apps/status_page/config.ts
- x-pack/test/functional/apps/transform/creation/index_pattern/config.ts
- x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/config.ts
Expand Down Expand Up @@ -401,21 +398,12 @@ enabled:
- x-pack/test/security_functional/insecure_cluster_warning.config.ts
- x-pack/test/security_functional/user_profiles.config.ts
- x-pack/test/security_functional/expired_session.config.ts
- x-pack/test/security_solution_endpoint_api_int/config.ts
- x-pack/test/security_solution_endpoint_api_int/serverless.config.ts
- x-pack/test/security_solution_endpoint/endpoint.config.ts
- x-pack/test/security_solution_endpoint/serverless.endpoint.config.ts
- x-pack/test/security_solution_endpoint/integrations.config.ts
- x-pack/test/security_solution_endpoint/integrations_feature_flag.config.ts
- x-pack/test/security_solution_endpoint/serverless.integrations.config.ts
- x-pack/test/security_solution_endpoint/serverless.integrations_feature_flag.config.ts
- x-pack/test/session_view/basic/config.ts
- x-pack/test/spaces_api_integration/security_and_spaces/config_basic.ts
- x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_basic.ts
- x-pack/test/spaces_api_integration/security_and_spaces/config_trial.ts
- x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_trial.ts
- x-pack/test/spaces_api_integration/spaces_only/config.ts
- x-pack/test/timeline/security_and_spaces/config_trial.ts
- x-pack/test/ui_capabilities/security_and_spaces/config.ts
- x-pack/test/ui_capabilities/spaces_only/config.ts
- x-pack/test/upgrade_assistant_integration/config.js
Expand Down Expand Up @@ -567,5 +555,16 @@ enabled:
- x-pack/test/security_solution_api_integration/test_suites/investigation/saved_objects/trial_license_complete_tier/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/investigation/timeline/trial_license_complete_tier/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/investigation/timeline/trial_license_complete_tier/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/investigation/timeline/security_and_spaces/configs/ess.basic.config.ts
- x-pack/test/security_solution_api_integration/test_suites/investigation/timeline/security_and_spaces/configs/ess.trial.config.ts
- x-pack/test/security_solution_api_integration/test_suites/sources/indices/trial_license_complete_tier/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/sources/indices/trial_license_complete_tier/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint_api_int/configs/config.ts
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint_api_int/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint/configs/endpoint.config.ts
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint/configs/serverless.endpoint.config.ts
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint/configs/integrations.config.ts
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint/configs/serverless.integrations.config.ts
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint/configs/serverless.integrations_feature_flag.config.ts
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint/configs/integrations_feature_flag.config.ts

Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ async function main() {
const commitSha = process.env.OVERRIDE_COMMIT || process.env.BUILDKITE_COMMIT;

if (!isCurrentHeadInMain(commitSha!)) {
if (!DRY_RUN) {
if (DRY_RUN) {
console.log(
`DRY_RUN: Commit ${commitSha} isn't in main, triggering container build :green_heart:`
);
} else {
console.log(`Commit ${commitSha} isn't in main, triggering container build :green_heart:`);
uploadTriggerBuildStep();
uploadTriggerBuildStep(commitSha!);
}
} else {
if (!DRY_RUN) {
if (DRY_RUN) {
console.log(`DRY_RUN: Commit ${commitSha} is in main, no build necessary :yellow_heart:`);
} else {
console.log(`Commit ${commitSha} is in main, no trigger necessary :yellow_heart:`);
Expand All @@ -41,12 +41,14 @@ function isCurrentHeadInMain(commitSha: string) {
return parseInt(containmentTest, 10) >= 1;
}

function uploadTriggerBuildStep() {
function uploadTriggerBuildStep(commitSha: string) {
const triggerStep: BuildkiteTriggerStep = {
label: ':point_right: Trigger emergency commit container build',
trigger: 'kibana-artifacts-container-image',
build: {
message: `Triggered by '${process.env.BUILDKITE_PIPELINE_NAME || 'unknown'}'`,
branch: process.env?.BUILDKITE_BRANCH || 'main',
commit: commitSha,
env: {},
},
};
Expand Down
31 changes: 9 additions & 22 deletions .buildkite/scripts/steps/cloud/build_and_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,7 @@ if [ -z "${CLOUD_DEPLOYMENT_ID}" ] || [ "${CLOUD_DEPLOYMENT_ID}" = 'null' ]; the

echo "Writing to vault..."

# TODO: remove after https://github.com/elastic/kibana-operations/issues/15 is done
if [[ "$IS_LEGACY_VAULT_ADDR" == "true" ]]; then
VAULT_ROLE_ID="$(get_vault_role_id)"
VAULT_SECRET_ID="$(get_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"
else
vault_kv_set "cloud-deploy/$CLOUD_DEPLOYMENT_NAME" username="$CLOUD_DEPLOYMENT_USERNAME" password="$CLOUD_DEPLOYMENT_PASSWORD"
fi
vault_kv_set "cloud-deploy/$CLOUD_DEPLOYMENT_NAME" username="$CLOUD_DEPLOYMENT_USERNAME" password="$CLOUD_DEPLOYMENT_PASSWORD"

echo "Enabling Stack Monitoring..."
jq '
Expand Down Expand Up @@ -123,28 +114,24 @@ else
ecctl deployment update "$CLOUD_DEPLOYMENT_ID" --track --output json --file /tmp/deploy.json > "$ECCTL_LOGS"
fi

# 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_READ_COMMAND="vault kv get $VAULT_KV_PREFIX/cloud-deploy/$CLOUD_DEPLOYMENT_NAME"
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')

cat << EOF | buildkite-agent annotate --style "info" --context cloud
### Cloud Deployment
### Cloud Deployment
Kibana: $CLOUD_DEPLOYMENT_KIBANA_URL
Kibana: $CLOUD_DEPLOYMENT_KIBANA_URL
Elasticsearch: $CLOUD_DEPLOYMENT_ELASTICSEARCH_URL
Elasticsearch: $CLOUD_DEPLOYMENT_ELASTICSEARCH_URL
Credentials: \`vault kv get $VAULT_KV_PREFIX/cloud-deploy/$CLOUD_DEPLOYMENT_NAME\`
Credentials: \`$VAULT_READ_COMMAND\`
(Stored in the production vault: VAULT_ADDR=https://vault-ci-prod.elastic.dev, more info: https://docs.elastic.dev/ci/using-secrets)
Kibana image: \`$KIBANA_CLOUD_IMAGE\`
Kibana image: \`$KIBANA_CLOUD_IMAGE\`
Elasticsearch image: \`$ELASTICSEARCH_CLOUD_IMAGE\`
Elasticsearch image: \`$ELASTICSEARCH_CLOUD_IMAGE\`
EOF

buildkite-agent meta-data set pr_comment:deploy_cloud:head "* [Cloud Deployment](${CLOUD_DEPLOYMENT_KIBANA_URL})"
Expand Down
22 changes: 4 additions & 18 deletions .buildkite/scripts/steps/serverless/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,7 @@ deploy() {

echo "Write to vault..."

# TODO: remove after https://github.com/elastic/kibana-operations/issues/15 is done
if [[ "$IS_LEGACY_VAULT_ADDR" == "true" ]]; then
VAULT_ROLE_ID="$(get_vault_role_id)"
VAULT_SECRET_ID="$(get_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/$VAULT_KEY_NAME" username="$PROJECT_USERNAME" password="$PROJECT_PASSWORD" id="$PROJECT_ID"
else
vault_kv_set "cloud-deploy/$VAULT_KEY_NAME" username="$PROJECT_USERNAME" password="$PROJECT_PASSWORD" id="$PROJECT_ID"
fi
vault_kv_set "cloud-deploy/$VAULT_KEY_NAME" username="$PROJECT_USERNAME" password="$PROJECT_PASSWORD" id="$PROJECT_ID"

else
echo "Updating project..."
Expand All @@ -118,21 +109,16 @@ deploy() {
PROJECT_KIBANA_LOGIN_URL="${PROJECT_KIBANA_URL}/login"
PROJECT_ELASTICSEARCH_URL=$(jq -r '.endpoints.elasticsearch' $PROJECT_INFO_LOGS)

# 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/$VAULT_KEY_NAME"
else
VAULT_READ_COMMAND="vault kv get $VAULT_KV_PREFIX/cloud-deploy/$VAULT_KEY_NAME"
fi

cat << EOF | buildkite-agent annotate --style "info" --context "project-$PROJECT_TYPE"
### $PROJECT_TYPE_LABEL Deployment
Kibana: $PROJECT_KIBANA_LOGIN_URL
Elasticsearch: $PROJECT_ELASTICSEARCH_URL
Credentials: \`$VAULT_READ_COMMAND\`
Credentials: \`vault kv get $VAULT_KV_PREFIX/cloud-deploy/$VAULT_KEY_NAME\`
(Stored in the production vault: VAULT_ADDR=https://vault-ci-prod.elastic.dev, more info: https://docs.elastic.dev/ci/using-secrets)
Kibana image: \`$KIBANA_IMAGE\`
EOF
Expand Down
39 changes: 20 additions & 19 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ packages/deeplinks/fleet @elastic/fleet
packages/deeplinks/management @elastic/kibana-management
packages/deeplinks/ml @elastic/ml-ui
packages/deeplinks/observability @elastic/obs-ux-logs-team
packages/deeplinks/search @elastic/enterprise-search-frontend
packages/deeplinks/search @elastic/search-kibana
packages/deeplinks/security @elastic/security-solution
packages/deeplinks/shared @elastic/appex-sharedux
packages/default-nav/analytics @elastic/kibana-data-discovery @elastic/kibana-presentation @elastic/kibana-visualizations
Expand Down Expand Up @@ -392,7 +392,7 @@ examples/embeddable_examples @elastic/kibana-presentation
src/plugins/embeddable @elastic/kibana-presentation
x-pack/examples/embedded_lens_example @elastic/kibana-visualizations
x-pack/plugins/encrypted_saved_objects @elastic/kibana-security
x-pack/plugins/enterprise_search @elastic/enterprise-search-frontend
x-pack/plugins/enterprise_search @elastic/search-kibana
x-pack/packages/kbn-entities-schema @elastic/obs-knowledge-team
examples/error_boundary @elastic/appex-sharedux
packages/kbn-es @elastic/kibana-operations
Expand All @@ -411,6 +411,7 @@ examples/eso_model_version_example @elastic/kibana-security
x-pack/test/encrypted_saved_objects_api_integration/plugins/api_consumer_plugin @elastic/kibana-security
packages/kbn-esql-ast @elastic/kibana-esql
examples/esql_ast_inspector @elastic/kibana-esql
src/plugins/esql_datagrid @elastic/kibana-esql
packages/kbn-esql-utils @elastic/kibana-esql
packages/kbn-esql-validation-autocomplete @elastic/kibana-esql
examples/esql_validation_example @elastic/kibana-esql
Expand Down Expand Up @@ -448,6 +449,7 @@ examples/field_formats_example @elastic/kibana-data-discovery
src/plugins/field_formats @elastic/kibana-data-discovery
packages/kbn-field-types @elastic/kibana-data-discovery
packages/kbn-field-utils @elastic/kibana-data-discovery
x-pack/plugins/fields_metadata @elastic/obs-ux-logs-team
x-pack/plugins/file_upload @elastic/kibana-gis
examples/files_example @elastic/appex-sharedux
src/plugins/files_management @elastic/appex-sharedux
Expand Down Expand Up @@ -505,7 +507,7 @@ src/plugins/interactive_setup @elastic/kibana-security
test/interactive_setup_api_integration/plugins/test_endpoints @elastic/kibana-security
packages/kbn-interpreter @elastic/kibana-visualizations
packages/kbn-io-ts-utils @elastic/obs-knowledge-team
packages/kbn-ipynb @elastic/enterprise-search-frontend
packages/kbn-ipynb @elastic/search-kibana
packages/kbn-jest-serializers @elastic/kibana-operations
packages/kbn-journeys @elastic/kibana-operations @elastic/appex-qa
packages/kbn-json-ast @elastic/kibana-operations
Expand Down Expand Up @@ -707,14 +709,14 @@ examples/screenshot_mode_example @elastic/appex-sharedux
src/plugins/screenshot_mode @elastic/appex-sharedux
x-pack/examples/screenshotting_example @elastic/appex-sharedux
x-pack/plugins/screenshotting @elastic/kibana-reporting-services
packages/kbn-search-api-panels @elastic/enterprise-search-frontend
packages/kbn-search-connectors @elastic/enterprise-search-frontend
x-pack/plugins/search_connectors @elastic/enterprise-search-frontend
packages/kbn-search-api-panels @elastic/search-kibana
packages/kbn-search-connectors @elastic/search-kibana
x-pack/plugins/search_connectors @elastic/search-kibana
packages/kbn-search-errors @elastic/kibana-data-discovery
examples/search_examples @elastic/kibana-data-discovery
packages/kbn-search-index-documents @elastic/enterprise-search-frontend
x-pack/plugins/search_notebooks @elastic/enterprise-search-frontend
x-pack/plugins/search_playground @elastic/enterprise-search-frontend
packages/kbn-search-index-documents @elastic/search-kibana
x-pack/plugins/search_notebooks @elastic/search-kibana
x-pack/plugins/search_playground @elastic/search-kibana
packages/kbn-search-response-warnings @elastic/kibana-data-discovery
packages/kbn-search-types @elastic/kibana-data-discovery
x-pack/plugins/searchprofiler @elastic/kibana-management
Expand Down Expand Up @@ -758,8 +760,8 @@ packages/serverless/settings/common @elastic/appex-sharedux @elastic/kibana-mana
x-pack/plugins/serverless_observability @elastic/obs-ux-management-team
packages/serverless/settings/observability_project @elastic/appex-sharedux @elastic/kibana-management @elastic/obs-ux-management-team
packages/serverless/project_switcher @elastic/appex-sharedux
x-pack/plugins/serverless_search @elastic/enterprise-search-frontend
packages/serverless/settings/search_project @elastic/enterprise-search-frontend @elastic/kibana-management
x-pack/plugins/serverless_search @elastic/search-kibana
packages/serverless/settings/search_project @elastic/search-kibana @elastic/kibana-management
packages/serverless/settings/security_project @elastic/security-solution @elastic/kibana-management
packages/serverless/storybook/config @elastic/appex-sharedux
packages/serverless/types @elastic/appex-sharedux
Expand Down Expand Up @@ -867,7 +869,7 @@ x-pack/plugins/translations @elastic/kibana-localization
x-pack/examples/triggers_actions_ui_example @elastic/response-ops
x-pack/plugins/triggers_actions_ui @elastic/response-ops
packages/kbn-triggers-actions-ui-types @elastic/response-ops
packages/kbn-try-in-console @elastic/enterprise-search-frontend
packages/kbn-try-in-console @elastic/search-kibana
packages/kbn-ts-projects @elastic/kibana-operations
packages/kbn-ts-type-check-cli @elastic/kibana-operations
packages/kbn-typed-react-router-config @elastic/obs-knowledge-team @elastic/obs-ux-management-team
Expand Down Expand Up @@ -1331,10 +1333,10 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/test_serverless/api_integration/test_suites/common/alerting/ @elastic/response-ops

# Enterprise Search
/x-pack/test/functional_enterprise_search/ @elastic/enterprise-search-frontend
/x-pack/test/functional_enterprise_search/ @elastic/search-kibana
/x-pack/plugins/enterprise_search/public/applications/shared/doc_links @elastic/ent-search-docs-team
/x-pack/test_serverless/api_integration/test_suites/search/serverless_search @elastic/enterprise-search-frontend
/x-pack/test_serverless/functional/test_suites/search/ @elastic/enterprise-search-frontend
/x-pack/test_serverless/api_integration/test_suites/search/serverless_search @elastic/search-kibana
/x-pack/test_serverless/functional/test_suites/search/ @elastic/search-kibana

# Management Experience - Deployment Management
/x-pack/test_serverless/**/test_suites/common/index_management/ @elastic/kibana-management
Expand Down Expand Up @@ -1548,7 +1550,7 @@ x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/
/x-pack/plugins/security_solution/common/cti @elastic/security-detection-engine
/x-pack/plugins/security_solution/common/field_maps @elastic/security-detection-engine

/x-pack/plugins/security_solution/public/common/components/sourcerer @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/sourcerer @elastic/security-threat-hunting-investigations
/x-pack/plugins/security_solution/public/detection_engine/rule_creation @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions @elastic/security-detection-engine
Expand All @@ -1564,7 +1566,6 @@ x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/
/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types @elastic/security-detection-engine
/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index @elastic/security-detection-engine
/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals @elastic/security-detection-engine
/x-pack/plugins/security_solution/server/lib/sourcerer @elastic/security-detection-engine

/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine @elastic/security-detection-engine

Expand All @@ -1586,8 +1587,8 @@ x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/
/x-pack/plugins/security_solution/server/lib/license/ @elastic/security-defend-workflows
/x-pack/plugins/security_solution/server/fleet_integration/ @elastic/security-defend-workflows
/x-pack/plugins/security_solution/scripts/endpoint/ @elastic/security-defend-workflows
/x-pack/test/security_solution_endpoint/ @elastic/security-defend-workflows
/x-pack/test/security_solution_endpoint_api_int/ @elastic/security-defend-workflows
/x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint/ @elastic/security-defend-workflows
/x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint_api_int/ @elastic/security-defend-workflows
/x-pack/test_serverless/shared/lib/security/kibana_roles/ @elastic/security-defend-workflows
/x-pack/plugins/security_solution_serverless/public/upselling/sections/endpoint_management @elastic/security-defend-workflows
/x-pack/plugins/security_solution_serverless/public/upselling/pages/endpoint_management @elastic/security-defend-workflows
Expand Down
Loading

0 comments on commit e629cc4

Please sign in to comment.