Skip to content

Commit

Permalink
Merge branch 'main' into remove-kme-leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
delanni authored Jul 9, 2024
2 parents b3a6c6a + ff651f2 commit ef01cb0
Show file tree
Hide file tree
Showing 1,696 changed files with 25,497 additions and 11,846 deletions.
7 changes: 0 additions & 7 deletions .buildkite/scripts/lifecycle/post_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ echo '--- Log out of gcloud'
./.buildkite/scripts/common/activate_service_account.sh --unset-impersonation || echo "Failed to unset impersonation"
./.buildkite/scripts/common/activate_service_account.sh --logout-gcloud || echo "Failed to log out of gcloud"

if [[ "${SKIP_NODE_SETUP:-}" =~ ^(1|true)$ ]]; then
echo '--- Skipping Agent Debug Info'
else
echo '--- Agent Debug Info'
ts-node .buildkite/scripts/lifecycle/print_agent_links.ts || true
fi

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

if [[ "$IS_TEST_EXECUTION_STEP" == "true" ]]; then
Expand Down
10 changes: 0 additions & 10 deletions .buildkite/scripts/lifecycle/pre_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@ if [[ "${SKIP_NODE_SETUP:-}" =~ ^(1|true)$ ]]; then
else
source .buildkite/scripts/common/setup_node.sh
source .buildkite/scripts/common/setup_buildkite_deps.sh

echo '--- Agent Debug/SSH Info'
ts-node .buildkite/scripts/lifecycle/print_agent_links.ts || true
fi

if [[ "$(curl -is metadata.google.internal || true)" ]]; then
echo ""
echo "To SSH into this agent, run:"
echo "gcloud compute ssh --tunnel-through-iap --project elastic-kibana-ci --zone \"$(curl -sH Metadata-Flavor:Google http://metadata.google.internal/computeMetadata/v1/instance/zone)\" \"$(curl -sH Metadata-Flavor:Google http://metadata.google.internal/computeMetadata/v1/instance/name)\""
echo ""
fi

if [[ "${BUILDKITE_LABEL:-}" == *"Run Dynamic Pipeline"* || "${BUILDKITE_LABEL:-}" == *"Upload Pipeline"* ]]; then
Expand Down
47 changes: 0 additions & 47 deletions .buildkite/scripts/lifecycle/print_agent_links.ts

This file was deleted.

133 changes: 71 additions & 62 deletions .buildkite/scripts/steps/artifacts/docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,46 +18,82 @@ export KIBANA_IMAGE="$KIBANA_BASE_IMAGE:$KIBANA_IMAGE_TAG"

echo "--- Verify manifest does not already exist"
echo "Checking manifest for $KIBANA_IMAGE"
if docker manifest inspect $KIBANA_IMAGE &> /dev/null; then
echo "Manifest already exists, exiting"
exit 1
SKIP_BUILD=false
if docker manifest inspect "$KIBANA_IMAGE" &> /dev/null; then
# If a staging build manifest already exists, there's a workflow error and the root cause should be investigated.
if [[ "${BUILDKITE_PULL_REQUEST:-false}" == "false" ]]; then
echo "Manifest already exists, exiting"
exit 1
else
echo "Manifest already exists, skipping build. Look up previous build for artifacts."
SKIP_BUILD=true
fi
fi

echo "--- Build Kibana"
node scripts/build \
--debug \
--release \
--serverless \
--docker-cross-compile \
--docker-namespace="kibana-ci" \
--docker-tag="$KIBANA_IMAGE_TAG"

echo "--- Tag images"
docker rmi "$KIBANA_IMAGE"
docker load < "target/kibana-serverless-$BASE_VERSION-docker-image.tar.gz"
docker tag "$KIBANA_IMAGE" "$KIBANA_IMAGE-amd64"

docker rmi "$KIBANA_IMAGE"
docker load < "target/kibana-serverless-$BASE_VERSION-docker-image-aarch64.tar.gz"
docker tag "$KIBANA_IMAGE" "$KIBANA_IMAGE-arm64"

echo "--- Push images"
docker image push "$KIBANA_IMAGE-arm64"
docker image push "$KIBANA_IMAGE-amd64"

