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

tests: bud: make parallel-safe #5804

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

edsantiago
Copy link
Member

  • all images pushed to a local registry must have a unique name

  • all cache tests must use a private TMPDIR

  • in force-compression test, use a custom-crafted image with
    no possibility of sharing layers with any other image that
    any other test might push to the registry.

  • use a private crun tmpdir in seccomp test, because crun
    does some unexpected caching.

And, forgive me, a little refactoring of unpleasant duplication

Signed-off-by: Ed Santiago [email protected]

None

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

tests/bud.bats Outdated
run_buildah build $WITH_POLICY_JSON -t image1 --platform linux/amd64 -f $BUDFILES/dockerfile/Dockerfile
run_buildah build $WITH_POLICY_JSON -t image2 --platform linux/arm64 -f $BUDFILES/dockerfile/Dockerfile

imgname="img$(random_string | tr A-Z a-z)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q: would the safename helper from podman make sense for the parallel work here or do we not need it because the tests do not share storage?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I almost went with safename but couldn't think of any real-world situation in which it would help: the errors I've seen in testing only show layer IDs. It's not much work to bring it in. Should I?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one thing would be that we can skip the | tr A-Z a-z that is duplicated in so many places. But that could also be fixed by random string only returning lowercase. I am not sure what would be better.
Either way not a blocker.

Copy link
Member

@TomSweeneyRedHat TomSweeneyRedHat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

- all images pushed to a local registry must have a unique name.
  Bring in safename() helper from podman tests.

- all cache tests must use a private TMPDIR

- in force-compression test, use a custom-crafted image with
  no possibility of sharing layers with any other image that
  any other test might push to the registry.

- use a private crun tmpdir in seccomp test, because crun
  does some unexpected caching.

And, forgive me, a little refactoring of unpleasant duplication

Signed-off-by: Ed Santiago <[email protected]>
@edsantiago
Copy link
Member Author

New push, added safename

@rhatdan
Copy link
Member

rhatdan commented Nov 7, 2024

/lgtm

@rhatdan
Copy link
Member

rhatdan commented Nov 7, 2024

/approve

Copy link
Contributor

openshift-ci bot commented Nov 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: edsantiago, Luap99, rhatdan

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 Nov 7, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 0f07c3d into containers:main Nov 7, 2024
32 checks passed
@edsantiago edsantiago deleted the para-prep-bud branch November 7, 2024 13:03
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.

4 participants