-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for arbitrary headers rctx.download[_and_extract] #19501
Conversation
...ava/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java
Outdated
Show resolved
Hide resolved
...ava/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java
Outdated
Show resolved
Hide resolved
...ava/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java
Outdated
Show resolved
Hide resolved
...ava/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java
Outdated
Show resolved
Hide resolved
...ava/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java
Outdated
Show resolved
Hide resolved
@fmeum this is not quite what i want. Even with change, if you are using credential helpers, or some other credential factory, the headers disappear which doesn't solve the problem we are having. I want these headers to be set unconditionally for all URLs. credential helpers might override them but should not make the disappear. Would that still be acceptable here or should i go through an RFC process first? |
I don't know much about credential helpers. @Yannic Could you provide advice here? How should a credential helper interact with headers specified in Starlark? |
We should merge headers from the two sources. If the same header is provided from both sides, the value from the credential helper should take precedence, matching the preexisting behavior for the Starlark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
...java/com/google/devtools/build/lib/bazel/repository/downloader/HttpConnectorMultiplexer.java
Outdated
Show resolved
Hide resolved
...java/com/google/devtools/build/lib/bazel/repository/downloader/HttpConnectorMultiplexer.java
Outdated
Show resolved
Hide resolved
...ava/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java
Show resolved
Hide resolved
@fmeum this is ready I believe. After I get the okay from you, I'll add the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me with a few comments. Since @meteorcloudy and @tjgq seem to be on board, I think that you can go ahead with the tests.
...java/com/google/devtools/build/lib/bazel/repository/downloader/HttpConnectorMultiplexer.java
Outdated
Show resolved
Hide resolved
...java/com/google/devtools/build/lib/bazel/repository/downloader/HttpConnectorMultiplexer.java
Outdated
Show resolved
Hide resolved
...ava/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java
Outdated
Show resolved
Hide resolved
Great, will get into that today. |
…ownloader/HttpConnectorMultiplexer.java Co-authored-by: Fabian Meumertzheim <[email protected]>
…ownloader/HttpConnectorMultiplexer.java Co-authored-by: Fabian Meumertzheim <[email protected]>
@fmeum this should be ready. I'll wait for the CI. It would be sweet if we could get this cherry picked into 7.0 |
@thesayyn There are still CI failures. As far as I know the final RC for 7.0.0 is to be cut on Monday. @meteorcloudy Could you already take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, please fix the presubmit!
...ava/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java
Outdated
Show resolved
Hide resolved
it should pass now, will carefully watch and fix it if it doesn't throughout the day. |
@bazel-io fork 7.1.0 |
@thesayyn Can you please resolve the merge conflicts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good; do you mind rebasing to fix the merge conflict, and addressing my last two comments?
...ava/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java
Outdated
Show resolved
Hide resolved
...ava/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java
Outdated
Show resolved
Hide resolved
4b2879b
to
e2578f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for going the extra mile and implementing the more complex dict value type :)
Is there possibility that this could be released with 7.0? Since parallel downloads feature made it there it would be great to have this too. |
@thesayyn Sorry, Bazel 7 release has been lasting for more than a month, we already pushed back many feature cherry-picks to 7.1.0. We'll start preparing 7.1.0 shortly after Bazel 7 is out. |
@bazel-io fork 7.1.0 |
…ct] (#20979) fixes #17829 Closes #19501. PiperOrigin-RevId: 588750878 Change-Id: I11c982864135d8e1c4420099ce27f67accd3fe20 Co-authored-by: thesayyn <[email protected]>
…ct] (#20979) fixes #17829 Closes #19501. PiperOrigin-RevId: 588750878 Change-Id: I11c982864135d8e1c4420099ce27f67accd3fe20 Co-authored-by: thesayyn <[email protected]>
fixes #17829