-
Notifications
You must be signed in to change notification settings - Fork 380
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
expectedLayerDiffIDFlag expectation mismatch #2602
Comments
Might be a fix for containers#2602 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Might be a fix for containers#2602 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
A reproducer (from the point of c/image; I didn’t immediately find a Podman/Buildah one, I suspect it requires some combination of pulling chunked and non-chunked versions of the same image to prepopulate the # cat main.go
package main
import (
"context"
"fmt"
"os"
"github.com/containers/image/v5/copy"
"github.com/containers/image/v5/signature"
"github.com/containers/image/v5/transports/alltransports"
"github.com/containers/storage/pkg/reexec"
"github.com/sirupsen/logrus"
)
func realMain() error {
if len(os.Args) != 4 {
return fmt.Errorf("usage: $this src intermediate dest")
}
ctx := context.Background()
logrus.SetLevel(logrus.DebugLevel)
srcRef, err := alltransports.ParseImageName(os.Args[1])
if err != nil {
return fmt.Errorf("%q: %w", os.Args[1], err)
}
midRef, err := alltransports.ParseImageName(os.Args[2])
if err != nil {
return fmt.Errorf("%q: %w", os.Args[2], err)
}
destRef, err := alltransports.ParseImageName(os.Args[3])
if err != nil {
return fmt.Errorf("%q: %w", os.Args[3], err)
}
policy := &signature.Policy{Default: []signature.PolicyRequirement{signature.NewPRInsecureAcceptAnything()}}
policyContext, err := signature.NewPolicyContext(policy)
if err != nil {
return err
}
defer policyContext.Destroy()
if _, err = copy.Image(ctx, policyContext, midRef, srcRef, nil); err != nil {
return fmt.Errorf("first copy: %w", err)
}
if _, err = copy.Image(ctx, policyContext, destRef, midRef, nil); err != nil {
return fmt.Errorf("second copy: %w", err)
}
return nil
}
func main() {
if reexec.Init() {
return
}
if err := realMain(); err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err.Error())
os.Exit(1)
}
}
# bin/podman rmi -a # required! does not trigger on a re-run otherwise
# go run ./main.go docker://quay.io/libpod/testimage:20241010 containers-storage:tmp dir:t
…
DEBU[0002] Retrieved partial blob sha256:d005489f1e59bed02315c1c34bb95b3f46a970a5fd20cdc73c93c6e279689dde
…
second copy: TOC digest "sha256:c76138319d7e627d68d63400da4c699617607cd21bb2a982159ab35dc91963ab" for layer "3e9be8391183b829c476f875d3f34c550275cac7cb78371bd88fa05bc963b321" is present but "expected-layer-diffid" flag is not a string |
Confirming that #2603 fixes this. |
Might be a fix for containers#2602 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Might be a fix for containers#2602 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Still seeing this running
|
@ebuildy Thanks for your report! If this is happening on a |
@edsantiago reports in containers/common#2202 (comment) , that we see
By code inspection, that might be possible if the image write+read both happen in the same process (we are writing a
digest.Digest
, and expecting astring
).The text was updated successfully, but these errors were encountered: