Skip to content

docs: Update docs for --downloader_config#29300

Closed
dougthor42 wants to merge 3 commits intobazelbuild:masterfrom
dougthor42:downloader-config-docs
Closed

docs: Update docs for --downloader_config#29300
dougthor42 wants to merge 3 commits intobazelbuild:masterfrom
dougthor42:downloader-config-docs

Conversation

@dougthor42
Copy link
Copy Markdown
Contributor

Description

Update the documentation for --downloader_config. This is basically just a rehash of what's already in src/main/.../bazel/repository/downloader/UrlRewriterConfig.java

Motivation

The docs were unclear to me (see #29286 (comment)) so I figured I'd clean them up.

Build API Changes

No

Checklist

  • [ N/A ] I have added tests for the new use cases (if any).
  • [ Y ] I have updated the documentation (if applicable).

Release Notes

RELNOTES: None

This is basically just a rehash of
src/main/.../bazel/repository/downloader/UrlRewriterConfig.java

See also: bazelbuild#29286 (comment)
@github-actions github-actions bot added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. awaiting-review PR is awaiting review from an assigned reviewer labels Apr 15, 2026
Copy link
Copy Markdown
Member

@meteorcloudy meteorcloudy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, thanks!!

@meteorcloudy meteorcloudy added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Apr 15, 2026
The `rewrite` directive takes two regex patterns: the first to match a URL
and the second to substitute matched URLs with. For example, `rewrite
github.com/bazel-contrib/rules_python/releases/download/(.*)/(.*)
mycorp.com/rules_python_mirror/$1/$2` will cause the downloader
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer to use domains that don't actually resolve to actual businesses.

See https://www.rfc-editor.org/rfc/rfc2606 for domains/tlds that are reserved for documentation purposes. For example:

  • example.org
  • mycorp.example.com
  • mycorp.example

the same comment for any other domains used here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 done. TIL that mycorp.com actually resolves to something!

Question: does the source .../bazel/repository/downloader/UrlRewriterConfig.java need to be updated as well? I'd be happy to do so.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a maintainer (so I don't have any authoritative opinion on this). Forgive my drive-by comment if that was the impression that was given.

I think it'd be nice to update that file too, but I'm not aware of it showing in any public documentation, so I don't think it's super critical.

I'm actually curious if changes made after a pull request transitions from label awaiting-review to awaiting-PR-merge will actually get reflected in the internal submission and the subsequent copybara commit here. I guess we can wait and see...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went ahead and updated the non-public ones too. Best practice and whatnot.

I can't speak to the copybara stuff, but if needed I can make the change internally instead of here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yah, the changes didn't get picked up.

b070d85

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dougthor42 Feel free to send a follow up PR to address the issue

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Opened #29315.

@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Apr 16, 2026
dougthor42 added a commit to dougthor42/bazel that referenced this pull request Apr 16, 2026
…ains

Also update UrlRewriterConfig.java to use rfc2606 domains too

Followup to bazelbuild#29300 (comment)
@dougthor42 dougthor42 deleted the downloader-config-docs branch April 16, 2026 17:16
copybara-service bot pushed a commit that referenced this pull request Apr 17, 2026
…ains (#29315)

### Description

Replace --downloader_config docs real domains with fake / rfc2606 domains.

Also update UrlRewriterConfig.java to use rfc2606 domains too.

Followup to #29300 (comment)

### Motivation

#29300 (comment)

### Build API Changes

No

### Checklist

- [ N/A ] I have added tests for the new use cases (if any).
- [ Y ] I have updated the documentation (if applicable).

### Release Notes

RELNOTES: None

Closes #29315.

PiperOrigin-RevId: 901190419
Change-Id: I0c9032f2e294a1452767a36fded17cfb587d9abb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants