-
Notifications
You must be signed in to change notification settings - Fork 382
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
Conversation
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). |
e69286e
to
85cee69
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.
Changes LGTM
@giuseppe PTAL
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.
LGTM
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č <[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]>
399dd58
to
f751b34
Compare
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.