-
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
12
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
storage/storage_dest.go
Outdated
// 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
4 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]>
mtrmac
force-pushed
the
wip-authentic
branch
2 times, most recently
from
November 27, 2024 22:07
517aa3f
to
137b760
Compare
Signed-off-by: Miloslav Trmač <[email protected]>
Signed-off-by: Miloslav Trmač <[email protected]>
... because we will start enforcing that the DiffID values match. Signed-off-by: Miloslav Trmač <[email protected]>
... to simplify some of the repetitive logging code. Should not change behavior. 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 use the trustedLayerIdentityData for other purposes in the caller as well. Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
Two different locations in the function need the data, and the caller must have it available; so always passing it in simplifies the implementation and removes an impossible error path. This might hypothetically make layer reuse a bit worse, if we happened to learn something for trustedLayerIdentityData from processing other layers of the same image, but reusing the same layer twice within an image should be are. 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. Instead, outline the whole thing and add unit tests. 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]>
FIXME: the "this is centrally enforced later" comment should be added with that enforcement. Signed-off-by: Miloslav Trmač <[email protected]>
Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
Note the FIXMEs Signed-off-by: Miloslav Trmač <[email protected]>
mtrmac
force-pushed
the
wip-authentic
branch
from
November 28, 2024 20:42
137b760
to
4fb4df8
Compare
mtrmac
added a commit
to mtrmac/libpod
that referenced
this pull request
Nov 28, 2024
> go mod edit -replace github.com/containers/image/v5=github.com/mtrmac/image/v5@wip-authentic Signed-off-by: Miloslav Trmač <[email protected]>
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