bcr_presubmit: vendor test modules with "<major>.*" (#3000)
`prepare_test_module_repo` vendors the test module with
`USE_BAZEL_VERSION=<major>.x`, where `<major>` is the highest major in
the presubmit matrix (#2541). Bazelisk resolves `<major>.x` to the
latest release only, so for a major that only has release candidates so
far, such as Bazel 10 today, the step fails with `could not find any LTS
Bazel binaries for track 10`. Since every job runs this step, all jobs
of the module fail, not just those for that major. This happened in
bazelbuild/bazel-central-registry#11654 for a matrix of `["7.*", "8.*",
"9.*", "10.*"]`.
`<major>.*` also matches release candidates, which is what a `10.*`
matrix entry asks for anyway. Locally, `USE_BAZEL_VERSION='10.*'`
resolves to 10.0.0rc2, while `10.x` fails with the error above. For
majors that already have releases, the vendor step now picks up a newer
RC of that major if one is out, which shouldn't matter for resolving the
module graph and extracting its sources.
1 file changed