Skip to content

build: factor downloader flags into downloader_cfg.bazelrc - #4476

Draft
rickeylev wants to merge 2 commits into
bazel-contrib:mainfrom
rickeylev:add_downloader_mirror_config
Draft

rickeylev wants to merge 2 commits into
bazel-contrib:mainfrom
rickeylev:add_downloader_mirror_config

Conversation

@rickeylev

Copy link
Copy Markdown
Collaborator

Every workspace .bazelrc repeated the same downloader config,
timeout scaling, and retry flags, requiring manual edits across 26
files whenever downloader settings change.

Factor the shared flags into downloader_cfg.bazelrc (synced to
gazelle/ and sphinxdocs/ via dev/sync_downloader_configs.py),
add relative-path wrappers in examples/downloader_cfg.bazelrc and
tests/integration/downloader_cfg.bazelrc, and update workspace
.bazelrc files to import them.

Every workspace `.bazelrc` repeated the same downloader config,
timeout scaling, and retry flags, requiring manual edits across 26
files whenever downloader settings change.

Factor the shared flags into `downloader_cfg.bazelrc` (synced to
`gazelle/` and `sphinxdocs/` via `dev/sync_downloader_configs.py`),
add relative-path wrappers in `examples/downloader_cfg.bazelrc` and
`tests/integration/downloader_cfg.bazelrc`, and update workspace
`.bazelrc` files to import them.
@rickeylev

Copy link
Copy Markdown
Collaborator Author

An AI coding agent assisted with authoring this pull request. The human author (@rickeylev) will review all feedback and either respond directly or review and approve any agent-assisted responses and changes before they are posted.

This is an automatically generated agent comment.

…l 10

In Bazel 10 (`10.0.0rc2`), `--downloader_config` (and its alias
`--experimental_downloader_config`) changed from single-valued to
`allowMultiple = true`, accumulating all specified config paths instead
of overriding earlier ones. When sub-workspaces imported
`downloader_cfg.bazelrc` and appended a relative path override, Bazel 10
attempted to read both `downloader_config.cfg` and the relative path.

Keep the shared timeout and retry flags in `downloader_cfg.bazelrc` and
set `--experimental_downloader_config` once per workspace depth in
`.bazelrc`, `gazelle/.bazelrc`, `sphinxdocs/.bazelrc`, and the sub-workspace
`downloader_cfg.bazelrc` wrappers.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant