Skip to content
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

Add a conformance test for copying to a mounted prior stage #5375

Merged

Conversation

nalind
Copy link
Member

@nalind nalind commented Mar 4, 2024

What type of PR is this?

/kind other

What this PR does / why we need it:

Add a conformance test for cases where an intermediate stage mounts the contents of a previous stage in a read-write fashion and modifies it, because there isn't a documented expectation for what's supposed to happen.

How to verify it

New conformance test!

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

Add a conformance test for cases where an intermediate stage mounts the
contents of a previous stage in a read-write fashion and modifies it.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Copy link
Contributor

openshift-ci bot commented Mar 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nalind

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Mar 4, 2024
@TomSweeneyRedHat
Copy link
Member

Changes LGTM, but a test is failing weirdly. I don't think, it's related, but...

[+1805s] not ok 375 bud with --isolation
[+1805s] # (from function `assert' in file ./helpers.bash, line 430,
[+1805s] #  from function `expect_output' in file ./helpers.bash, line 457,
[+1805s] #  in test file ./bud.bats, line 5641)
[+1805s] #   `expect_output --from="${lines[2]}" "${host_pidns}"' failed
[+1805s] # /var/tmp/go/src/github.com/containers/buildah/tests /var/tmp/go/src/github.com/containers/buildah/tests
[+1805s] # # [checking for: docker.io/library/alpine]
[+1805s] # # [restoring from cache: /var/tmp/buildah-image-cache.10043 / docker.io/library/alpine]
[+1805s] # Getting image source signatures
[+1805s] # Copying blob sha256:9d16cba9fb961d1aafec9542f2bf7cb64acfc55245f9e4eb5abecd4cdc38d749
[+1805s] # Copying config sha256:961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4
[+1805s] # Writing manifest to image destination
[+1805s] # # /var/tmp/go/src/github.com/containers/buildah/tests/./../bin/buildah build --isolation chroot -t testisolation --pid private --signature-policy /var/tmp/go/src/github.com/containers/buildah/tests/./policy.json --file /var/tmp/buildah_tests.gdrfra/my-dir/Containerfile .
[+1805s] # STEP 1/2: FROM alpine
[+1805s] # Trying to pull docker.io/library/alpine:latest...
[+1805s] # Getting image source signatures
[+1805s] # Copying blob sha256:9d16cba9fb961d1aafec9542f2bf7cb64acfc55245f9e4eb5abecd4cdc38d749
[+1805s] # Copying config sha256:961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4
[+1805s] # Writing manifest to image destination
[+1805s] # STEP 2/2: run readlink /proc/self/ns/pid
[+1805s] # pid:[4026531836]
[+1805s] # COMMIT testisolation
[+1805s] # Getting image source signatures
[+1805s] # Copying blob sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0
[+1805s] # Copying blob sha256:9a6a928a276add617402ced2ac9fbbb5726671ba55f9bee46b9f70ef3bd889a8
[+1805s] # Copying config sha256:457f115d16687b5af1ab7b57bb2d8efd839ff1fec44b2f5c550d1b7fad0bca12
[+1805s] # Writing manifest to image destination
[+1805s] # --> 457f115d1668
[+1805s] # Successfully tagged localhost/testisolation:latest
[+1805s] # 457f115d16687b5af1ab7b57bb2d8efd839ff1fec44b2f5c550d1b7fad0bca12
[+1805s] # #/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
[+1805s] # #|     FAIL: buildah build --isolation chroot -t testisolation --pid private --signature-policy /var/tmp/go/src/github.com/containers/buildah/tests/./policy.json --file /var/tmp/buildah_tests.gdrfra/my-dir/Containerfile .
[+1805s] # #| expected: 'pid:[4026531836]'
[+1805s] # #|   actual: 'Getting image source signatures'
[+1805s] # #\^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[+1805s] # /var/tmp/go/src/github.com/containers/buildah/tests

@nalind
Copy link
Member Author

nalind commented Mar 5, 2024

It could not be related: the new test isn't being run in the CI job that failed.

@rhatdan
Copy link
Member

rhatdan commented Mar 6, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Mar 6, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 204cbdb into containers:main Mar 6, 2024
36 checks passed
@nalind nalind deleted the multistage-copyback-test branch March 6, 2024 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants