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

It appears that remote downloader does not pass HTTP headers #758

Closed
marekkrk opened this issue Jun 15, 2024 · 5 comments
Closed

It appears that remote downloader does not pass HTTP headers #758

marekkrk opened this issue Jun 15, 2024 · 5 comments

Comments

@marekkrk
Copy link

marekkrk commented Jun 15, 2024

When working with Bazel OCI rules I can download images from a local Docker registry with remote downloader disabled.

When I enable --experimental_remote_downloader, OCI rules fail to download images and the local Docker registry logs the following error:
"OCI manifest found, but accept header does not support OCI manifests"

This indicates that the remote downloader does not support headers passed to repository_ctx.download. Support for settings cutom headers is implemented in Bazel itself:
bazelbuild/bazel#17829
https://blog.aspect.build/custom-download-headers

@mostynb
Copy link
Collaborator

mostynb commented Jun 17, 2024

Hi, I'm not sure how this relates to bazel-remote?

@xuzhenglun
Copy link
Contributor

I submit a simple PR to support this. could u plz @marekkrk test for that ?

#760

For me, I'm a user of rules_oci, but rules_oci still not works even though all headers are handled. Since it looks like theAuthorization in ctx.download.auth params still not passthrough to FetchBlob now.

@marekkrk
Copy link
Author

Hi, I'm not sure how this relates to bazel-remote?

If you use --experimental_remote_downloader to delegate HTTP downloads from Bazel to Bazel Remote Cache, the cache appears to omit custom HTTP headers that Bazel itself supports since 7.1.0: bazelbuild/bazel#17829

@mostynb
Copy link
Collaborator

mostynb commented Jun 24, 2024

Merged @xuzhenglun's PR, hopefully that resolves this issue- please let me know if not.

@mostynb mostynb closed this as completed Jun 24, 2024
@marekkrk
Copy link
Author

Merged @xuzhenglun's PR, hopefully that resolves this issue- please let me know if not.

Thanks, will test by tomorrow.

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

No branches or pull requests

3 participants