Skip to content

Update CRDs when changing test-operator version #2906

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

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

Conversation

kstrenkova
Copy link
Contributor

@kstrenkova kstrenkova commented Apr 16, 2025

This patch updates the CRDs, if the user wants to patch the test operator version. Until now the CRDs stayed unchanged even after version change, so testing new test-operator parameters was not possible. It is important to point out, that the update will not be triggered in 90% of test-operator use cases. It is primarily used in two situations:

  1. When running checks for new PRs in the test-operator repository.
  2. When updating the test-operator version in jobs to prevent failures.

The approach isn’t the cleanest, but alternative solutions are significantly more complex than the benefits they offer.

Copy link
Contributor

openshift-ci bot commented Apr 16, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link
Contributor

openshift-ci bot commented Apr 16, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

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

kstrenkova added a commit to kstrenkova/test-operator that referenced this pull request Apr 16, 2025
This patch introduces the ExtraMounts parameter to test-operator.
The purpose is to be able to specify PersistentVolumeClaim,
Secret, ConfigMap and mount it to the test pod spawned by the
test-operator.

Depends-On: openstack-k8s-operators/ci-framework#2906
@kstrenkova kstrenkova force-pushed the update-crds-test-operator branch 5 times, most recently from 6988524 to 42ba261 Compare April 17, 2025 10:48
kstrenkova added a commit to kstrenkova/test-operator that referenced this pull request Apr 17, 2025
Currently, the merging of workflow section is done in controllers
of related CRs. We want to move the merging logic into webhooks
to make the process cleaner.

Depends-On: openstack-k8s-operators/ci-framework#2906
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/3c5156019430415a96401a983b2ccd25

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 46m 51s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 09m 29s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 28m 53s
✔️ cifmw-multinode-tempest SUCCESS in 1h 30m 49s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 13m 56s
cifmw-pod-pre-commit FAILURE in 8m 44s
✔️ build-push-container-cifmw-client SUCCESS in 21m 11s
✔️ cifmw-molecule-test_operator SUCCESS in 3m 16s

kstrenkova added a commit to kstrenkova/test-operator that referenced this pull request Apr 23, 2025
Currently, the merging of workflow section is done in controllers
of related CRs. We want to move the merging logic into webhooks
to make the process cleaner.

Depends-On: openstack-k8s-operators/ci-framework#2906
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/36d26c9520f34ae6b18c742178de679b

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 47m 37s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 12m 34s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 28m 49s
✔️ cifmw-multinode-tempest SUCCESS in 1h 31m 30s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 50s
cifmw-pod-pre-commit FAILURE in 7m 55s
✔️ build-push-container-cifmw-client SUCCESS in 17m 02s
✔️ cifmw-molecule-test_operator SUCCESS in 3m 22s

@kstrenkova kstrenkova force-pushed the update-crds-test-operator branch from 755ccda to 34c4d58 Compare April 25, 2025 12:49
kstrenkova added a commit to kstrenkova/test-operator that referenced this pull request Apr 25, 2025
This patch introduces the ExtraMounts parameter to test-operator.
The purpose is to be able to specify PersistentVolumeClaim,
Secret, ConfigMap and mount it to the test pod spawned by the
test-operator.

Depends-On: openstack-k8s-operators/ci-framework#2906
@kstrenkova kstrenkova marked this pull request as ready for review April 25, 2025 19:51
@kstrenkova kstrenkova requested a review from a team as a code owner April 25, 2025 19:51
@kstrenkova
Copy link
Contributor Author

/retest

@kstrenkova kstrenkova force-pushed the update-crds-test-operator branch from 34c4d58 to 31dfaf5 Compare April 28, 2025 15:08
@kstrenkova kstrenkova force-pushed the update-crds-test-operator branch from 31dfaf5 to 5ce1eeb Compare April 28, 2025 15:14
kstrenkova added a commit to kstrenkova/test-operator that referenced this pull request Apr 28, 2025
This patch introduces the ExtraMounts parameter to test-operator.
The purpose is to be able to specify PersistentVolumeClaim,
Secret, ConfigMap and mount it to the test pod spawned by the
test-operator.

Depends-On: openstack-k8s-operators/ci-framework#2906
kstrenkova added a commit to kstrenkova/test-operator that referenced this pull request Apr 28, 2025
Currently, the merging of workflow section is done in controllers
of related CRs. We want to move the merging logic into webhooks
to make the process cleaner.

Depends-On: openstack-k8s-operators/ci-framework#2906
danpawlik
danpawlik previously approved these changes Apr 29, 2025
@kstrenkova kstrenkova force-pushed the update-crds-test-operator branch from 5ce1eeb to b592981 Compare April 29, 2025 12:41
@kstrenkova kstrenkova requested review from danpawlik and arxcruz April 29, 2025 15:00
kstrenkova added a commit to kstrenkova/test-operator that referenced this pull request Apr 30, 2025
Currently, the merging of workflow section is done in controllers
of related CRs. We want to move the merging logic into webhooks
to make the process cleaner.

Depends-On: openstack-k8s-operators/ci-framework#2906
This patch updated the CRDs, if the user wants to patch the test
operator version. Until now the CRDs stayed unchanged even after
version change, so testing new test-operator parameters was not
possible. It is important to point out, that the update will not
be triggered in 90% of test-operator use cases.
It is primarily used in two situations:

1. When running checks for new PRs in the test-operator repository.

2. When updating the test-operator version in jobs to prevent
failures.

The approach isn’t the cleanest, but alternative solutions are
significantly more complex than the benefits they offer.
- "{{ cifmw_test_operator_ansibletest_crd_name }}"
- "{{ cifmw_test_operator_horizontest_crd_name }}"

- name: Clone test-operator repository and checkout into specified version
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering, how are we getting the test-operator at the first place. Is it shipped as the github repository? Or is it downloaded from the image hub?
This is very risky. Every time when the new change is introduced to the main branch, we might end up with overwriting existing tests. It allows for faster iteration, but it's not safe.

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