allow setting compression level on export#2350
Conversation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
|
|
||
| type ExporterInstance interface { | ||
| Name() string | ||
| Config() Config |
There was a problem hiding this comment.
This isn't very nice but didn't have any other ideas for the cache export to see the compressor. For other exports compressor should be set directly but for inline, it needs to use the same as what is used for the image.
| VariantDocker = "docker" | ||
| ociTypes = "oci-mediatypes" | ||
| keyForceCompression = "force-compression" | ||
| keyCompressionLevel = "compression-level" |
There was a problem hiding this comment.
Should we change force to compression-force in follow-up and deprecate old field?
|
@tonistiigi During thinking about this, I've noticed cc @sipsma |
|
@ktock buildkit/worker/cacheresult.go Line 82 in 78e8856 createBlobsIfNeeded=false). So it can be used to get fast access to remote but ignore it if fast access can't be achieved. In that case, some records will be skipped over and some will perform the slow Load+Diff to get the remote, depending on the cache mode.
|
|
Thank you for the clarification. Opened #2405 to try to move this forward. |
|
replaced by #2591 |
-o compression-level=nto configure the compressor.Second commit tries to fix the multi-blob inline cache that I think was broken already (even before zstd PR). I think it is still broken with this PR as well and to fully fix it I need to change
LoadRemotesignature toLoadRemotes([]compression) []Remotes. @ktock