Skip to content

Commit

Permalink
Make bcr_compatibility less prone to bazel version change (#2119)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorcloudy authored Nov 25, 2024
1 parent 496c0a9 commit 34820ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions buildkite/bazel-central-registry/bcr_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,12 @@ def select_modules_from_env_vars():

top_n = os.environ.get('SELECT_TOP_BCR_MODULES')
if top_n:
# Remove USE_BAZEL_VERSION to make this step more stable.
env = os.environ.copy()
env.pop("USE_BAZEL_VERSION", None)
output = subprocess.check_output(
["bazel", "run", "//tools:module_analyzer", "--", "--name-only", f"--top_n={top_n}"],
env = env,
)
top_modules = output.decode("utf-8").split()
MODULE_SELECTIONS = ','.join([f"{module}@latest" for module in top_modules])
Expand Down

0 comments on commit 34820ae

Please sign in to comment.