Skip to content

Commit 96ef348

Browse files
authored
bcr_compatibility: Allow skipping waiting for approval (#2084)
1 parent 1c7d770 commit 96ef348

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

buildkite/bazel-central-registry/bcr_compatibility.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,19 +116,15 @@ def main():
116116
# Respect USE_BAZEL_VERSION to override bazel version in presubmit.yml files.
117117
bazel_version = os.environ.get("USE_BAZEL_VERSION")
118118
for module_name, module_version in modules:
119-
previous_size = len(pipeline_steps)
120-
121119
configs = bcr_presubmit.get_anonymous_module_task_config(module_name, module_version, bazel_version)
122120
bcr_presubmit.add_presubmit_jobs(module_name, module_version, configs.get("tasks", {}), pipeline_steps, overwrite_bazel_version=bazel_version, calc_concurrency=calc_concurrency)
123121
configs = bcr_presubmit.get_test_module_task_config(module_name, module_version, bazel_version)
124122
bcr_presubmit.add_presubmit_jobs(module_name, module_version, configs.get("tasks", {}), pipeline_steps, is_test_module=True, overwrite_bazel_version=bazel_version, calc_concurrency=calc_concurrency)
125123

126-
if len(pipeline_steps) == previous_size:
127-
bcr_presubmit.error("No pipeline steps generated for %s@%s. Please check the configuration." % (module_name, module_version))
128-
129124
if pipeline_steps:
130-
# Always wait for approval to proceed
131-
pipeline_steps = [{"block": "Please review generated jobs before proceeding", "blocked_state": "running"}] + pipeline_steps
125+
if not "SKIP_WAIT_FOR_APPROVAL" in os.environ:
126+
# Wait for approval to proceed
127+
pipeline_steps.insert(0, {"block": "Please review generated jobs before proceeding", "blocked_state": "running"})
132128
if bazelci.use_bazelisk_migrate():
133129
pipeline_steps += create_step_for_report_flags_results()
134130

0 commit comments

Comments
 (0)