Revert "pull: fix pulling from dir transport"
This reverts commit 913fe2c9cb.
Both podman and buildah CI are failing because of this change. Since
Valentin is out and I need to get my network changes merged I want to
revert this for now.
Example failure from buildah test:
```
[+2471s] not ok 507 pull-from-local-directory
[+2471s] # (from function `assert' in file ./helpers.bash, line 342,
[+2471s] # from function `expect_output' in file ./helpers.bash, line 369,
[+2471s] # in test file ./pull.bats, line 89)
[+2471s] # `expect_output --substring "localhost${TESTDIR}/buildahtest:latest"' failed
[+2471s] # /var/tmp/go/src/github.com/containers/buildah/tests /var/tmp/go/src/github.com/containers/buildah/tests
[+2471s] # $ /var/tmp/go/src/github.com/containers/buildah/tests/./../bin/buildah pull --signature-policy /var/tmp/go/src/github.com/containers/buildah/tests/./policy.json alpine
[+2471s] # Resolved "alpine" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
[+2471s] # Trying to pull docker.io/library/alpine:latest...
[+2471s] # Getting image source signatures
[+2471s] # Copying blob sha256:9d16cba9fb961d1aafec9542f2bf7cb64acfc55245f9e4eb5abecd4cdc38d749
[+2471s] # Copying blob sha256:9d16cba9fb961d1aafec9542f2bf7cb64acfc55245f9e4eb5abecd4cdc38d749
[+2471s] # Copying config sha256:961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4
[+2471s] # Writing manifest to image destination
[+2471s] # Storing signatures
[+2471s] # 961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4
[+2471s] # $ /var/tmp/go/src/github.com/containers/buildah/tests/./../bin/buildah push --signature-policy /var/tmp/go/src/github.com/containers/buildah/tests/./policy.json docker.io/library/alpine:latest dir:/var/tmp/buildah_tests.c47drl/buildahtest
[+2471s] # Getting image source signatures
[+2471s] # Copying blob sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0
[+2471s] # Copying config sha256:961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4
[+2471s] # Writing manifest to image destination
[+2471s] # Storing signatures
[+2471s] # $ /var/tmp/go/src/github.com/containers/buildah/tests/./../bin/buildah rmi alpine
[+2471s] # untagged: docker.io/library/alpine:latest
[+2471s] # 961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4
[+2471s] # $ /var/tmp/go/src/github.com/containers/buildah/tests/./../bin/buildah pull --signature-policy /var/tmp/go/src/github.com/containers/buildah/tests/./policy.json dir:/var/tmp/buildah_tests.c47drl/buildahtest
[+2471s] # Getting image source signatures
[+2471s] # Copying blob sha256:f3ac2f9422602f687109cc39270c47da673c6a61b5ca4958bc232adbc65912e7
[+2471s] # Copying config sha256:961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4
[+2471s] # Writing manifest to image destination
[+2471s] # Storing signatures
[+2471s] # 961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4
[+2471s] # $ /var/tmp/go/src/github.com/containers/buildah/tests/./../bin/buildah images --format {{.Name}}:{{.Tag}}
[+2471s] # <none>:<none>
[+2471s] # #/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
[+2471s] # #| FAIL: buildah images --format {{.Name}}:{{.Tag}}
[+2471s] # #| expected: =~ 'localhost/var/tmp/buildah_tests.c47drl/buildahtest:latest'
[+2471s] # #| actual: '<none>:<none>'
[+2471s] # #\^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
parent
4ba676d6b3
commit
9255c2eec0
|
|
@ -243,14 +243,8 @@ func (r *Runtime) copyFromDefault(ctx context.Context, ref types.ImageReference,
|
|||
imageName = named.String()
|
||||
|
||||
default:
|
||||
// Path-based transports (e.g., dir) may include invalid
|
||||
// characters, so we should pessimistically generate an ID
|
||||
// instead of looking at the StringWithinTransport().
|
||||
storageName, err = getImageID(ctx, ref, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
imageName = "sha256:" + storageName[1:]
|
||||
storageName = toLocalImageName(ref.StringWithinTransport())
|
||||
imageName = storageName
|
||||
}
|
||||
|
||||
// Create a storage reference.
|
||||
|
|
|
|||
|
|
@ -51,9 +51,6 @@ func TestPull(t *testing.T) {
|
|||
{"docker://docker.io/library/alpine", false, 1, []string{"docker.io/library/alpine:latest"}},
|
||||
{"quay.io/libpod/alpine@sha256:634a8f35b5f16dcf4aaa0822adc0b1964bb786fca12f6831de8ddc45e5986a00", false, 1, []string{"quay.io/libpod/alpine@sha256:634a8f35b5f16dcf4aaa0822adc0b1964bb786fca12f6831de8ddc45e5986a00"}},
|
||||
{"quay.io/libpod/alpine:pleaseignorethistag@sha256:634a8f35b5f16dcf4aaa0822adc0b1964bb786fca12f6831de8ddc45e5986a00", false, 1, []string{"quay.io/libpod/alpine@sha256:634a8f35b5f16dcf4aaa0822adc0b1964bb786fca12f6831de8ddc45e5986a00"}},
|
||||
|
||||
// DIR
|
||||
{"dir:testdata/scratch-dir-5pec!@L", false, 1, []string{"61e17f84d763cc086d43c67dcf4cdbd69f9224c74e961c53b589b70499eac443"}},
|
||||
} {
|
||||
pulledImages, err := runtime.Pull(ctx, test.input, config.PullPolicyAlways, pullOptions)
|
||||
if test.expectError {
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
{"created":"2021-12-20T13:03:01.601633431Z","architecture":"amd64","os":"linux","config":{"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Labels":{"io.buildah.version":"1.23.1"}},"rootfs":{"type":"layers","diff_ids":["sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"]},"history":[{"created":"2021-12-20T13:03:01.602339865Z","created_by":"/bin/sh"}]}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"schemaVersion":2,"config":{"mediaType":"application/vnd.oci.image.config.v1+json","digest":"sha256:61e17f84d763cc086d43c67dcf4cdbd69f9224c74e961c53b589b70499eac443","size":402},"layers":[{"mediaType":"application/vnd.oci.image.layer.v1.tar","digest":"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef","size":1024}],"annotations":{"org.opencontainers.image.base.digest":"","org.opencontainers.image.base.name":""}}
|
||||
|
|
@ -1 +0,0 @@
|
|||
Directory Transport Version: 1.1
|
||||
Loading…
Reference in New Issue