Skip to content
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

fix: Retry operation on conflict #668

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

yiannistri
Copy link
Contributor

What this PR does / why we need it:

Occasionally when a conflict occurs during the reconciliation process, the config object that is returned is non-nil but empty, causing logs to be missing fields.

Which issue(s) this PR fixes
Issue #665

Special notes for your reviewer:

To address the conflict, the RetryOnConflict function was used to query the resource and attempt the operation again, if the error returned is a conflict error.

Checklist:

  • squashed commits into logical changes
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests
  • backport needed

@yiannistri yiannistri added the kind/bug Something isn't working label Sep 20, 2024
@yiannistri yiannistri marked this pull request as ready for review September 20, 2024 08:09
@yiannistri yiannistri requested a review from a team as a code owner September 20, 2024 08:09
mjura
mjura previously approved these changes Sep 20, 2024
Copy link
Contributor

@mjura mjura left a comment

Choose a reason for hiding this comment

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

it looks ok, good job

controller/aks-cluster-config-handler.go Show resolved Hide resolved
controller/aks-cluster-config-handler.go Outdated Show resolved Hide resolved
salasberryfin
salasberryfin previously approved these changes Sep 24, 2024
@mjura
Copy link
Contributor

mjura commented Sep 27, 2024

Please backport this change to v2.9

@yiannistri yiannistri merged commit a261149 into rancher:main Sep 27, 2024
6 checks passed
@yiannistri yiannistri deleted the 665-retry-on-conflict branch September 27, 2024 08:19
yiannistri added a commit to yiannistri/aks-operator that referenced this pull request Sep 27, 2024
fix: Retry operation on conflict
(cherry picked from commit a261149)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants