docs: Update docs for --downloader_config#29300
docs: Update docs for --downloader_config#29300dougthor42 wants to merge 3 commits intobazelbuild:masterfrom
--downloader_config#29300Conversation
This is basically just a rehash of src/main/.../bazel/repository/downloader/UrlRewriterConfig.java See also: bazelbuild#29286 (comment)
| 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
👍 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.
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
yah, the changes didn't get picked up.
There was a problem hiding this comment.
@dougthor42 Feel free to send a follow up PR to address the issue
…ains Also update UrlRewriterConfig.java to use rfc2606 domains too Followup to bazelbuild#29300 (comment)
…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
Description
Update the documentation for
--downloader_config. This is basically just a rehash of what's already insrc/main/.../bazel/repository/downloader/UrlRewriterConfig.javaMotivation
The docs were unclear to me (see #29286 (comment)) so I figured I'd clean them up.
Build API Changes
No
Checklist
Release Notes
RELNOTES: None