Skip to content
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

Support passing headers to download if Bazel supports it #598

Conversation

ddeville
Copy link

Rather than falling back to curl let's actually pass the headers to the native Bazel downloader if we're running a version of Bazel that supports them (i.e. >= 7.1.0). I had to bring the bazel_features repo to detect this.

Note that I've kept support for curl rather than introducing the breaking change (as #562 discusses) so that we can start taking advantage of it without breaking for people still on older versions of Bazel.

Rather than falling back to curl let's actually pass the headers to the
native Bazel downloader if we're running a version of Bazel that
supports them (i.e. >= 7.1.0). I had to bring the `bazel_features` repo
to detect this.

Note that I've kept support for curl rather than introducing the
breaking change (as bazel-contrib#562 discusses) so that we can start taking
advantage of it without breaking for people still on older versions of
Bazel.
@thesayyn
Copy link
Collaborator

This is already landed on 2.x via #528

See https://github.com/bazel-contrib/rules_oci/blob/2.x/oci/private/pull.bzl

@ddeville
Copy link
Author

ah oops I didn't realize there was a 2.x branch...

@ddeville ddeville closed this May 30, 2024
@ddeville ddeville deleted the dev/damien/bazel-download-headers branch May 30, 2024 21:32
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.

2 participants