echo "--- Create and push manifests"
docker manifest create \
"$KIBANA_IMAGE" \
--amend "$KIBANA_IMAGE-arm64" \
--amend "$KIBANA_IMAGE-amd64"
docker manifest push "$KIBANA_IMAGE"

if [[ "$BUILDKITE_BRANCH" == "$KIBANA_BASE_BRANCH" ]] && [[ "${BUILDKITE_PULL_REQUEST:-false}" == "false" ]]; then
if [[ "$SKIP_BUILD" == "false" ]]; then
echo "--- Build Kibana"
node scripts/build \
--debug \
--release \
--serverless \
--docker-cross-compile \
--docker-namespace="kibana-ci" \
--docker-tag="$KIBANA_IMAGE_TAG"

echo "--- Tag images"
docker rmi "$KIBANA_IMAGE"
docker load < "target/kibana-serverless-$BASE_VERSION-docker-image.tar.gz"
docker tag "$KIBANA_IMAGE" "$KIBANA_IMAGE-amd64"

docker rmi "$KIBANA_IMAGE"
docker load < "target/kibana-serverless-$BASE_VERSION-docker-image-aarch64.tar.gz"
docker tag "$KIBANA_IMAGE" "$KIBANA_IMAGE-arm64"

echo "--- Push images"
docker image push "$KIBANA_IMAGE-arm64"
docker image push "$KIBANA_IMAGE-amd64"

echo "--- Create and push manifests"
docker manifest create \
"$KIBANA_BASE_IMAGE:latest" \
"$KIBANA_IMAGE" \
--amend "$KIBANA_IMAGE-arm64" \
--amend "$KIBANA_IMAGE-amd64"
docker manifest push "$KIBANA_BASE_IMAGE:latest"
docker manifest push "$KIBANA_IMAGE"

if [[ "$BUILDKITE_BRANCH" == "$KIBANA_BASE_BRANCH" ]] && [[ "${BUILDKITE_PULL_REQUEST:-false}" == "false" ]]; then
docker manifest create \
"$KIBANA_BASE_IMAGE:latest" \
--amend "$KIBANA_IMAGE-arm64" \
--amend "$KIBANA_IMAGE-amd64"
docker manifest push "$KIBANA_BASE_IMAGE:latest"
fi

echo "--- Build dependencies report"
node scripts/licenses_csv_report "--csv=target/dependencies-$GIT_ABBREV_COMMIT.csv"

echo "--- Upload archives"
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-linux-x86_64.tar.gz"
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-linux-aarch64.tar.gz"
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-image.tar.gz"
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-image-aarch64.tar.gz"
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-build-context.tar.gz"
buildkite-agent artifact upload "kibana-$BASE_VERSION-cdn-assets.tar.gz"
buildkite-agent artifact upload "dependencies-$GIT_ABBREV_COMMIT.csv"

echo "--- Upload CDN assets"
cd target
gcloud auth activate-service-account --key-file <(echo "$GCS_SA_CDN_KEY")

CDN_ASSETS_FOLDER=$(mktemp -d)
tar -xf "kibana-$BASE_VERSION-cdn-assets.tar.gz" -C "$CDN_ASSETS_FOLDER" --strip=1

gsutil -m cp -r "$CDN_ASSETS_FOLDER/*" "gs://$GCS_SA_CDN_BUCKET/$GIT_ABBREV_COMMIT"
gcloud auth revoke "$GCS_SA_CDN_EMAIL"

echo "--- Validate CDN assets"
ts-node "$(git rev-parse --show-toplevel)/.buildkite/scripts/steps/artifacts/validate_cdn_assets.ts" \
"$GCS_SA_CDN_URL" \
"$CDN_ASSETS_FOLDER"
fi

cat << EOF | buildkite-agent annotate --style "info" --context image
Expand All @@ -75,33 +111,6 @@ if [[ "${BUILDKITE_PULL_REQUEST:-false}" != "false" ]]; then
buildkite-agent meta-data set pr_comment:early_comment_job_id "$BUILDKITE_JOB_ID"
fi

echo "--- Build dependencies report"
node scripts/licenses_csv_report "--csv=target/dependencies-$GIT_ABBREV_COMMIT.csv"

