From df9cc7f648d57f5cfc8b1fbcd8ad282e65c3d064 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 30 Oct 2024 13:10:10 -0500 Subject: [PATCH] [ci] Run type checking before tests (#197539) --- .buildkite/pipelines/on_merge.yml | 90 ++++--------------- .../pipelines/pull_request/apm_cypress.yml | 1 + .buildkite/pipelines/pull_request/base.yml | 28 +++--- .../pipelines/pull_request/deploy_cloud.yml | 1 + .../pull_request/exploratory_view_plugin.yml | 1 + .buildkite/pipelines/pull_request/fips.yml | 1 + .../pipelines/pull_request/fleet_cypress.yml | 1 + .../pipelines/pull_request/kbn_handlebars.yml | 1 + .../observability_onboarding_cypress.yml | 1 + .../pull_request/profiling_cypress.yml | 1 + .../pipelines/pull_request/response_ops.yml | 1 + .../pull_request/response_ops_cases.yml | 1 + .../security_solution/ai_assistant.yml | 1 + .../security_solution/cypress_burn.yml | 3 + .../security_solution/defend_workflows.yml | 1 + .../security_solution/detection_engine.yml | 2 + .../security_solution/entity_analytics.yml | 1 + .../security_solution/explore.yml | 1 + .../security_solution/investigations.yml | 1 + .../security_solution/osquery_cypress.yml | 1 + .../security_solution/rule_management.yml | 2 + .../security_solution/threat_intelligence.yml | 1 + .../pipelines/pull_request/slo_plugin_e2e.yml | 1 + .../pull_request/synthetics_plugin.yml | 1 + .../pipelines/pull_request/uptime_plugin.yml | 1 + .../pipelines/pull_request/ux_plugin_e2e.yml | 1 + 26 files changed, 60 insertions(+), 86 deletions(-) diff --git a/.buildkite/pipelines/on_merge.yml b/.buildkite/pipelines/on_merge.yml index e7c1f95f616d6..002844b2cbe14 100644 --- a/.buildkite/pipelines/on_merge.yml +++ b/.buildkite/pipelines/on_merge.yml @@ -61,7 +61,6 @@ steps: provider: gcp machineType: n2-highcpu-8 preemptible: true - key: quick_checks timeout_in_minutes: 60 retry: automatic: @@ -76,7 +75,6 @@ steps: provider: gcp machineType: n2-standard-16 preemptible: true - key: linting timeout_in_minutes: 60 retry: automatic: @@ -91,8 +89,23 @@ steps: provider: gcp machineType: n2-standard-32 preemptible: true - key: linting_with_types - timeout_in_minutes: 90 + timeout_in_minutes: 60 + retry: + automatic: + - exit_status: '-1' + limit: 3 + + - command: .buildkite/scripts/steps/check_types.sh + label: 'Check Types' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: c4-standard-4 + diskType: 'hyperdisk-balanced' + preemptible: true + spotZones: us-central1-a,us-central1-b,us-central1-c + timeout_in_minutes: 60 retry: automatic: - exit_status: '-1' @@ -158,11 +171,6 @@ steps: provider: gcp machineType: n2-standard-4 preemptible: true - depends_on: - - build - - quick_checks - - linting - - linting_with_types timeout_in_minutes: 60 parallelism: 4 retry: @@ -178,11 +186,6 @@ steps: provider: gcp machineType: n2-standard-4 preemptible: true - depends_on: - - build - - quick_checks - - linting - - linting_with_types timeout_in_minutes: 60 parallelism: 6 retry: @@ -198,11 +201,6 @@ steps: provider: gcp machineType: n2-standard-4 preemptible: true - depends_on: - - build - - quick_checks - - linting - - linting_with_types timeout_in_minutes: 60 parallelism: 5 retry: @@ -218,11 +216,6 @@ steps: provider: gcp machineType: n2-standard-4 preemptible: true - depends_on: - - build - - quick_checks - - linting - - linting_with_types timeout_in_minutes: 60 parallelism: 6 retry: @@ -238,11 +231,6 @@ steps: provider: gcp machineType: n2-standard-4 preemptible: true - depends_on: - - build - - quick_checks - - linting - - linting_with_types timeout_in_minutes: 60 parallelism: 1 retry: @@ -258,11 +246,6 @@ steps: provider: gcp machineType: n2-standard-4 preemptible: true - depends_on: - - build - - quick_checks - - linting - - linting_with_types timeout_in_minutes: 60 parallelism: 2 retry: @@ -278,11 +261,6 @@ steps: provider: gcp machineType: n2-standard-4 preemptible: true - depends_on: - - build - - quick_checks - - linting - - linting_with_types timeout_in_minutes: 60 parallelism: 2 retry: @@ -298,11 +276,6 @@ steps: provider: gcp machineType: n2-standard-4 preemptible: true - depends_on: - - build - - quick_checks - - linting - - linting_with_types timeout_in_minutes: 60 parallelism: 6 retry: @@ -336,11 +309,6 @@ steps: provider: gcp machineType: n2-standard-4 preemptible: true - depends_on: - - build - - quick_checks - - linting - - linting_with_types timeout_in_minutes: 60 parallelism: 8 retry: @@ -358,11 +326,6 @@ steps: localSsds: 1 localSsdInterface: nvme machineType: n2-standard-4 - depends_on: - - build - - quick_checks - - linting - - linting_with_types timeout_in_minutes: 60 parallelism: 20 retry: @@ -373,11 +336,6 @@ steps: - command: '.buildkite/scripts/steps/functional/on_merge_unsupported_ftrs.sh' label: Trigger unsupported ftr tests timeout_in_minutes: 10 - depends_on: - - build - - quick_checks - - linting - - linting_with_types agents: image: family/kibana-ubuntu-2004 imageProject: elastic-images-prod @@ -398,20 +356,6 @@ steps: - exit_status: '-1' limit: 3 - - command: .buildkite/scripts/steps/check_types.sh - label: 'Check Types' - agents: - image: family/kibana-ubuntu-2004 - imageProject: elastic-images-prod - provider: gcp - machineType: n2-standard-4 - preemptible: true - timeout_in_minutes: 70 - retry: - automatic: - - exit_status: '-1' - limit: 3 - - command: .buildkite/scripts/steps/storybooks/build_and_upload.sh label: 'Build Storybooks' agents: diff --git a/.buildkite/pipelines/pull_request/apm_cypress.yml b/.buildkite/pipelines/pull_request/apm_cypress.yml index 9d2cca6d9d452..c0cb60dbc986b 100644 --- a/.buildkite/pipelines/pull_request/apm_cypress.yml +++ b/.buildkite/pipelines/pull_request/apm_cypress.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 120 parallelism: 1 # TODO: Set parallelism when apm_cypress handles it retry: diff --git a/.buildkite/pipelines/pull_request/base.yml b/.buildkite/pipelines/pull_request/base.yml index 5dcd9c2a9b186..85f9787a84ef4 100644 --- a/.buildkite/pipelines/pull_request/base.yml +++ b/.buildkite/pipelines/pull_request/base.yml @@ -50,7 +50,21 @@ steps: machineType: n2-standard-32 preemptible: true key: linting_with_types - timeout_in_minutes: 90 + timeout_in_minutes: 60 + retry: + automatic: + - exit_status: '-1' + limit: 3 + + - command: .buildkite/scripts/steps/check_types.sh + label: 'Check Types' + agents: + machineType: c4-standard-4 + diskType: 'hyperdisk-balanced' + preemptible: true + spotZones: us-central1-a,us-central1-b,us-central1-c + key: check_types + timeout_in_minutes: 60 retry: automatic: - exit_status: '-1' @@ -85,18 +99,6 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/steps/check_types.sh - label: 'Check Types' - agents: - machineType: n2-standard-4 - preemptible: true - key: check_types - timeout_in_minutes: 70 - retry: - automatic: - - exit_status: '-1' - limit: 3 - - command: .buildkite/scripts/steps/checks.sh label: 'Checks' key: checks diff --git a/.buildkite/pipelines/pull_request/deploy_cloud.yml b/.buildkite/pipelines/pull_request/deploy_cloud.yml index e82d1ef2e494c..6b42037b95953 100644 --- a/.buildkite/pipelines/pull_request/deploy_cloud.yml +++ b/.buildkite/pipelines/pull_request/deploy_cloud.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 30 soft_fail: true retry: diff --git a/.buildkite/pipelines/pull_request/exploratory_view_plugin.yml b/.buildkite/pipelines/pull_request/exploratory_view_plugin.yml index 42aaf59b1c1f2..c46edb528987a 100644 --- a/.buildkite/pipelines/pull_request/exploratory_view_plugin.yml +++ b/.buildkite/pipelines/pull_request/exploratory_view_plugin.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 artifact_paths: - 'x-pack/plugins/observability_solution/exploratory_view/e2e/.journeys/**/*' diff --git a/.buildkite/pipelines/pull_request/fips.yml b/.buildkite/pipelines/pull_request/fips.yml index 3fa0ed9bd2062..1a759e1288328 100644 --- a/.buildkite/pipelines/pull_request/fips.yml +++ b/.buildkite/pipelines/pull_request/fips.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 soft_fail: true retry: diff --git a/.buildkite/pipelines/pull_request/fleet_cypress.yml b/.buildkite/pipelines/pull_request/fleet_cypress.yml index 071106209caaa..d20591728b788 100644 --- a/.buildkite/pipelines/pull_request/fleet_cypress.yml +++ b/.buildkite/pipelines/pull_request/fleet_cypress.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 50 parallelism: 6 retry: diff --git a/.buildkite/pipelines/pull_request/kbn_handlebars.yml b/.buildkite/pipelines/pull_request/kbn_handlebars.yml index ad338ec425a04..36901a5d5c552 100644 --- a/.buildkite/pipelines/pull_request/kbn_handlebars.yml +++ b/.buildkite/pipelines/pull_request/kbn_handlebars.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 5 retry: automatic: diff --git a/.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml b/.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml index d0afe1cd138da..8906cc72fa81f 100644 --- a/.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml +++ b/.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 120 retry: automatic: diff --git a/.buildkite/pipelines/pull_request/profiling_cypress.yml b/.buildkite/pipelines/pull_request/profiling_cypress.yml index 2b86cffe75fa6..100e42206b3a1 100644 --- a/.buildkite/pipelines/pull_request/profiling_cypress.yml +++ b/.buildkite/pipelines/pull_request/profiling_cypress.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 120 parallelism: 2 retry: diff --git a/.buildkite/pipelines/pull_request/response_ops.yml b/.buildkite/pipelines/pull_request/response_ops.yml index a5c9b27ee7ecf..f09beb168259f 100644 --- a/.buildkite/pipelines/pull_request/response_ops.yml +++ b/.buildkite/pipelines/pull_request/response_ops.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 120 parallelism: 9 retry: diff --git a/.buildkite/pipelines/pull_request/response_ops_cases.yml b/.buildkite/pipelines/pull_request/response_ops_cases.yml index 994fbb6c4963a..5382ab6017fa6 100644 --- a/.buildkite/pipelines/pull_request/response_ops_cases.yml +++ b/.buildkite/pipelines/pull_request/response_ops_cases.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 120 retry: automatic: diff --git a/.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml b/.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml index 6b87f41d585f8..de0cf4daefe73 100644 --- a/.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml +++ b/.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 parallelism: 1 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/cypress_burn.yml b/.buildkite/pipelines/pull_request/security_solution/cypress_burn.yml index 1ba22d058e6c1..fc9fab0dec2ae 100644 --- a/.buildkite/pipelines/pull_request/security_solution/cypress_burn.yml +++ b/.buildkite/pipelines/pull_request/security_solution/cypress_burn.yml @@ -11,6 +11,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 soft_fail: true parallelism: 1 @@ -27,6 +28,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 parallelism: 1 retry: @@ -43,6 +45,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 50 soft_fail: true retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml b/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml index ea7613fd81cba..e8b399ed3ef60 100644 --- a/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml +++ b/.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml @@ -11,6 +11,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 parallelism: 20 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml b/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml index f18d187aab9e7..e879d2ad267f0 100644 --- a/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml +++ b/.buildkite/pipelines/pull_request/security_solution/detection_engine.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 parallelism: 5 retry: @@ -26,6 +27,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 parallelism: 2 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/entity_analytics.yml b/.buildkite/pipelines/pull_request/security_solution/entity_analytics.yml index 16e1860a1453c..4e74af8f80742 100644 --- a/.buildkite/pipelines/pull_request/security_solution/entity_analytics.yml +++ b/.buildkite/pipelines/pull_request/security_solution/entity_analytics.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 parallelism: 2 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/explore.yml b/.buildkite/pipelines/pull_request/security_solution/explore.yml index 5fa4229e7dbde..5121899c17a59 100644 --- a/.buildkite/pipelines/pull_request/security_solution/explore.yml +++ b/.buildkite/pipelines/pull_request/security_solution/explore.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 parallelism: 2 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/investigations.yml b/.buildkite/pipelines/pull_request/security_solution/investigations.yml index fd59fa954c2d8..84c71c83df821 100644 --- a/.buildkite/pipelines/pull_request/security_solution/investigations.yml +++ b/.buildkite/pipelines/pull_request/security_solution/investigations.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 parallelism: 7 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml b/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml index cb04f1559f3b1..8d7650e93647c 100644 --- a/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml +++ b/.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 parallelism: 8 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/rule_management.yml b/.buildkite/pipelines/pull_request/security_solution/rule_management.yml index 887e1c8597af7..f49a96da39a89 100644 --- a/.buildkite/pipelines/pull_request/security_solution/rule_management.yml +++ b/.buildkite/pipelines/pull_request/security_solution/rule_management.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 parallelism: 4 retry: @@ -26,6 +27,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 parallelism: 2 retry: diff --git a/.buildkite/pipelines/pull_request/security_solution/threat_intelligence.yml b/.buildkite/pipelines/pull_request/security_solution/threat_intelligence.yml index ca901dba2fdf8..decf012f93f8d 100644 --- a/.buildkite/pipelines/pull_request/security_solution/threat_intelligence.yml +++ b/.buildkite/pipelines/pull_request/security_solution/threat_intelligence.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 parallelism: 1 retry: diff --git a/.buildkite/pipelines/pull_request/slo_plugin_e2e.yml b/.buildkite/pipelines/pull_request/slo_plugin_e2e.yml index 025c80809ab35..3d1a4f9b46f41 100644 --- a/.buildkite/pipelines/pull_request/slo_plugin_e2e.yml +++ b/.buildkite/pipelines/pull_request/slo_plugin_e2e.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 30 artifact_paths: - 'x-pack/plugins/observability_solution/slo/e2e/.journeys/**/*' diff --git a/.buildkite/pipelines/pull_request/synthetics_plugin.yml b/.buildkite/pipelines/pull_request/synthetics_plugin.yml index 0707650aa7c01..f5d6b841a953d 100644 --- a/.buildkite/pipelines/pull_request/synthetics_plugin.yml +++ b/.buildkite/pipelines/pull_request/synthetics_plugin.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 artifact_paths: - 'x-pack/plugins/observability_solution/synthetics/e2e/.journeys/**/*' diff --git a/.buildkite/pipelines/pull_request/uptime_plugin.yml b/.buildkite/pipelines/pull_request/uptime_plugin.yml index 33a529739ae6f..a03915ef77099 100644 --- a/.buildkite/pipelines/pull_request/uptime_plugin.yml +++ b/.buildkite/pipelines/pull_request/uptime_plugin.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 artifact_paths: - 'x-pack/plugins/observability_solution/synthetics/e2e/.journeys/**/*' diff --git a/.buildkite/pipelines/pull_request/ux_plugin_e2e.yml b/.buildkite/pipelines/pull_request/ux_plugin_e2e.yml index 977701cc99485..cd95f44fa2e86 100644 --- a/.buildkite/pipelines/pull_request/ux_plugin_e2e.yml +++ b/.buildkite/pipelines/pull_request/ux_plugin_e2e.yml @@ -9,6 +9,7 @@ steps: - quick_checks - linting - linting_with_types + - check_types timeout_in_minutes: 60 artifact_paths: - 'x-pack/plugins/observability_solution/ux/e2e/.journeys/**/*'