OCPBUGS-38662: resourcesync: Handle conflict gracefully#2095
OCPBUGS-38662: resourcesync: Handle conflict gracefully#2095tchap wants to merge 1 commit intoopenshift:masterfrom
Conversation
Do not degrade on conflict when applying changes. Let the machinery retry automatically when the state is sync'd.
|
@tchap: This pull request references Jira Issue OCPBUGS-38662, which is valid. 3 validation(s) were run on this bug
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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tchap 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 |
|
@tchap: 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. |
|
|
||
| _, _, err := resourceapply.SyncPartialConfigMap(ctx, c.configMapGetter, syncCtx.Recorder(), source.Namespace, source.Name, destination.Namespace, destination.Name, source.syncedKeys, []metav1.OwnerReference{}) | ||
| if err != nil { | ||
| if err != nil && !apierrors.IsConflict(err) { |
There was a problem hiding this comment.
How is this PR handling conflicts gracefully? 🙂
In my opinion, we should not hide errors.
A conflict error is still an error.
For example, it might indicate a conflict with a different actor in the system.
What we could do instead (if we aren’t already) is consider retrying certain types of requests when a conflict error occurs.
Do not degrade on conflict when applying changes.
Let the machinery retry automatically when the state is sync'd.