echo "--- Upload CDN assets"
cd target
gcloud auth activate-service-account --key-file <(echo "$GCS_SA_CDN_KEY")

CDN_ASSETS_FOLDER=$(mktemp -d)
tar -xf "kibana-$BASE_VERSION-cdn-assets.tar.gz" -C "$CDN_ASSETS_FOLDER" --strip=1

gsutil -m cp -r "$CDN_ASSETS_FOLDER/*" "gs://$GCS_SA_CDN_BUCKET/$GIT_ABBREV_COMMIT"
gcloud auth revoke "$GCS_SA_CDN_EMAIL"

echo "--- Validate CDN assets"
ts-node "$(git rev-parse --show-toplevel)/.buildkite/scripts/steps/artifacts/validate_cdn_assets.ts" \
"$GCS_SA_CDN_URL" \
"$CDN_ASSETS_FOLDER"

echo "--- Upload archives"
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-linux-x86_64.tar.gz"
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-linux-aarch64.tar.gz"
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-image.tar.gz"
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-image-aarch64.tar.gz"
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-build-context.tar.gz"
buildkite-agent artifact upload "kibana-$BASE_VERSION-cdn-assets.tar.gz"
buildkite-agent artifact upload "dependencies-$GIT_ABBREV_COMMIT.csv"

# This part is related with updating the configuration of kibana-controller,
# so that new stack instances contain the latest and greatest image of kibana,
# and the respective stack components of course.
Expand Down
9 changes: 6 additions & 3 deletions .buildkite/scripts/steps/serverless/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,12 @@ EOF

is_pr_with_label "ci:project-deploy-elasticsearch" && deploy "elasticsearch"
if is_pr_with_label "ci:project-deploy-observability" ; then
create_github_issue_oblt_test_environments
echo "--- Deploy observability with Kibana CI"
deploy "observability"
# Only deploy observability if the PR is targeting main
if [[ "$BUILDKITE_PULL_REQUEST_BASE_BRANCH" == "main" ]]; then
create_github_issue_oblt_test_environments
echo "--- Deploy observability with Kibana CI"
deploy "observability"
fi
fi
is_pr_with_label "ci:project-deploy-security" && deploy "security"

