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

Enable running the test-operator role multiple times #2412

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lpiwowar
Copy link
Contributor

@lpiwowar lpiwowar commented Sep 30, 2024

It was not possible to run the test-operator role multiple times without cleaning up all resources created by the first role run, such as the logs pod created for the logs collection.

This patch makes it possible to run the test operator role multiple times without cleaning up the resources (e.g., after the update in an update job). It is possible because:

  • test-operator-logs pod now has unique name for each job run
  • The variable cifmw_test_operator_*_name is now exposed. By specifying a unique name, we can guarantee no name collisions between the test-operator related resources (logs pods, instances of CRs)

If you want to run test-operator role twice within a single job then make sure that for the second run you specify a value for the cifmw_test_operator_*_name. For example:

cifmw_test_operator_tempest_name: "post-update-tempest-tests"

Copy link
Contributor

openshift-ci bot commented Sep 30, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign pablintino for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link

Thanks for the PR! ❤️
I'm marking it as a draft, once your happy with it merging and the PR is passing CI, click the "Ready for review" button below.

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/de081b8b9823412e9114978d4382adbb

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 28m 42s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 16m 25s
cifmw-crc-podified-edpm-baremetal RETRY_LIMIT in 13m 42s
✔️ cifmw-multinode-tempest SUCCESS in 1h 36m 24s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 10s
✔️ cifmw-pod-pre-commit SUCCESS in 7m 26s
✔️ build-push-container-cifmw-client SUCCESS in 31m 24s
✔️ cifmw-molecule-test_operator SUCCESS in 3m 15s

@lpiwowar lpiwowar force-pushed the bugfix/multiple-test-operator-runs branch from 4bc0d24 to 8ca52e7 Compare October 1, 2024 07:35
lpiwowar added a commit to lpiwowar/test-operator that referenced this pull request Oct 1, 2024
It was not possible to run the test-operator role multiple times
without cleaning up all resources created by the first run, such
as the logs pod created for the logs collection.

This patch makes it possible to run the test operator role
multiple times without cleaning up the resources (e.g., after the
update in an update job). It is possible because:

- test-operator-logs pod now has unique name for each job run
- The variable cifmw_test_operator_*_name is now exposed. By
  specifying a unique name, we can guarantee no name collisions
  between the test-operator related resources (logs pods, instances
  of CRs)

If you want to run test-operator role twice within a single job
then make sure that for the second run you specify a value for the
cifmw_test_operator_*_name. For example:

  cifmw_test_operator_tempest_name: "post-update-tempest-tests"
@lpiwowar lpiwowar force-pushed the bugfix/multiple-test-operator-runs branch from 8ca52e7 to c33ee46 Compare October 1, 2024 09:04
@lpiwowar lpiwowar marked this pull request as ready for review October 1, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant