Skip to content

Fix functional test race condition in nova template configuration#1558

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
stuggi:fix_test
Aug 11, 2025
Merged

Fix functional test race condition in nova template configuration#1558
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
stuggi:fix_test

Conversation

@stuggi

@stuggi stuggi commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

The "should have configured nova from the service template" test was failing intermittently due to a stale object update pattern. The test was retrieving the OpenStackControlPlane object outside the Eventually block, then attempting to update it inside the block. This could fail with update conflicts if the controller modified the object between retrieval and update.

Move GetOpenStackControlPlane() inside the Eventually block to ensure a fresh object is retrieved on each retry attempt, matching the pattern used by other successful tests in the file.

The "should have configured nova from the service template" test was
failing intermittently due to a stale object update pattern. The test
was retrieving the OpenStackControlPlane object outside the Eventually
block, then attempting to update it inside the block. This could fail
with update conflicts if the controller modified the object between
retrieval and update.

Move GetOpenStackControlPlane() inside the Eventually block to ensure
a fresh object is retrieved on each retry attempt, matching the pattern
used by other successful tests in the file.

Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
@openshift-ci openshift-ci Bot requested review from lewisdenny and slagle August 11, 2025 13:06
@stuggi

stuggi commented Aug 11, 2025

Copy link
Copy Markdown
Contributor Author

functional tests sometimes fail with

  [FAIL] OpenStackOperator controller when A OpenStackControlplane instance is created [It] should have configured nova from the service template
  /go/src/github.com/openstack-k8s-operators/operator/tests/functional/ctlplane/openstackoperator_controller_test.go:1953

@stuggi stuggi requested review from abays and dprince and removed request for lewisdenny and slagle August 11, 2025 13:09

@abays abays left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci

openshift-ci Bot commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abays, stuggi

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

The pull request process is described here

Details 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-merge-bot openshift-merge-bot Bot merged commit d0e8ae9 into openstack-k8s-operators:main Aug 11, 2025
8 checks passed
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.

2 participants