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
RFC: Move the tar-split digest into the TOC #1902
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mtrmac The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -85,7 +86,7 @@ func GetType(t byte) (string, error) { | |||
const ( | |||
ManifestChecksumKey = "io.github.containers.zstd-chunked.manifest-checksum" | |||
ManifestInfoKey = "io.github.containers.zstd-chunked.manifest-position" | |||
TarSplitChecksumKey = "io.github.containers.zstd-chunked.tarsplit-checksum" | |||
TarSplitChecksumKey = "io.github.containers.zstd-chunked.tarsplit-checksum" // Deprecated: Use the TOC.TarSplitDigest field instead, this one is not authenticated by ManifestChecksumKey. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is fine if we just break now, and not have to worry about it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alternative would be to ignore the tar-split. That would make the current images consumable, but they would IIRC break on re-pushing the layers.
a2ea4cc
to
710533e
Compare
b40dc70
to
12674c6
Compare
This is a microptimization, we call strings.ToLower only once, but more importantly it will make it easier to add more fields. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
bb7ad0f
to
ff1e003
Compare
Other TOC formats don't fill the data in. For now, this only increases memory usage, but we will need the data soon. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
... so that we can uniquely identify partially-pulled layers by the TOC digest. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Include more details in the returned error text. Don't continue in tests when we fail to obtain a TOC. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
ff1e003
to
791869f
Compare
#1888 must have a solution. This is one possible solution; it also breaks all currently-existing zstd:chunked images, which might be fine or very bad, I don’t know which one it is. |
A minimal prototype for a fix of #1888 .
Note that this would immediately break pulling all currently-existing layers.
Also this probably increases memory requirements because the TOC exists as individual Go values longer.
Cc: @giuseppe