Expand Down
34 changes: 18 additions & 16 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ x-pack/plugins/alerting @elastic/response-ops
x-pack/packages/kbn-alerting-state-types @elastic/response-ops
packages/kbn-alerting-types @elastic/response-ops
packages/kbn-alerts-as-data-utils @elastic/response-ops
packages/kbn-alerts-grouping @elastic/response-ops
x-pack/test/alerting_api_integration/common/plugins/alerts_restricted @elastic/response-ops
packages/kbn-alerts-ui-shared @elastic/response-ops
packages/kbn-ambient-common-types @elastic/kibana-operations
Expand Down Expand Up @@ -406,6 +407,7 @@ packages/kbn-eslint-plugin-imports @elastic/kibana-operations
packages/kbn-eslint-plugin-telemetry @elastic/obs-knowledge-team
examples/eso_model_version_example @elastic/kibana-security
x-pack/test/encrypted_saved_objects_api_integration/plugins/api_consumer_plugin @elastic/kibana-security
src/plugins/esql @elastic/kibana-esql
packages/kbn-esql-ast @elastic/kibana-esql
examples/esql_ast_inspector @elastic/kibana-esql
src/plugins/esql_datagrid @elastic/kibana-esql
Expand All @@ -421,7 +423,7 @@ x-pack/plugins/event_log @elastic/response-ops
packages/kbn-expandable-flyout @elastic/security-threat-hunting-investigations
packages/kbn-expect @elastic/kibana-operations @elastic/appex-qa
x-pack/examples/exploratory_view_example @elastic/obs-ux-infra_services-team
x-pack/plugins/observability_solution/exploratory_view @elastic/obs-ux-infra_services-team
x-pack/plugins/observability_solution/exploratory_view @elastic/obs-ux-management-team
src/plugins/expression_error @elastic/kibana-presentation
src/plugins/chart_expressions/expression_gauge @elastic/kibana-visualizations
src/plugins/chart_expressions/expression_heatmap @elastic/kibana-visualizations
Expand Down Expand Up @@ -657,6 +659,7 @@ packages/react/kibana_context/root @elastic/appex-sharedux
packages/react/kibana_context/styled @elastic/appex-sharedux
packages/react/kibana_context/theme @elastic/appex-sharedux
packages/react/kibana_mount @elastic/appex-sharedux
packages/kbn-recently-accessed @elastic/appex-sharedux
x-pack/plugins/remote_clusters @elastic/kibana-management
test/plugin_functional/plugins/rendering_plugin @elastic/kibana-core
packages/kbn-repo-file-maps @elastic/kibana-operations
Expand Down Expand Up @@ -847,7 +850,7 @@ test/server_integration/plugins/status_plugin_b @elastic/kibana-core
packages/kbn-std @elastic/kibana-core
packages/kbn-stdio-dev-helpers @elastic/kibana-operations
packages/kbn-storybook @elastic/kibana-operations
x-pack/plugins/observability_solution/synthetics @elastic/obs-ux-infra_services-team
x-pack/plugins/observability_solution/synthetics @elastic/obs-ux-management-team
x-pack/test/alerting_api_integration/common/plugins/task_manager_fixture @elastic/response-ops
x-pack/test/plugin_api_perf/plugins/task_manager_performance @elastic/response-ops
x-pack/plugins/task_manager @elastic/response-ops
Expand All @@ -864,7 +867,6 @@ packages/kbn-test-jest-helpers @elastic/kibana-operations @elastic/appex-qa
packages/kbn-test-subj-selector @elastic/kibana-operations @elastic/appex-qa
x-pack/examples/testing_embedded_lens @elastic/kibana-visualizations
packages/kbn-text-based-editor @elastic/kibana-esql
src/plugins/text_based_languages @elastic/kibana-esql
x-pack/examples/third_party_lens_navigation_prompt @elastic/kibana-visualizations
x-pack/examples/third_party_vis_lens_example @elastic/kibana-visualizations
x-pack/plugins/threat_intelligence @elastic/security-threat-hunting-investigations
Expand Down Expand Up @@ -903,7 +905,7 @@ src/plugins/unified_search @elastic/kibana-visualizations
packages/kbn-unsaved-changes-badge @elastic/kibana-data-discovery
packages/kbn-unsaved-changes-prompt @elastic/kibana-management
x-pack/plugins/upgrade_assistant @elastic/kibana-management
x-pack/plugins/observability_solution/uptime @elastic/obs-ux-infra_services-team
x-pack/plugins/observability_solution/uptime @elastic/obs-ux-management-team
x-pack/plugins/drilldowns/url_drilldown @elastic/appex-sharedux
src/plugins/url_forwarding @elastic/kibana-visualizations
src/plugins/usage_collection @elastic/kibana-core
Expand Down Expand Up @@ -1141,15 +1143,15 @@ x-pack/test/observability_ai_assistant_functional @elastic/obs-ai-assistant
#CC# /x-pack/plugins/observability_solution/observability/ @elastic/apm-ui

# Uptime
/x-pack/test/functional_with_es_ssl/apps/discover_ml_uptime/uptime/ @elastic/obs-ux-infra_services-team
/x-pack/test/functional/apps/uptime @elastic/obs-ux-infra_services-team
/x-pack/test/functional/es_archives/uptime @elastic/obs-ux-infra_services-team
/x-pack/test/functional/services/uptime @elastic/obs-ux-infra_services-team
/x-pack/test/api_integration/apis/uptime @elastic/obs-ux-infra_services-team
/x-pack/test/api_integration/apis/synthetics @elastic/obs-ux-infra_services-team
/x-pack/test/alerting_api_integration/observability/synthetics_rule.ts @elastic/obs-ux-infra_services-team
/x-pack/test/functional_with_es_ssl/apps/discover_ml_uptime/uptime/ @elastic/obs-ux-management-team
/x-pack/test/functional/apps/uptime @elastic/obs-ux-management-team
/x-pack/test/functional/es_archives/uptime @elastic/obs-ux-management-team
/x-pack/test/functional/services/uptime @elastic/obs-ux-management-team
/x-pack/test/api_integration/apis/uptime @elastic/obs-ux-management-team
/x-pack/test/api_integration/apis/synthetics @elastic/obs-ux-management-team
/x-pack/test/alerting_api_integration/observability/synthetics_rule.ts @elastic/obs-ux-management-team
/x-pack/test/alerting_api_integration/observability/index.ts @elastic/obs-ux-management-team
/x-pack/test_serverless/api_integration/test_suites/observability/synthetics @elastic/obs-ux-infra_services-team
/x-pack/test_serverless/api_integration/test_suites/observability/synthetics @elastic/obs-ux-management-team

