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
chunked: fix generating footer #1697
chunked: fix generating footer #1697
Conversation
a06a5e2
to
fd38c06
Compare
} | ||
|
||
// ReadFooterDataFromAnnotations reads the zstd:chunked footer data from the given annotations. | ||
func ReadFooterDataFromAnnotations(annotations map[string]string) (ZstdChunkedFooterData, error) { |
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.
(Not a review yet:) pkg/chunked/compression
and pkg/chunked/internal
are included in ~every single c/image build, so there would be some value in not adding code that isn’t necessary on that path to these subpackages.
OTOH keeping the read and write paths together helps maintenance…
fd38c06
to
e96dd0e
Compare
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.
Thanks for following up!
Overall LGTM — please add a EDIT test that FooterSizeSupported
matches, the rest are tentative non-blocking aesthetic matters.
e96dd0e
to
ec00686
Compare
pushed a new version |
c3ec176
to
68ed29f
Compare
this is ready to merge |
One more question I should have thought of immediately: If we are changing the footer format, why not change the magic number as well? |
the format is not really stable yet, we can change the magic number but I am not sure there is any gain in that. |
another point, current images would work fine if they are pulled from a registry since this information is stored in the annotations. If we change the magic number we will just break them |
Fair enough.
Well, not for the users (like Podman) who read the annotations, I think? Either way, I’ll leave it entirely up to you how stable the format should be right now. |
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
commit 7bbf6ed introduces an error where the generated footer is not correct. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
68ed29f
to
f989a95
Compare
right, it should not really matter. I've changed the magic number and pushed a new version |
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.
Thanks!
commit 7bbf6ed introduces an error where the generated footer is not correct.
Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com