Skip to content

[8.5.0] Allow --module_mirrors to be set per registry#27531

Merged
iancha1992 merged 2 commits intobazelbuild:release-8.5.0from
iancha1992:cp27490
Nov 12, 2025
Merged

[8.5.0] Allow --module_mirrors to be set per registry#27531
iancha1992 merged 2 commits intobazelbuild:release-8.5.0from
iancha1992:cp27490

Conversation

@iancha1992
Copy link
Member

RELNOTES: The --module_mirrors flag now supports specifying mirrors for individual registries via the syntax --module_mirrors=<registry>=<mirror1>[,<mirror2>,...].

Closes #27489.

PiperOrigin-RevId: 827534212
Change-Id: Id76f9d183ef6037f4b681b0132eb32a713d76f27

Commit 7c72ade

RELNOTES: The `--module_mirrors` flag now supports specifying mirrors for individual registries via the syntax `--module_mirrors=<registry>=<mirror1>[,<mirror2>,...]`.

Closes bazelbuild#27489.

PiperOrigin-RevId: 827534212
Change-Id: Id76f9d183ef6037f4b681b0132eb32a713d76f27
@iancha1992 iancha1992 requested a review from a team as a code owner November 4, 2025 21:50
@iancha1992 iancha1992 added team-Configurability platforms, toolchains, cquery, select(), config transitions team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. awaiting-review PR is awaiting review from an assigned reviewer labels Nov 4, 2025
@iancha1992 iancha1992 enabled auto-merge November 4, 2025 21:50
@meteorcloudy
Copy link
Member

@fmeum Can you please help fix this one?

@fmeum
Copy link
Collaborator

fmeum commented Nov 10, 2025

@iancha1992 Should be fixed by this patch:

