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

Should disable request with Range to use remote_downloader #22207

Closed
hunshcn opened this issue May 1, 2024 · 5 comments
Closed

Should disable request with Range to use remote_downloader #22207

hunshcn opened this issue May 1, 2024 · 5 comments
Labels
more data needed team-Remote-Exec Issues and PRs for the Execution (Remote) team type: bug untriaged

Comments

@hunshcn
Copy link

hunshcn commented May 1, 2024

Description of the bug:

I'm using https://github.com/chainguard-dev/rules_apko. It depends on Range download. (2 ways, credential_helper or headers attr(>=7.1.x)(processing chainguard-dev/rules_apko#56)

But Remote API do not support Range download.

There seems to be no solution at present.

I can think of two paths.

  1. add Range support for Remote API.
  2. it is forbidden for Range request to use remote_downloader.(it can be intelligent, or it can be a no_remote_downloader, just like a no_proxy).

Which category does this issue belong to?

Remote Execution

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

No response

Which operating system are you running Bazel on?

macos

What is the output of bazel info release?

7.1.1

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@github-actions github-actions bot added the team-Remote-Exec Issues and PRs for the Execution (Remote) team label May 1, 2024
@tjgq
Copy link
Contributor

tjgq commented May 7, 2024

At this time, we'd prefer to avoid making the download logic header-dependent (because it opens the door for doing the same for other HTTP headers, in the limit bringing the full complexity of the HTTP spec into Bazel). Can you open a feature request for Range header support at https://github.com/bazelbuild/remote-apis?

I'm also wondering why rules_apko must download individual artifacts via Range requests (which is a bit of an odd thing to do) instead of using a separate URL for each; if a rules_apko maintainer could comment here, it would help us understand how to prioritize this in the future.

@tjgq tjgq closed this as not planned Won't fix, can't repro, duplicate, stale Jun 18, 2024
@harshita-gupta
Copy link

I'm also wondering why rules_apko must download individual artifacts via Range requests (which is a bit of an odd thing to do) instead of using a separate URL for each; if a rules_apko maintainer could comment here, it would help us understand how to prioritize this in the future.

I'm not a rules_apko maintainer, but can comment on this. See the Alpine section of this blog post by @thesayyn from Aspect

It's necessary to use range headers when fetching packages for Linux Alpine. Per the APK format spec*, alpine packages are formatted as archives, which are always multiple gzip streams of tars combined. See the apk spec for more on the format of these binaries. This format is somewhat similar to .deb archives.

This issue is important because it essentially captures "remote downloads in bazel cannot support fetching alpine packages and .deb archives", which is a fairly major limitation.

This is a big drawback for those of us who use bazel remote execution; we're limited in how we can use bazel as a source-of-truth for hermetic builds of distroless-style lightweight base images

  • for those not already familiar, apk is the package manager for alpine linux

@harshita-gupta
Copy link

@tjgq would it be possible to re-evaluate this issue given the info provided above? ^

@tjgq
Copy link
Contributor

tjgq commented Jul 17, 2024

Thanks for the additional context! However, I maintain my opinion that the best way forward is to add Range support to the Remote Asset API.

@harshita-gupta
Copy link

created bazelbuild/remote-apis#305

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more data needed team-Remote-Exec Issues and PRs for the Execution (Remote) team type: bug untriaged
Projects
None yet
Development

No branches or pull requests

7 participants