From 3db951a037a9977918785871f4f70a5a9176b42e Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Mon, 13 May 2024 18:26:18 -0700 Subject: [PATCH] chore: reduce active polling in code build workflows (#13780) * chore: try codebuild optimizations * regenerate --- codebuild_specs/build_pkg_binaries_arm.yml | 1 - codebuild_specs/build_pkg_binaries_linux.yml | 1 - codebuild_specs/build_pkg_binaries_macos.yml | 1 - codebuild_specs/build_pkg_binaries_win.yml | 1 - codebuild_specs/e2e_workflow.yml | 22 +++++++++++++++++-- codebuild_specs/e2e_workflow_base.yml | 22 +++++++++++++++++-- codebuild_specs/e2e_workflow_generated.yml | 22 +++++++++++++++++-- codebuild_specs/pr_workflow.yml | 15 ++++++++----- codebuild_specs/publish_to_local_registry.yml | 1 - .../release_workflows/hotfix_workflow.yml | 15 ++++++++----- .../release_workflows/release_rc_workflow.yml | 20 +++++++++++------ .../release_workflows/release_workflow.yml | 20 +++++++++++------ .../tagged_release_without_e2e_workflow.yml | 20 +++++++++++------ codebuild_specs/upload_pkg_binaries.yml | 1 - codebuild_specs/verify_pkg_cli.yml | 1 - codebuild_specs/verify_versions_match.yml | 1 - codebuild_specs/wait_upb.json | 1 - 17 files changed, 117 insertions(+), 48 deletions(-) delete mode 100644 codebuild_specs/wait_upb.json diff --git a/codebuild_specs/build_pkg_binaries_arm.yml b/codebuild_specs/build_pkg_binaries_arm.yml index 92ab86ee8e6..713fd9f379f 100644 --- a/codebuild_specs/build_pkg_binaries_arm.yml +++ b/codebuild_specs/build_pkg_binaries_arm.yml @@ -4,7 +4,6 @@ env: phases: build: commands: - - source shared-scripts.sh && _waitForJobs publish_to_local_registry requirePrevJobsToSucceed - source ./shared-scripts.sh && _buildBinaries arm artifacts: diff --git a/codebuild_specs/build_pkg_binaries_linux.yml b/codebuild_specs/build_pkg_binaries_linux.yml index 9a574400a46..27321edf322 100644 --- a/codebuild_specs/build_pkg_binaries_linux.yml +++ b/codebuild_specs/build_pkg_binaries_linux.yml @@ -4,7 +4,6 @@ env: phases: build: commands: - - source shared-scripts.sh && _waitForJobs publish_to_local_registry requirePrevJobsToSucceed - source ./shared-scripts.sh && _buildBinaries linux artifacts: diff --git a/codebuild_specs/build_pkg_binaries_macos.yml b/codebuild_specs/build_pkg_binaries_macos.yml index 29973074d97..aa2df3c57e7 100644 --- a/codebuild_specs/build_pkg_binaries_macos.yml +++ b/codebuild_specs/build_pkg_binaries_macos.yml @@ -4,7 +4,6 @@ env: phases: build: commands: - - source shared-scripts.sh && _waitForJobs publish_to_local_registry requirePrevJobsToSucceed - source ./shared-scripts.sh && _buildBinaries macos artifacts: diff --git a/codebuild_specs/build_pkg_binaries_win.yml b/codebuild_specs/build_pkg_binaries_win.yml index 77be97c9a2a..8567c46b44f 100644 --- a/codebuild_specs/build_pkg_binaries_win.yml +++ b/codebuild_specs/build_pkg_binaries_win.yml @@ -4,7 +4,6 @@ env: phases: build: commands: - - source shared-scripts.sh && _waitForJobs publish_to_local_registry requirePrevJobsToSucceed - source ./shared-scripts.sh && _buildBinaries win artifacts: diff --git a/codebuild_specs/e2e_workflow.yml b/codebuild_specs/e2e_workflow.yml index d748961a8bf..6c5db7adbbc 100644 --- a/codebuild_specs/e2e_workflow.yml +++ b/codebuild_specs/e2e_workflow.yml @@ -58,36 +58,54 @@ batch: - build_linux - identifier: publish_to_local_registry buildspec: codebuild_specs/publish_to_local_registry.yml + depend-on: + - build_linux env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_arm buildspec: codebuild_specs/build_pkg_binaries_arm.yml + depend-on: + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_linux buildspec: codebuild_specs/build_pkg_binaries_linux.yml + depend-on: + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_macos buildspec: codebuild_specs/build_pkg_binaries_macos.yml + depend-on: + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_win buildspec: codebuild_specs/build_pkg_binaries_win.yml + depend-on: + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: upb buildspec: codebuild_specs/upload_pkg_binaries.yml + depend-on: + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win env: compute-type: BUILD_GENERAL1_LARGE - identifier: verify_versions_match buildspec: codebuild_specs/verify_versions_match.yml depend-on: - - build_linux + - publish_to_local_registry - identifier: verify_pkg_cli buildspec: codebuild_specs/verify_pkg_cli.yml depend-on: - - build_linux + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win env: compute-type: BUILD_GENERAL1_LARGE - identifier: run_e2e_tests_linux diff --git a/codebuild_specs/e2e_workflow_base.yml b/codebuild_specs/e2e_workflow_base.yml index 610896d92b8..c3ac346ff35 100644 --- a/codebuild_specs/e2e_workflow_base.yml +++ b/codebuild_specs/e2e_workflow_base.yml @@ -60,36 +60,54 @@ batch: - build_linux - identifier: publish_to_local_registry buildspec: codebuild_specs/publish_to_local_registry.yml + depend-on: + - build_linux env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_arm buildspec: codebuild_specs/build_pkg_binaries_arm.yml + depend-on: + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_linux buildspec: codebuild_specs/build_pkg_binaries_linux.yml + depend-on: + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_macos buildspec: codebuild_specs/build_pkg_binaries_macos.yml + depend-on: + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_win buildspec: codebuild_specs/build_pkg_binaries_win.yml + depend-on: + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: upb buildspec: codebuild_specs/upload_pkg_binaries.yml + depend-on: + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win env: compute-type: BUILD_GENERAL1_LARGE - identifier: verify_versions_match buildspec: codebuild_specs/verify_versions_match.yml depend-on: - - build_linux + - publish_to_local_registry - identifier: verify_pkg_cli buildspec: codebuild_specs/verify_pkg_cli.yml depend-on: - - build_linux + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win env: compute-type: BUILD_GENERAL1_LARGE - identifier: integration_test diff --git a/codebuild_specs/e2e_workflow_generated.yml b/codebuild_specs/e2e_workflow_generated.yml index 858f7df6824..bcbc6cfac46 100644 --- a/codebuild_specs/e2e_workflow_generated.yml +++ b/codebuild_specs/e2e_workflow_generated.yml @@ -60,36 +60,54 @@ batch: - build_linux - identifier: publish_to_local_registry buildspec: codebuild_specs/publish_to_local_registry.yml + depend-on: + - build_linux env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_arm buildspec: codebuild_specs/build_pkg_binaries_arm.yml + depend-on: + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_linux buildspec: codebuild_specs/build_pkg_binaries_linux.yml + depend-on: + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_macos buildspec: codebuild_specs/build_pkg_binaries_macos.yml + depend-on: + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_win buildspec: codebuild_specs/build_pkg_binaries_win.yml + depend-on: + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: upb buildspec: codebuild_specs/upload_pkg_binaries.yml + depend-on: + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win env: compute-type: BUILD_GENERAL1_LARGE - identifier: verify_versions_match buildspec: codebuild_specs/verify_versions_match.yml depend-on: - - build_linux + - publish_to_local_registry - identifier: verify_pkg_cli buildspec: codebuild_specs/verify_pkg_cli.yml depend-on: - - build_linux + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win env: compute-type: BUILD_GENERAL1_LARGE - identifier: integration_test diff --git a/codebuild_specs/pr_workflow.yml b/codebuild_specs/pr_workflow.yml index e547971549f..aec50c0a503 100644 --- a/codebuild_specs/pr_workflow.yml +++ b/codebuild_specs/pr_workflow.yml @@ -63,37 +63,40 @@ batch: - identifier: build_pkg_binaries_arm buildspec: codebuild_specs/build_pkg_binaries_arm.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_linux buildspec: codebuild_specs/build_pkg_binaries_linux.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_macos buildspec: codebuild_specs/build_pkg_binaries_macos.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_win buildspec: codebuild_specs/build_pkg_binaries_win.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: verify_pkg_cli buildspec: codebuild_specs/verify_pkg_cli.yml depend-on: - - build_linux + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win env: compute-type: BUILD_GENERAL1_LARGE - identifier: verify_versions_match buildspec: codebuild_specs/verify_versions_match.yml depend-on: - - build_linux + - publish_to_local_registry - identifier: verify_e2e_workflow_generated buildspec: codebuild_specs/verify_e2e_workflow_generated.yml depend-on: diff --git a/codebuild_specs/publish_to_local_registry.yml b/codebuild_specs/publish_to_local_registry.yml index d902d065ab1..aeca3982d0c 100644 --- a/codebuild_specs/publish_to_local_registry.yml +++ b/codebuild_specs/publish_to_local_registry.yml @@ -4,7 +4,6 @@ env: phases: build: commands: - - source shared-scripts.sh && _waitForJobs build_linux requirePrevJobsToSucceed - source ./shared-scripts.sh && _publishToLocalRegistry artifacts: diff --git a/codebuild_specs/release_workflows/hotfix_workflow.yml b/codebuild_specs/release_workflows/hotfix_workflow.yml index 16314b27197..070f1a4eda0 100644 --- a/codebuild_specs/release_workflows/hotfix_workflow.yml +++ b/codebuild_specs/release_workflows/hotfix_workflow.yml @@ -56,34 +56,37 @@ batch: - identifier: build_pkg_binaries_arm buildspec: codebuild_specs/build_pkg_binaries_arm.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_linux buildspec: codebuild_specs/build_pkg_binaries_linux.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_macos buildspec: codebuild_specs/build_pkg_binaries_macos.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_win buildspec: codebuild_specs/build_pkg_binaries_win.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: verify_versions_match buildspec: codebuild_specs/verify_versions_match.yml depend-on: - - build_linux + - publish_to_local_registry - identifier: verify_pkg_cli buildspec: codebuild_specs/verify_pkg_cli.yml depend-on: - - build_linux + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win env: compute-type: BUILD_GENERAL1_LARGE diff --git a/codebuild_specs/release_workflows/release_rc_workflow.yml b/codebuild_specs/release_workflows/release_rc_workflow.yml index 2fb2697c24b..04e50f4eb9e 100644 --- a/codebuild_specs/release_workflows/release_rc_workflow.yml +++ b/codebuild_specs/release_workflows/release_rc_workflow.yml @@ -35,43 +35,49 @@ batch: - identifier: build_pkg_binaries_arm buildspec: codebuild_specs/build_pkg_binaries_arm.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_linux buildspec: codebuild_specs/build_pkg_binaries_linux.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_macos buildspec: codebuild_specs/build_pkg_binaries_macos.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_win buildspec: codebuild_specs/build_pkg_binaries_win.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: upb buildspec: codebuild_specs/upload_pkg_binaries.yml depend-on: - - build_linux + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win env: compute-type: BUILD_GENERAL1_LARGE - identifier: verify_pkg_cli buildspec: codebuild_specs/verify_pkg_cli.yml depend-on: - - build_linux + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win env: compute-type: BUILD_GENERAL1_LARGE - identifier: verify_versions_match buildspec: codebuild_specs/verify_versions_match.yml depend-on: - - build_linux + - publish_to_local_registry - identifier: publish_to_npm buildspec: codebuild_specs/publish_to_npm.yml env: diff --git a/codebuild_specs/release_workflows/release_workflow.yml b/codebuild_specs/release_workflows/release_workflow.yml index 9c909d5e063..ee5f7a4ff3b 100644 --- a/codebuild_specs/release_workflows/release_workflow.yml +++ b/codebuild_specs/release_workflows/release_workflow.yml @@ -35,43 +35,49 @@ batch: - identifier: build_pkg_binaries_arm buildspec: codebuild_specs/build_pkg_binaries_arm.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_linux buildspec: codebuild_specs/build_pkg_binaries_linux.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_macos buildspec: codebuild_specs/build_pkg_binaries_macos.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_win buildspec: codebuild_specs/build_pkg_binaries_win.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: upb buildspec: codebuild_specs/upload_pkg_binaries.yml depend-on: - - build_linux + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win env: compute-type: BUILD_GENERAL1_LARGE - identifier: verify_pkg_cli buildspec: codebuild_specs/verify_pkg_cli.yml depend-on: - - build_linux + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win env: compute-type: BUILD_GENERAL1_LARGE - identifier: verify_versions_match buildspec: codebuild_specs/verify_versions_match.yml depend-on: - - build_linux + - publish_to_local_registry - identifier: github_prerelease buildspec: codebuild_specs/release_workflows/github_prerelease.yml env: diff --git a/codebuild_specs/release_workflows/tagged_release_without_e2e_workflow.yml b/codebuild_specs/release_workflows/tagged_release_without_e2e_workflow.yml index b67c511cf7e..18b27f14dc3 100644 --- a/codebuild_specs/release_workflows/tagged_release_without_e2e_workflow.yml +++ b/codebuild_specs/release_workflows/tagged_release_without_e2e_workflow.yml @@ -34,43 +34,49 @@ batch: - identifier: build_pkg_binaries_arm buildspec: codebuild_specs/build_pkg_binaries_arm.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_linux buildspec: codebuild_specs/build_pkg_binaries_linux.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_macos buildspec: codebuild_specs/build_pkg_binaries_macos.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_win buildspec: codebuild_specs/build_pkg_binaries_win.yml depend-on: - - build_linux + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE - identifier: upb buildspec: codebuild_specs/upload_pkg_binaries.yml depend-on: - - build_linux + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win env: compute-type: BUILD_GENERAL1_LARGE - identifier: verify_pkg_cli buildspec: codebuild_specs/verify_pkg_cli.yml depend-on: - - build_linux + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win env: compute-type: BUILD_GENERAL1_LARGE - identifier: verify_versions_match buildspec: codebuild_specs/verify_versions_match.yml depend-on: - - build_linux + - publish_to_local_registry - identifier: publish_to_npm buildspec: codebuild_specs/publish_to_npm.yml env: diff --git a/codebuild_specs/upload_pkg_binaries.yml b/codebuild_specs/upload_pkg_binaries.yml index 1ce230197f8..902272d89bb 100644 --- a/codebuild_specs/upload_pkg_binaries.yml +++ b/codebuild_specs/upload_pkg_binaries.yml @@ -4,7 +4,6 @@ env: phases: build: commands: - - source shared-scripts.sh && _waitForJobs $CODEBUILD_SRC_DIR/codebuild_specs/wait_upb.json requirePrevJobsToSucceed - source ./shared-scripts.sh && _uploadPkgBinaries artifacts: diff --git a/codebuild_specs/verify_pkg_cli.yml b/codebuild_specs/verify_pkg_cli.yml index b26a8849c6b..43dcd188d81 100644 --- a/codebuild_specs/verify_pkg_cli.yml +++ b/codebuild_specs/verify_pkg_cli.yml @@ -4,7 +4,6 @@ env: phases: build: commands: - - source shared-scripts.sh && _waitForJobs $CODEBUILD_SRC_DIR/codebuild_specs/wait_upb.json requirePrevJobsToSucceed - source ./shared-scripts.sh && _verifyPkgCLI artifacts: files: diff --git a/codebuild_specs/verify_versions_match.yml b/codebuild_specs/verify_versions_match.yml index a8d64d2321e..209140983c6 100644 --- a/codebuild_specs/verify_versions_match.yml +++ b/codebuild_specs/verify_versions_match.yml @@ -4,7 +4,6 @@ env: phases: build: commands: - - source shared-scripts.sh && _waitForJobs publish_to_local_registry requirePrevJobsToSucceed - source ./shared-scripts.sh && _verifyVersionsMatch artifacts: files: diff --git a/codebuild_specs/wait_upb.json b/codebuild_specs/wait_upb.json deleted file mode 100644 index e4d1cbf0bd2..00000000000 --- a/codebuild_specs/wait_upb.json +++ /dev/null @@ -1 +0,0 @@ -["build_pkg_binaries_arm", "build_pkg_binaries_linux", "build_pkg_binaries_macos", "build_pkg_binaries_win"]