# Logs
/x-pack/test/api_integration/apis/logs_ui @elastic/obs-ux-logs-team
Expand Down Expand Up @@ -1424,7 +1426,7 @@ x-pack/test/security_solution_api_integration/test_suites/sources @elastic/secur
/x-pack/test/security_solution_cypress/cypress/* @elastic/security-engineering-productivity
/x-pack/test/security_solution_cypress/cypress/tasks/login.ts @elastic/security-engineering-productivity
/x-pack/test/security_solution_cypress/es_archives @elastic/security-engineering-productivity
/x-pack/plugins/security_solution/scripts/run_cypress @MadameSheema @patrykkopycinski @oatkiller @maximpn @banderror
/x-pack/plugins/security_solution/scripts/run_cypress @MadameSheema @patrykkopycinski @maximpn @banderror

## Security Solution sub teams - Threat Hunting Investigations

Expand Down Expand Up @@ -1733,9 +1735,9 @@ packages/react @elastic/appex-sharedux
x-pack/plugins/actions/server/saved_objects/index.ts @elastic/response-ops @elastic/kibana-security
x-pack/plugins/alerting/server/saved_objects/index.ts @elastic/response-ops @elastic/kibana-security
x-pack/plugins/fleet/server/saved_objects/index.ts @elastic/fleet @elastic/kibana-security
x-pack/plugins/observability_solution/synthetics/server/saved_objects/saved_objects.ts @elastic/obs-ux-infra_services-team @elastic/kibana-security
x-pack/plugins/observability_solution/synthetics/server/saved_objects/synthetics_monitor.ts @elastic/obs-ux-infra_services-team @elastic/kibana-security
x-pack/plugins/observability_solution/synthetics/server/saved_objects/synthetics_param.ts @elastic/obs-ux-infra_services-team @elastic/kibana-security
x-pack/plugins/observability_solution/synthetics/server/saved_objects/saved_objects.ts @elastic/obs-ux-management-team @elastic/kibana-security
x-pack/plugins/observability_solution/synthetics/server/saved_objects/synthetics_monitor.ts @elastic/obs-ux-management-team @elastic/kibana-security
x-pack/plugins/observability_solution/synthetics/server/saved_objects/synthetics_param.ts @elastic/obs-ux-management-team @elastic/kibana-security

# Specialised GitHub workflows for the Observability robots
/.github/workflows/deploy-my-kibana.yml @elastic/observablt-robots @elastic/kibana-operations
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-approve-api-docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on:
pull_request:
pull_request_target:
branches:
- main
types:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-approve-backports.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on:
pull_request:
pull_request_target:
branches-ignore:
- main
types:
Expand Down
3 changes: 2 additions & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"flot": "packages/kbn-flot-charts/lib",
"generateCsv": "packages/kbn-generate-csv",
"grouping": "packages/kbn-grouping/src",
"alertsGrouping": "packages/kbn-alerts-grouping",
"guidedOnboarding": "src/plugins/guided_onboarding",
"guidedOnboardingPackage": "packages/kbn-guided-onboarding",
"home": "src/plugins/home",
Expand Down Expand Up @@ -115,7 +116,7 @@
"serverlessPackages": "packages/serverless",
"coloring": "packages/kbn-coloring/src",
"languageDocumentationPopover": "packages/kbn-language-documentation-popover/src",
"textBasedLanguages": "src/plugins/text_based_languages",
"esql": "src/plugins/esql",
"esqlDataGrid": "src/plugins/esql_datagrid",
"statusPage": "src/legacy/core_plugins/status_page",
"telemetry": ["src/plugins/telemetry", "src/plugins/telemetry_management_section"],
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-07-08
date: 2024-07-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
---
import actionsObj from './actions.devdocs.json';
Expand Down
Loading

0 comments on commit ef01cb0

Please sign in to comment.