diff --git a/src/test/java/com/google/devtools/build/lib/analysis/util/AnalysisTestCase.java b/src/test/java/com/google/devtools/build/lib/analysis/util/AnalysisTestCase.java
index eba5be40d4..9a2d873fd8 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/util/AnalysisTestCase.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/util/AnalysisTestCase.java
@@ -240,7 +240,7 @@ public abstract class AnalysisTestCase extends FoundationTestCase {
                 ImmutableList.of(
                     PrecomputedValue.injected(
                         ModuleFileFunction.REGISTRIES, ImmutableSet.of(registry.getUrl())),
-                    PrecomputedValue.injected(RegistryFunction.MODULE_MIRRORS, ImmutableSet.of()),
+                    PrecomputedValue.injected(RegistryFunction.MODULE_MIRRORS, ImmutableMap.of()),
                     PrecomputedValue.injected(ModuleFileFunction.IGNORE_DEV_DEPS, false),
                     PrecomputedValue.injected(
                         ModuleFileFunction.INJECTED_REPOSITORIES, ImmutableMap.of()),
@@ -303,7 +303,7 @@ public abstract class AnalysisTestCase extends FoundationTestCase {
                 RepositoryDelegatorFunction.VENDOR_DIRECTORY, Optional.empty()),
             PrecomputedValue.injected(
                 ModuleFileFunction.REGISTRIES, ImmutableSet.of(registry.getUrl())),
-            PrecomputedValue.injected(RegistryFunction.MODULE_MIRRORS, ImmutableSet.of()),
+            PrecomputedValue.injected(RegistryFunction.MODULE_MIRRORS, ImmutableMap.of()),
             PrecomputedValue.injected(ModuleFileFunction.IGNORE_DEV_DEPS, false),
             PrecomputedValue.injected(ModuleFileFunction.INJECTED_REPOSITORIES, ImmutableMap.of()),
             PrecomputedValue.injected(RepositoryDelegatorFunction.DISABLE_NATIVE_REPO_RULES, false),
diff --git a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/BazelModuleResolutionFunctionTest.java b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/BazelModuleResolutionFunctionTest.java
index 0ce6b1b27b..11aa05c717 100644
--- a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/BazelModuleResolutionFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/BazelModuleResolutionFunctionTest.java
@@ -177,7 +177,7 @@ public class BazelModuleResolutionFunctionTest extends FoundationTestCase {
     PrecomputedValue.STARLARK_SEMANTICS.set(
         differencer,
         StarlarkSemantics.builder().setBool(BuildLanguageOptions.ENABLE_BZLMOD, true).build());
-    RegistryFunction.MODULE_MIRRORS.set(differencer, ImmutableSet.of());
+    RegistryFunction.MODULE_MIRRORS.set(differencer, ImmutableMap.of());
     ModuleFileFunction.IGNORE_DEV_DEPS.set(differencer, false);
     ModuleFileFunction.INJECTED_REPOSITORIES.set(differencer, ImmutableMap.of());
     ModuleFileFunction.MODULE_OVERRIDES.set(differencer, ImmutableMap.of());
diff --git a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/BzlmodRepoRuleFunctionTest.java b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/BzlmodRepoRuleFunctionTest.java
index 175e0a8cd1..e154b0b8ab 100644
--- a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/BzlmodRepoRuleFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/BzlmodRepoRuleFunctionTest.java
@@ -154,7 +154,7 @@ public final class BzlmodRepoRuleFunctionTest extends FoundationTestCase {
 
     PrecomputedValue.STARLARK_SEMANTICS.set(differencer, StarlarkSemantics.DEFAULT);
     ModuleFileFunction.REGISTRIES.set(differencer, ImmutableSet.of());
-    RegistryFunction.MODULE_MIRRORS.set(differencer, ImmutableSet.of());
+    RegistryFunction.MODULE_MIRRORS.set(differencer, ImmutableMap.of());
     ModuleFileFunction.IGNORE_DEV_DEPS.set(differencer, false);
     ModuleFileFunction.INJECTED_REPOSITORIES.set(differencer, ImmutableMap.of());
     ModuleFileFunction.MODULE_OVERRIDES.set(differencer, ImmutableMap.of());
diff --git a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/DiscoveryTest.java b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/DiscoveryTest.java
index 446fc09b4b..033bcd459f 100644
--- a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/DiscoveryTest.java
+++ b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/DiscoveryTest.java
@@ -230,7 +230,7 @@ public class DiscoveryTest extends FoundationTestCase {
         differencer, Optional.empty());
     RepositoryDelegatorFunction.DISABLE_NATIVE_REPO_RULES.set(differencer, true);
     PrecomputedValue.REPO_ENV.set(differencer, ImmutableMap.of());
-    RegistryFunction.MODULE_MIRRORS.set(differencer, ImmutableSet.of());
+    RegistryFunction.MODULE_MIRRORS.set(differencer, ImmutableMap.of());
     ModuleFileFunction.IGNORE_DEV_DEPS.set(differencer, false);
     ModuleFileFunction.INJECTED_REPOSITORIES.set(differencer, ImmutableMap.of());
     ModuleFileFunction.MODULE_OVERRIDES.set(differencer, ImmutableMap.of());
diff --git a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleExtensionResolutionTest.java b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleExtensionResolutionTest.java
index d156af1f87..e40e717f44 100644
--- a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleExtensionResolutionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleExtensionResolutionTest.java
@@ -294,7 +294,7 @@ public class ModuleExtensionResolutionTest extends FoundationTestCase {
     ModuleFileFunction.MODULE_OVERRIDES.set(differencer, ImmutableMap.of());
     YankedVersionsUtil.ALLOWED_YANKED_VERSIONS.set(differencer, ImmutableList.of());
     ModuleFileFunction.REGISTRIES.set(differencer, ImmutableSet.of(registry.getUrl()));
-    RegistryFunction.MODULE_MIRRORS.set(differencer, ImmutableSet.of());
+    RegistryFunction.MODULE_MIRRORS.set(differencer, ImmutableMap.of());
     BazelModuleResolutionFunction.CHECK_DIRECT_DEPENDENCIES.set(
         differencer, CheckDirectDepsMode.WARNING);
     BazelModuleResolutionFunction.BAZEL_COMPATIBILITY_MODE.set(
diff --git a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleFileFunctionTest.java b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleFileFunctionTest.java
index 103c2661a5..533cfa3e18 100644
--- a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleFileFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleFileFunctionTest.java
@@ -210,7 +210,7 @@ public class ModuleFileFunctionTest extends FoundationTestCase {
     RepositoryDelegatorFunction.RESOLVED_FILE_INSTEAD_OF_WORKSPACE.set(
         differencer, Optional.empty());
     RepositoryDelegatorFunction.DISABLE_NATIVE_REPO_RULES.set(differencer, true);
-    RegistryFunction.MODULE_MIRRORS.set(differencer, ImmutableSet.of());
+    RegistryFunction.MODULE_MIRRORS.set(differencer, ImmutableMap.of());
     PrecomputedValue.REPO_ENV.set(differencer, ImmutableMap.of());
     ModuleFileFunction.IGNORE_DEV_DEPS.set(differencer, false);
     ModuleFileFunction.INJECTED_REPOSITORIES.set(differencer, ImmutableMap.of());
diff --git a/src/test/java/com/google/devtools/build/lib/query2/testutil/SkyframeQueryHelper.java b/src/test/java/com/google/devtools/build/lib/query2/testutil/SkyframeQueryHelper.java
index dd662b96a3..09de915b00 100644
--- a/src/test/java/com/google/devtools/build/lib/query2/testutil/SkyframeQueryHelper.java
+++ b/src/test/java/com/google/devtools/build/lib/query2/testutil/SkyframeQueryHelper.java
@@ -405,7 +405,7 @@ public abstract class SkyframeQueryHelper extends AbstractQueryHelper<Target> {
                         ModuleFileFunction.MODULE_OVERRIDES, ImmutableMap.of()),
                     PrecomputedValue.injected(
                         ModuleFileFunction.REGISTRIES, ImmutableSet.of(registry.getUrl())),
-                    PrecomputedValue.injected(RegistryFunction.MODULE_MIRRORS, ImmutableSet.of()),
+                    PrecomputedValue.injected(RegistryFunction.MODULE_MIRRORS, ImmutableMap.of()),
                     PrecomputedValue.injected(ModuleFileFunction.IGNORE_DEV_DEPS, false),
                     PrecomputedValue.injected(
                         ModuleFileFunction.INJECTED_REPOSITORIES, ImmutableMap.of()),
@@ -445,7 +445,7 @@ public abstract class SkyframeQueryHelper extends AbstractQueryHelper<Target> {
                 RepositoryDelegatorFunction.VENDOR_DIRECTORY, Optional.empty()),
             PrecomputedValue.injected(
                 ModuleFileFunction.REGISTRIES, ImmutableSet.of(registry.getUrl())),
-            PrecomputedValue.injected(RegistryFunction.MODULE_MIRRORS, ImmutableSet.of()),
+            PrecomputedValue.injected(RegistryFunction.MODULE_MIRRORS, ImmutableMap.of()),
             PrecomputedValue.injected(ModuleFileFunction.IGNORE_DEV_DEPS, false),
             PrecomputedValue.injected(ModuleFileFunction.INJECTED_REPOSITORIES, ImmutableMap.of()),
             PrecomputedValue.injected(RepositoryDelegatorFunction.DISABLE_NATIVE_REPO_RULES, false),
diff --git a/src/test/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorTest.java b/src/test/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorTest.java
index b6ad278357..43df66e673 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorTest.java
@@ -295,7 +295,7 @@ public class RepositoryDelegatorTest extends FoundationTestCase {
     BazelModuleResolutionFunction.BAZEL_COMPATIBILITY_MODE.set(
         differencer, BazelCompatibilityMode.ERROR);
     BazelLockFileFunction.LOCKFILE_MODE.set(differencer, LockfileMode.UPDATE);
-    RegistryFunction.MODULE_MIRRORS.set(differencer, ImmutableSet.of());
+    RegistryFunction.MODULE_MIRRORS.set(differencer, ImmutableMap.of());
   }
 
   @Test

@iancha1992 iancha1992 disabled auto-merge November 10, 2025 20:04
@iancha1992 iancha1992 enabled auto-merge November 10, 2025 20:04
@iancha1992 iancha1992 added this pull request to the merge queue Nov 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 12, 2025
@meteorcloudy meteorcloudy added this pull request to the merge queue Nov 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 12, 2025
@iancha1992 iancha1992 added this pull request to the merge queue Nov 12, 2025
Merged via the queue into bazelbuild:release-8.5.0 with commit 310f30c Nov 12, 2025
46 checks passed
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Nov 12, 2025
rdesgroppes added a commit to DataDog/datadog-agent that referenced this pull request Jan 13, 2026
This upgrade brings several performance improvements and bug fixes:

#### Performance improvements
- remote execution: bazelbuild/bazel#27564
- module extensions: bazelbuild/bazel#27296

#### Reliability improvements
- cache invalidation: bazelbuild/bazel#27417
- configuration: bazelbuild/bazel#27128
- Git repositories: bazelbuild/bazel#27705
- query:
  - bazelbuild/bazel#27560
  - bazelbuild/bazel#27117
- registry mirrors: bazelbuild/bazel#27531

#### Bug fixes
- remote cache: bazelbuild/bazel#27996
- repository handling: bazelbuild/bazel#27995
- repository cache: bazelbuild/bazel#28161
- local execution: bazelbuild/bazel#27994
rdesgroppes added a commit to DataDog/datadog-agent that referenced this pull request Jan 13, 2026
This upgrade brings several performance improvements and bug fixes:

## Performance improvements (8.5.0)
- Remote execution: Add --remote_max_concurrency_per_connection flag to control concurrent gRPC requests (default: 100)
  bazelbuild/bazel#27564
- Module extensions: Support storing/retrieving JSON-like Starlark objects without invalidation, reducing unnecessary rebuilds
  bazelbuild/bazel#27296

## Reliability improvements (8.5.0)
- Cache invalidation: Source directory contents now tracked for proper invalidation
  bazelbuild/bazel#27417
- Configuration: Add ctx.configuration.short_id for identifying configurations
  bazelbuild/bazel#27128
- Git repositories: git_repository now checks out default branch when unspecified
  bazelbuild/bazel#27705
- Query: Add executables() function and fix genquery for external repos
  bazelbuild/bazel#27560
  bazelbuild/bazel#27117
- Registry mirrors: --module_mirrors now supports per-registry mirror specification
  bazelbuild/bazel#27531

## Bug fixes (8.5.1)
- Remote cache: Add option to continue with local execution if remote cache is unavailable
  bazelbuild/bazel#27996
- Repository handling: Fix crash when mixing use_repo_rule and --inject_repository
  bazelbuild/bazel#27995
- Repository cache: Fix permission denied issue with --experimental_repository_cache_hardlinks
  bazelbuild/bazel#28161
- Local execution: Fix incorrect SkyframeLookupResult usage
  bazelbuild/bazel#27994

Both 8.5.0 and 8.5.1 are fully backward compatible with Bazel 8.0.

## Dependency updates
- Upgrade rules_go from 0.57.0 to 0.59.0 for Bazel 8.5+ compatibility
  bazel-contrib/rules_go#4493
- Configure sh_configure extension for rules_shell to auto-detect shell toolchain

## Platform-specific changes
- Windows: Configure hermetic shell via --repo_env=BAZEL_SH which is used by both
  sh_configure (sh_binary/sh_test) and --shell_executable (genrule/run_shell).
  This eliminates dependency on system environment variables.
- Windows: Disable code coverage collection (--nocollect_code_coverage) to avoid
  shell toolchain issues. Coverage requires sh_binary (collect_coverage) which
  needs a hermetic shell toolchain not yet available.
  bazelbuild/rules_shell#4

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
rdesgroppes added a commit to DataDog/datadog-agent that referenced this pull request Jan 13, 2026
This upgrade brings several performance improvements and bug fixes:

#### Performance improvements
- remote execution: bazelbuild/bazel#27564
- module extensions: bazelbuild/bazel#27296

#### Reliability improvements
- cache invalidation: bazelbuild/bazel#27417
- configuration: bazelbuild/bazel#27128
- Git repositories: bazelbuild/bazel#27705
- query:
  - bazelbuild/bazel#27560
  - bazelbuild/bazel#27117
- registry mirrors: bazelbuild/bazel#27531

#### Bug fixes
- remote cache: bazelbuild/bazel#27996
- repository handling: bazelbuild/bazel#27995
- repository cache: bazelbuild/bazel#28161
- local execution: bazelbuild/bazel#27994
dd-mergequeue bot pushed a commit to DataDog/datadog-agent that referenced this pull request Jan 15, 2026
### What does this PR do?
Bump `bazel` version from [8.4.2](https://github.com/bazelbuild/bazel/releases/tag/8.4.2) to [8.5.1](https://github.com/bazelbuild/bazel/releases/tag/8.5.1).

To make that happen, we also need to:
- specify which `bash` to use on Windows when evaluating **repository** rules, for compatibility with bazelbuild/bazel#26927:
  ```
  ERROR: /path/to/external/bazel_tools/tools/test/BUILD:23:10: in sh_binary rule @@bazel_tools//tools/test:collect_coverage: 
  Error in fail: No suitable shell toolchain found:
  * if you are running Bazel on Windows, set the BAZEL_SH environment variable to the path of bash.exe
  ```
  (actual job output: https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1349246422#L77)
- bump `rules_go` from (implicit) [0.57.0](https://github.com/bazel-contrib/rules_go/releases/tag/v0.57.0) to (explicit) [0.59.0](https://github.com/bazel-contrib/rules_go/releases/tag/v0.59.0) for bazel-contrib/rules_go/pull/4493 to be compatible with bazelbuild/bazel/pull/27296:
  ```
  Error: 'Facts' value has no field or method 'clear'
  ```

### Motivation
1. this upgrade alone brings several improvements and bug fixes, among which:
- bazelbuild/bazel#27117
- bazelbuild/bazel#27296
- bazelbuild/bazel#27417, covers:
  - bazelbuild/bazel#25834
  - bazelbuild/bazel#25863
  - bazelbuild/bazel#25864
  - bazelbuild/bazel#25870
  - bazelbuild/bazel#26698
- bazelbuild/bazel#27531
- bazelbuild/bazel#27560
- bazelbuild/bazel#27564
- bazelbuild/bazel#27705
- bazelbuild/bazel#27995
- bazelbuild/bazel#27996

2. `bazel` 9.0 is due soon, so better off favoring incremental bumps.

### Additional Notes
Leveraging [the latter](bazelbuild/bazel#27996) might allow us to later reconsider whether we'd like to go back to the `--remote_cache` flag (instead of the `--remote_executor` flag that we had to switch to in #44962).

Co-authored-by: regis.desgroppes <[email protected]>
JSGette pushed a commit to DataDog/datadog-agent that referenced this pull request Jan 16, 2026
### What does this PR do?
Bump `bazel` version from [8.4.2](https://github.com/bazelbuild/bazel/releases/tag/8.4.2) to [8.5.1](https://github.com/bazelbuild/bazel/releases/tag/8.5.1).

To make that happen, we also need to:
- specify which `bash` to use on Windows when evaluating **repository** rules, for compatibility with bazelbuild/bazel#26927:
  ```
  ERROR: /path/to/external/bazel_tools/tools/test/BUILD:23:10: in sh_binary rule @@bazel_tools//tools/test:collect_coverage: 
  Error in fail: No suitable shell toolchain found:
  * if you are running Bazel on Windows, set the BAZEL_SH environment variable to the path of bash.exe
  ```
  (actual job output: https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1349246422#L77)
- bump `rules_go` from (implicit) [0.57.0](https://github.com/bazel-contrib/rules_go/releases/tag/v0.57.0) to (explicit) [0.59.0](https://github.com/bazel-contrib/rules_go/releases/tag/v0.59.0) for bazel-contrib/rules_go/pull/4493 to be compatible with bazelbuild/bazel/pull/27296:
  ```
  Error: 'Facts' value has no field or method 'clear'
  ```

### Motivation
1. this upgrade alone brings several improvements and bug fixes, among which:
- bazelbuild/bazel#27117
- bazelbuild/bazel#27296
- bazelbuild/bazel#27417, covers:
  - bazelbuild/bazel#25834
  - bazelbuild/bazel#25863
  - bazelbuild/bazel#25864
  - bazelbuild/bazel#25870
  - bazelbuild/bazel#26698
- bazelbuild/bazel#27531
- bazelbuild/bazel#27560
- bazelbuild/bazel#27564
- bazelbuild/bazel#27705
- bazelbuild/bazel#27995
- bazelbuild/bazel#27996

2. `bazel` 9.0 is due soon, so better off favoring incremental bumps.

### Additional Notes
Leveraging [the latter](bazelbuild/bazel#27996) might allow us to later reconsider whether we'd like to go back to the `--remote_cache` flag (instead of the `--remote_executor` flag that we had to switch to in #44962).

Co-authored-by: regis.desgroppes <[email protected]>
theomagellan pushed a commit to DataDog/datadog-agent that referenced this pull request Jan 19, 2026
### What does this PR do?
Bump `bazel` version from [8.4.2](https://github.com/bazelbuild/bazel/releases/tag/8.4.2) to [8.5.1](https://github.com/bazelbuild/bazel/releases/tag/8.5.1).

To make that happen, we also need to:
- specify which `bash` to use on Windows when evaluating **repository** rules, for compatibility with bazelbuild/bazel#26927:
  ```
  ERROR: /path/to/external/bazel_tools/tools/test/BUILD:23:10: in sh_binary rule @@bazel_tools//tools/test:collect_coverage: 
  Error in fail: No suitable shell toolchain found:
  * if you are running Bazel on Windows, set the BAZEL_SH environment variable to the path of bash.exe
  ```
  (actual job output: https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1349246422#L77)
- bump `rules_go` from (implicit) [0.57.0](https://github.com/bazel-contrib/rules_go/releases/tag/v0.57.0) to (explicit) [0.59.0](https://github.com/bazel-contrib/rules_go/releases/tag/v0.59.0) for bazel-contrib/rules_go/pull/4493 to be compatible with bazelbuild/bazel/pull/27296:
  ```
  Error: 'Facts' value has no field or method 'clear'
  ```

### Motivation
1. this upgrade alone brings several improvements and bug fixes, among which:
- bazelbuild/bazel#27117
- bazelbuild/bazel#27296
- bazelbuild/bazel#27417, covers:
  - bazelbuild/bazel#25834
  - bazelbuild/bazel#25863
  - bazelbuild/bazel#25864
  - bazelbuild/bazel#25870
  - bazelbuild/bazel#26698
- bazelbuild/bazel#27531
- bazelbuild/bazel#27560
- bazelbuild/bazel#27564
- bazelbuild/bazel#27705
- bazelbuild/bazel#27995
- bazelbuild/bazel#27996

2. `bazel` 9.0 is due soon, so better off favoring incremental bumps.

### Additional Notes
Leveraging [the latter](bazelbuild/bazel#27996) might allow us to later reconsider whether we'd like to go back to the `--remote_cache` flag (instead of the `--remote_executor` flag that we had to switch to in #44962).

Co-authored-by: regis.desgroppes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Configurability platforms, toolchains, cquery, select(), config transitions team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants