-
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
WIP: Expect UncompressedDigest to be set for partial pulls, enforce DiffID match #2613
Draft
mtrmac
wants to merge
19
commits into
containers:main
Choose a base branch
from
mtrmac:wip-authentic
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
added a commit
to mtrmac/libpod
that referenced
this pull request
Oct 30, 2024
Signed-off-by: Miloslav Trmač <[email protected]>
mtrmac
added a commit
to mtrmac/libpod
that referenced
this pull request
Oct 30, 2024
Signed-off-by: Miloslav Trmač <[email protected]>
mtrmac
added a commit
to mtrmac/libpod
that referenced
this pull request
Oct 30, 2024
Signed-off-by: Miloslav Trmač <[email protected]>
mtrmac
commented
Oct 31, 2024
// FIXME: Always enforce this for all layers??! | ||
d, err := s.untrustedLayerDiffID(index) | ||
if err != nil { | ||
return nil, err |
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.
All of this completely breaks for non-OCI images: determining DiffID for manifest type %q is not yet supported
This needs to be implemented for v2s2, and we need a reasonable fallback for v2s1.
mtrmac
force-pushed
the
wip-authentic
branch
from
November 18, 2024 16:41
090e94d
to
b859a03
Compare
mtrmac
added a commit
to mtrmac/libpod
that referenced
this pull request
Nov 18, 2024
Signed-off-by: Miloslav Trmač <[email protected]>
mtrmac
added a commit
to mtrmac/libpod
that referenced
this pull request
Nov 18, 2024
Signed-off-by: Miloslav Trmač <[email protected]>
mtrmac
added a commit
to mtrmac/libpod
that referenced
this pull request
Nov 18, 2024
Signed-off-by: Miloslav Trmač <[email protected]>
mtrmac
force-pushed
the
wip-authentic
branch
3 times, most recently
from
November 22, 2024 20:15
e46c8d0
to
eb0db7b
Compare
mtrmac
added a commit
to mtrmac/libpod
that referenced
this pull request
Nov 25, 2024
> go mod edit -replace github.com/containers/image/v5=github.com/mtrmac/image/v5@wip-authentic Signed-off-by: Miloslav Trmač <[email protected]>
mtrmac
force-pushed
the
wip-authentic
branch
from
November 25, 2024 20:42
eb0db7b
to
f6be37a
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]>
mtrmac
force-pushed
the
wip-authentic
branch
3 times, most recently
from
November 26, 2024 20:38
95cdcf3
to
57b0637
Compare
mtrmac
added a commit
to mtrmac/libpod
that referenced
this pull request
Nov 26, 2024
> go mod edit -replace github.com/containers/image/v5=github.com/mtrmac/image/v5@wip-authentic Signed-off-by: Miloslav Trmač <[email protected]>
... and use defer to avoid that bug in the future. Signed-off-by: Miloslav Trmač <[email protected]>
Signed-off-by: Miloslav Trmač <[email protected]>
untrustedLayerDiffID currently specializes the "not available yet" case; also specialize the "image does not provide this at all" case, which we will need to handle. Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
We will want c/storage to do that in order to avoid the traditional/partial "view" ambiguity. Signed-off-by: Miloslav Trmač <[email protected]>
mtrmac
force-pushed
the
wip-authentic
branch
from
November 27, 2024 17:51
57b0637
to
517aa3f
Compare
Signed-off-by: Miloslav Trmač <[email protected]>
We will use the trustedLayerIdentityData for other purposes in the caller as well. Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
commitLayer already contains detailed logic for computing the final layer ID (chain ID), so having the detailed logic for the single layer component in a separate function is not any clearer. Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
wrong place, wrong logic(?) Signed-off-by: Miloslav Trmač <[email protected]>
mtrmac
force-pushed
the
wip-authentic
branch
from
November 27, 2024 22:07
517aa3f
to
137b760
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.
Requires containers/storage#2155