Skip to content

Conversation

@turkenh
Copy link
Member

@turkenh turkenh commented Nov 2, 2023

Description of your changes

This PR fixes retry in updating critical annotations under a specific circumstance where the Update attempt returns a conflict. Presumably introduced with this PR, we hide the conflict error when we have a successful get afterward, which causes not retrying to persist critical annotations.

Related issue: crossplane-contrib/provider-upjet-azure#577

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Added unit test to catch the specific scenario.

Also tested with ResourceGroup with provider-azure v0.38.0. The resource becomes ready/synced with this PR, even though it throws that event* 2 times before the retries doing its job and eventually persisting the crossplane.io/external-create-succeeded annotation. The question of why we try to reconcile two times before the first reconciliation returns is another question that needs to be investigated separately - I'll create a ticket to follow up.

* cannot determine creation result - remove the crossplane.io/external-create-pending annotation if it is safe to proceed

- A successful get after a conflict should not hide the conflict
error and prevent retries.

Signed-off-by: Hasan Turken <turkenh@gmail.com>
Copy link
Contributor

@phisco phisco left a comment

Choose a reason for hiding this comment

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

Good catch!

Copy link
Contributor

@sttts sttts left a comment

Choose a reason for hiding this comment

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

Great find!

@turkenh turkenh merged commit 361222f into crossplane:master Nov 2, 2023
@github-actions
Copy link

github-actions bot commented Nov 2, 2023

Successfully created backport PR for release-1.14:

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.

3 participants