OCPBUGS-81751: Fix GatewayClass update conflict in markTestDone#30964
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
Walkthrough
Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Scheduling required tests: |
Add retry logic to markTestDone to handle optimistic locking conflicts when updating GatewayClass annotations. The CIO actively manages the GatewayClass (updating conditions, status, finalizers) which can cause 409 Conflict errors when tests try to update annotations. Using RetryOnConflict ensures the test automatically retries with the latest resourceVersion when concurrent updates occur. Fixes flake: Operation cannot be fulfilled on gatewayclasses.gateway.networking.k8s.io "openshift-default": the object has been modified; please apply your changes to the latest version and try again https://redhat.atlassian.net/browse/OCPBUGS-81751 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
c05ea8a to
8e4e43a
Compare
|
@gcs278: This pull request references Jira Issue OCPBUGS-81751, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Scheduling required tests: |
|
/jira refresh |
|
@lihongan: This pull request references Jira Issue OCPBUGS-81751, which is valid. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (iamin@redhat.com), skipping review request. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/retest cc @rhamini3 |
|
/payload-aggregate periodic-ci-openshift-release-main-nightly-4.22-e2e-vsphere-ovn-techpreview 10 |
|
@lihongan: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command
See details on https://pr-payload-tests.ci.openshift.org/runs/ci/7a4afee0-324a-11f1-83b8-fe371b409589-0 |
|
/retest-required |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gcs278, JoelSpeed The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Job Failure Risk Analysis for sha: 8e4e43a
|
|
/verified by CI some jobs failed install in payload aggregate but no failing gateway tests |
|
@lihongan: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@gcs278: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
@gcs278: Jira Issue Verification Checks: Jira Issue OCPBUGS-81751 Jira Issue OCPBUGS-81751 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Fix included in release 4.22.0-0.nightly-2026-04-08-213621 |
Description
Fix flake in Gateway API tests caused by concurrent updates to GatewayClass.
Problem
The
markTestDone()function was experiencing 409 Conflict errors when trying to update GatewayClass annotations:This happens because the Cluster Ingress Operator (CIO) actively manages the GatewayClass resource, updating conditions (
Accepted,ControllerInstalled,CRDsReady), status, and finalizers. When the test reads the GatewayClass and then tries to update it, the resourceVersion can be stale.Solution
Wrapped the Get-Modify-Update logic in
retry.RetryOnConflict()which:Testing
Changes
k8s.io/client-go/util/retryimportmarkTestDone()to useRetryOnConflict/assign @gcs278