-
Notifications
You must be signed in to change notification settings - Fork 379
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
In pulls, compute DiffIDs earlier, and also for v2s2 #2635
Open
mtrmac
wants to merge
8
commits into
containers:main
Choose a base branch
from
mtrmac:diffid-earlier-always
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
mtrmac
force-pushed
the
diffid-earlier-always
branch
3 times, most recently
from
November 21, 2024 20:13
9c6027e
to
04ec0aa
Compare
Now manually tested; I have confirmed that This is ready for review. |
… and, for the record, I have tested both the full PR and a variant without the last commit (testing the “fallback” image parsing implementation). |
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č <[email protected]>
Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
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č <[email protected]>
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č <[email protected]>
We will add one more user. Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
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č <[email protected]>
For now, this only adds the API, nothing actually benefits from it yet. Signed-off-by: Miloslav Trmač <[email protected]>
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č <[email protected]>
mtrmac
force-pushed
the
diffid-earlier-always
branch
from
November 22, 2024 20:11
04ec0aa
to
e69286e
Compare
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.