🐛 e2e: only retry creating objects that failed#13265
🐛 e2e: only retry creating objects that failed#13265nojnhuh wants to merge 1 commit intokubernetes-sigs:mainfrom
Conversation
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/retitle 🐛 Use server-side apply for e2e CreateOrUpdate |
|
/test ? |
|
@nojnhuh: The following commands are available to trigger required jobs: The following commands are available to trigger optional jobs: Use 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 kubernetes-sigs/prow repository. |
|
/test pull-cluster-api-e2e-upgrade-1-35-1-36-main |
|
/hold Let's discuss on the issue |
|
I've updated this per our discussion in the issue: /retitle 🐛 e2e: only retry creating objects that failed |
|
/hold cancel |
|
Not sure what happened there: @nojnhuh PTAL at the linter findings |
What this PR does / why we need it:
The "get + update" sequence that
CreateOrUpdateimplements is too blunt when retries kick in. If a controller or webhook makes some monotonic change after an object was created byCreateOrUpdate, then blindly updating the object in a retry to match literally was initially created will fail.e.g. Creating a template consisting of a Cluster with
spec.topologywill prompt the topology controller to add acontrolPlaneRefandinfrastructureRef. Retrying that creation prompts an update which tries to remove those fields which is invalid:This PR moves the retry loop for
CreateOrUpdatefrom over all objects to each individual object. Objects which succeed will not be retried.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #13264