commit | 237309f9fe0fcafd392ee56ee12e7c1d72a66274 | [log] [tgz] |
---|---|---|
author | Yun Peng <pcloudy@google.com> | Tue Apr 25 15:30:43 2023 +0200 |
committer | GitHub <noreply@github.com> | Tue Apr 25 15:30:43 2023 +0200 |
tree | 17dbceb42b147b7d1f987c8e4dcc0f4f8cfdd579 | |
parent | ab786adec9cc386e442028b27823ffb56e019644 [diff] [blame] |
Sort the result of matrix attribute combinations to make sure the expanded config result is stable (#1598) Fixes https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/2980#0187b62c-df13-48e9-b08a-f463da00dbfa where the job tried to download Windows Bazel binary on macOS. This happened because the result of https://github.com/bazelbuild/continuous-integration/blob/8bbca481121dc0188f816982fa9b1a9dcd44044b/buildkite/bazelci.py#L1010 was not stable, which means `all_tests_workspace_config_05` may point to the Windows config during the "Setup pipeline" job, but points to a Mac config when actually running the job.
diff --git a/buildkite/bazelci.py b/buildkite/bazelci.py index ca60a1d..fc9b0a2 100755 --- a/buildkite/bazelci.py +++ b/buildkite/bazelci.py
@@ -979,7 +979,7 @@ if attr not in matrix: raise BuildkiteException("${{ %s }} is not defined in `matrix` section." % attr) pairs = [[(attr, value) for value in matrix[attr]] for attr in attributes] - return itertools.product(*pairs) + return sorted(itertools.product(*pairs)) def get_expanded_task(task, combination):