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

remotecache: remove cache manifest size limit check #4917

Conversation

dejanceltra
Copy link

Removes arbitrary remote cache manifest limit of 1 MB, which was added here: 80d2f82#diff-43026ef44c9363551fae4714a9441a4fdc4e61ab4b315c07f29fd10f1199cfeaR80-R83

Resolves #4916

Signed-off-by: Dejan Levec <90892252+dejanceltra@users.noreply.github.com>
@dejanceltra dejanceltra force-pushed the remove-remote-cache-manifest-size-limit-check branch from a7cde8c to c55adde Compare May 13, 2024 07:29
@jedevc
Copy link
Member

jedevc commented May 13, 2024

No objections to removing the limit, but I am curious - how are you ending up with a 1MB cache manifest? That's quite large, are your builds just very large? Or is there some manifest manipulation going on?

@dejanceltra
Copy link
Author

@jedevc Large, ~30 stage Dockerfile, with ~250 instructions.

@tonistiigi
Copy link
Member

The limit isn't completely arbitrary. This content goes to JSON parsing so is read into memory. Additionally, registry has a maximum size limit for manifest (4MB iirc). That would apply to the outer manifest index, cache config could be bigger.

Large, ~30 stage Dockerfile, with ~250 instructions.

Still, that would be like 4KB per instruction.

I'm ok with raising it to 4MB but I would agree that likely there is some other issue in here.

@dejanceltra
Copy link
Author

@tonistiigi It's seems there is a different issue here.

Other manifests for the same Dockerfile are around 80kB, but some of them are a bit more than 1 MB. One of the problematic manifest is here, if you want to take a look: https://gist.github.com/dejanceltra/65787845cd970fa2a71a6dd32c81bbf0

I can open a separate issue if needed, since I assume this is related to cache manifest generation.

@tonistiigi
Copy link
Member

@dejanceltra Yes, if you see a manifest that is too big open an issue about it with steps of how to generate it.

@tonistiigi
Copy link
Member

Closing this for now. Please open new issue if you have steps for generating big manifest.

@tonistiigi tonistiigi closed this May 28, 2024
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.

buildkit remote cache fails if manifest is larger than 1MB
3 participants