In pulls, compute DiffIDs earlier, and also for v2s2#2635
Merged
mtrmac merged 8 commits intocontainers:mainfrom Nov 28, 2024
Merged
In pulls, compute DiffIDs earlier, and also for v2s2#2635mtrmac merged 8 commits intocontainers:mainfrom
mtrmac merged 8 commits intocontainers:mainfrom
Conversation
9c6027e to
04ec0aa
Compare
Collaborator
Author
|
Now manually tested; I have confirmed that This is ready for review. |
Collaborator
Author
|
… and, for the record, I have tested both the full PR and a variant without the last commit (testing the “fallback” image parsing implementation). |
e69286e to
85cee69
Compare
64931d5 to
399dd58
Compare
If the value is set to a zero-byte value, use it, instead of trying to look for a value again / elsewhere. This should not make a difference in practice, a zero-length manifest is invalid anyway; so it's just a conceptual cleanup / a microoptimization. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Other parts of the code already assume that the value is always valid, so don't treat an empty value specially. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Always check for nil, not for len(0). Ensure that PutManifest always sets it to non-nil, so that valid call sequences (with an invalid empty manifest) don't show up as hard-to-explain invariant violations. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
We will add one more user. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
For now this is not really relevant, but we will want to enforce the correctness of those values in the future. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
For now, this only adds the API, nothing actually benefits from it yet. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Record DiffIDs early, so that we can commit partially-pulled layers immediately after staging them, and we don't have to wait for PutManifest. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
399dd58 to
f751b34
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is primarily motivated by preparing for the zstd:chunked logic, but potentially useful separately:
At this point absolutely untested.Cc: @giuseppe , filing early to allow a preliminary review in case I have missed anything important.