Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into upgrade-typescript-…
Browse files Browse the repository at this point in the history
…v4-9-5
  • Loading branch information
mistic committed Feb 23, 2024
2 parents 177f8c9 + 5f17b39 commit bbcd5d5
Show file tree
Hide file tree
Showing 5,319 changed files with 43,534 additions and 19,720 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 0 additions & 1 deletion .bazelignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# https://github.com/bazelbuild/bazel/issues/7093
# https://github.com/bazelbuild/bazel/issues/8106
.buildkite
.ci
.chromium
.git
.github
Expand Down
22 changes: 11 additions & 11 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ disabled:
- x-pack/test/defend_workflows_cypress/cli_config.ts
- x-pack/test/defend_workflows_cypress/config.ts
- x-pack/test/defend_workflows_cypress/serverless_config.ts
- x-pack/plugins/observability_onboarding/e2e/ftr_config_open.ts
- x-pack/plugins/observability_onboarding/e2e/ftr_config_runner.ts
- x-pack/plugins/observability_onboarding/e2e/ftr_config.ts
- x-pack/plugins/observability_solution/observability_onboarding/e2e/ftr_config_open.ts
- x-pack/plugins/observability_solution/observability_onboarding/e2e/ftr_config_runner.ts
- x-pack/plugins/observability_solution/observability_onboarding/e2e/ftr_config.ts
- x-pack/test/osquery_cypress/cli_config.ts
- x-pack/test/osquery_cypress/serverless_cli_config.ts
- x-pack/test/osquery_cypress/config.ts
Expand All @@ -53,16 +53,16 @@ disabled:
- x-pack/test_serverless/functional/test_suites/observability/cypress/config_headless.ts
- x-pack/test_serverless/functional/test_suites/observability/cypress/config_runner.ts
- x-pack/test/security_solution_cypress/serverless_config.ts
- x-pack/plugins/profiling/e2e/ftr_config_open.ts
- x-pack/plugins/profiling/e2e/ftr_config_runner.ts
- x-pack/plugins/profiling/e2e/ftr_config.ts
- x-pack/plugins/observability_solution/profiling/e2e/ftr_config_open.ts
- x-pack/plugins/observability_solution/profiling/e2e/ftr_config_runner.ts
- x-pack/plugins/observability_solution/profiling/e2e/ftr_config.ts

# Elastic Synthetics configs
- x-pack/plugins/synthetics/e2e/config.ts
- x-pack/plugins/uptime/e2e/uptime/synthetics_run.ts
- x-pack/plugins/synthetics/e2e/synthetics/synthetics_run.ts
- x-pack/plugins/ux/e2e/synthetics_run.ts
- x-pack/plugins/exploratory_view/e2e/synthetics_run.ts
- x-pack/plugins/observability_solution/uptime/e2e/uptime/synthetics_run.ts
- x-pack/plugins/observability_solution/synthetics/e2e/config.ts
- x-pack/plugins/observability_solution/synthetics/e2e/synthetics/synthetics_run.ts
- x-pack/plugins/observability_solution/exploratory_view/e2e/synthetics_run.ts
- x-pack/plugins/observability_solution/ux/e2e/synthetics_run.ts

# Configs that exist but weren't running in CI when this file was introduced
- x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/config.ts
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipelines/on_merge_unsupported_ftrs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ steps:
depends_on: build
timeout_in_minutes: 120
artifact_paths:
- 'x-pack/plugins/synthetics/e2e/.journeys/**/*'
- 'x-pack/plugins/observability_solution/synthetics/e2e/.journeys/**/*'
retry:
automatic:
- exit_status: '-1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ steps:
- quick_checks
timeout_in_minutes: 60
artifact_paths:
- 'x-pack/plugins/exploratory_view/e2e/.journeys/**/*'
- 'x-pack/plugins/observability_solution/exploratory_view/e2e/.journeys/**/*'
retry:
automatic:
- exit_status: '-1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ steps:
- build
- quick_checks
timeout_in_minutes: 60
parallelism: 6
parallelism: 10
retry:
automatic:
- exit_status: '*'
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipelines/pull_request/synthetics_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ steps:
- quick_checks
timeout_in_minutes: 60
artifact_paths:
- 'x-pack/plugins/synthetics/e2e/.journeys/**/*'
- 'x-pack/plugins/observability_solution/synthetics/e2e/.journeys/**/*'
retry:
automatic:
- exit_status: '-1'
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipelines/pull_request/uptime_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ steps:
- quick_checks
timeout_in_minutes: 60
artifact_paths:
- 'x-pack/plugins/synthetics/e2e/.journeys/**/*'
- 'x-pack/plugins/observability_solution/synthetics/e2e/.journeys/**/*'
retry:
automatic:
- exit_status: '-1'
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipelines/pull_request/ux_plugin_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ steps:
- quick_checks
timeout_in_minutes: 60
artifact_paths:
- 'x-pack/plugins/ux/e2e/.journeys/**/*'
- 'x-pack/plugins/observability_solution/ux/e2e/.journeys/**/*'
retry:
automatic:
- exit_status: '-1'
Expand Down
15 changes: 9 additions & 6 deletions .buildkite/scripts/lifecycle/pre_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,17 @@ export SYNTHETICS_REMOTE_KIBANA_URL
DEPLOY_TAGGER_SLACK_WEBHOOK_URL=${DEPLOY_TAGGER_SLACK_WEBHOOK_URL:-"$(vault_get kibana-serverless-release-tools DEPLOY_TAGGER_SLACK_WEBHOOK_URL)"}
export DEPLOY_TAGGER_SLACK_WEBHOOK_URL

GCS_SA_CDN_QA_KEY="$(vault_get gcs-sa-cdn-qa key)"
export GCS_SA_CDN_QA_KEY
GCS_SA_CDN_KEY="$(vault_get gcs-sa-cdn-prod key)"
export GCS_SA_CDN_KEY

GCS_SA_CDN_QA_EMAIL="$(vault_get gcs-sa-cdn-qa email)"
export GCS_SA_CDN_QA_EMAIL
GCS_SA_CDN_EMAIL="$(vault_get gcs-sa-cdn-prod email)"
export GCS_SA_CDN_EMAIL

GCS_SA_CDN_QA_BUCKET="$(vault_get gcs-sa-cdn-qa bucket)"
export GCS_SA_CDN_QA_BUCKET
GCS_SA_CDN_BUCKET="$(vault_get gcs-sa-cdn-prod bucket)"
export GCS_SA_CDN_BUCKET

GCS_SA_CDN_URL="$(vault_get gcs-sa-cdn-prod cdn)"
export GCS_SA_CDN_URL

# Setup Failed Test Reporter Elasticsearch credentials
{
Expand Down
22 changes: 18 additions & 4 deletions .buildkite/scripts/steps/artifacts/docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,28 @@ node scripts/licenses_csv_report "--csv=target/dependencies-$GIT_ABBREV_COMMIT.c

echo "--- Upload CDN assets"
cd target
gcloud auth activate-service-account --key-file <(echo "$GCS_SA_CDN_QA_KEY")
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_QA_BUCKET/$GIT_ABBREV_COMMIT"
gcloud auth revoke "$GCS_SA_CDN_QA_EMAIL"
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"
(
shopt -s globstar
THREADS=$(grep -c ^processor /proc/cpuinfo)
i=0
cd $CDN_ASSETS_FOLDER
for CDN_ASSET in **/*; do
((i=(i+1)%THREADS)) || wait
if [[ -f "$CDN_ASSET" ]]; then
echo -n "Testing $CDN_ASSET..."
curl -I --write-out '%{http_code}\n' --fail --silent --output /dev/null "$GCS_SA_CDN_URL/$CDN_ASSET"
fi
done
)

echo "--- Upload archives"
buildkite-agent artifact upload "kibana-$BASE_VERSION-linux-x86_64.tar.gz"
Expand All @@ -105,7 +120,6 @@ buildkite-agent artifact upload "kibana-$BASE_VERSION-docker-image.tar.gz"
buildkite-agent artifact upload "kibana-$BASE_VERSION-docker-image-aarch64.tar.gz"
buildkite-agent artifact upload "kibana-$BASE_VERSION-cdn-assets.tar.gz"
buildkite-agent artifact upload "dependencies-$GIT_ABBREV_COMMIT.csv"
cd -

# This part is related with updating the configuration of kibana-controller,
# so that new stack instances contain the latest and greatest image of kibana,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ echo "--- Exploratory View plugin @elastic/synthetics Tests"

cd "$XPACK_DIR"

node plugins/exploratory_view/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
node plugins/observability_solution/exploratory_view/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ echo "--- Observability onboarding Cypress Tests"

cd "$XPACK_DIR"

node plugins/observability_onboarding/scripts/test/e2e.js \
node plugins/observability_solution/observability_onboarding/scripts/test/e2e.js \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/functional/profiling_cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ echo "--- Profiling Cypress Tests"

cd "$XPACK_DIR"

NODE_OPTIONS=--openssl-legacy-provider node plugins/profiling/scripts/test/e2e.js \
NODE_OPTIONS=--openssl-legacy-provider node plugins/observability_solution/profiling/scripts/test/e2e.js \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/functional/synthetics_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ echo "--- Synthetics plugin @elastic/synthetics Tests"

cd "$XPACK_DIR"

node plugins/synthetics/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
node plugins/observability_solution/synthetics/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/functional/uptime_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ echo "--- Uptime plugin @elastic/synthetics Tests"

cd "$XPACK_DIR"

node plugins/uptime/scripts/uptime_e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
node plugins/observability_solution/uptime/scripts/uptime_e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/functional/ux_synthetics_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ echo "--- User Experience @elastic/synthetics Tests"

cd "$XPACK_DIR"

node plugins/ux/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
node plugins/observability_solution/ux/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ node_modules
target
snapshots.js

!/.ci
!/.eslintrc.js
!.storybook
!.buildkite
Expand Down
42 changes: 23 additions & 19 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -873,8 +873,8 @@ module.exports = {
files: [
'x-pack/plugins/apm/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/observability/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/exploratory_view/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/ux/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/observability_solution/exploratory_view/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/observability_solution/ux/**/*.{js,mjs,ts,tsx}',
],
rules: {
'no-console': ['warn', { allow: ['error'] }],
Expand All @@ -896,7 +896,7 @@ module.exports = {
files: [
'x-pack/plugins/apm/**/*.stories.*',
'x-pack/plugins/observability/**/*.stories.*',
'x-pack/plugins/exploratory_view/**/*.stories.*',
'x-pack/plugins/observability_solution/exploratory_view/**/*.stories.*',
],
rules: {
'react/function-component-definition': [
Expand All @@ -912,15 +912,16 @@ module.exports = {
files: [
'x-pack/plugins/aiops/**/*.tsx',
'x-pack/plugins/apm/**/*.tsx',
'x-pack/plugins/exploratory_view/**/*.tsx',
'x-pack/plugins/observability_solution/exploratory_view/**/*.tsx',
'x-pack/plugins/infra/**/*.tsx',
'x-pack/plugins/observability/**/*.tsx',
'x-pack/plugins/observability_ai_assistant/**/*.tsx',
'x-pack/plugins/observability_onboarding/**/*.tsx',
'x-pack/plugins/observability_shared/**/*.tsx',
'x-pack/plugins/profiling/**/*.tsx',
'x-pack/plugins/synthetics/**/*.tsx',
'x-pack/plugins/ux/**/*.tsx',
'x-pack/plugins/observability_solution/observability_onboarding/**/*.tsx',
'x-pack/plugins/observability_solution/observability_ai_assistant/**/*.tsx',
'x-pack/plugins/observability_solution/observability_onboarding/**/*.tsx',
'x-pack/plugins/observability_solution/observability_shared/**/*.tsx',
'x-pack/plugins/observability_solution/profiling/**/*.tsx',
'x-pack/plugins/observability_solution/synthetics/**/*.tsx',
'x-pack/plugins/observability_solution/ux/**/*.tsx',
'src/plugins/ai_assistant_management/**/*.tsx',
],
rules: {
Expand All @@ -930,15 +931,16 @@ module.exports = {
{
files: [
'x-pack/plugins/apm/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/exploratory_view/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/observability_solution/exploratory_view/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/infra/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/observability/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/observability_ai_assistant/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/observability_onboarding/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/observability_shared/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/profiling/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/synthetics/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/ux/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/observability_solution/observability_onboarding/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/observability_solution/observability_ai_assistant/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/observability_solution/observability_onboarding/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/observability_solution/observability_shared/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/observability_solution/profiling/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/observability_solution/synthetics/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/observability_solution/ux/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'src/plugins/ai_assistant_management/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
],
rules: {
Expand All @@ -960,7 +962,7 @@ module.exports = {
},
// Profiling
{
files: ['x-pack/plugins/profiling/**/*.{js,mjs,ts,tsx}'],
files: ['x-pack/plugins/observability_solution/profiling/**/*.{js,mjs,ts,tsx}'],
rules: {
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': [
Expand All @@ -971,7 +973,9 @@ module.exports = {
},
{
// disable imports from legacy uptime plugin
files: ['x-pack/plugins/synthetics/public/apps/synthetics/**/*.{js,mjs,ts,tsx}'],
files: [
'x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/**/*.{js,mjs,ts,tsx}',
],
rules: {
'no-restricted-imports': [
'error',
Expand Down
Loading

0 comments on commit bbcd5d5

Please sign in to comment.