crossplane-runtime icon indicating copy to clipboard operation
crossplane-runtime copied to clipboard

Update status readiness

Open TerjeLafton opened this issue 1 year ago • 5 comments

Description of your changes

This PR aims to align the behavior of the reconciler for Update operations with that of Create operations.

It achieves this by rewriting some of the Reconcile function to not use the call to external.Update as a last resort, but instead evaluate if it is needed based on the returned observation.ResourceUpToDate and policy.ShouldUpdate.

Fixes #583

I have:

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

How has this code been tested

We have updated all tests related to the Update functionality, so they now test if the xpv1.Updating() condition is there and that it returns the updated reconcile.Result{Requeue: true} struct. No tests have been added, but we are not sure if it is needed.

TerjeLafton avatar Jan 29 '24 14:01 TerjeLafton

Ready for review 😄 @phisco @pedjak

@turkenh, long since I made the issue and promised this PR. It's been busy 😅

TerjeLafton avatar Jan 29 '24 15:01 TerjeLafton

Assigning myself - I'd like to make some time to review before we proceed here. This reconciler is very subtle and very widely used.

negz avatar Jan 30 '24 03:01 negz

Apologies for the delayed review, this fell out of my GitHub notifications somehow.

No problem! Thanks for the review 😄 It couldn't be merged before the next version anyway, so no rush.

TerjeLafton avatar Feb 21 '24 08:02 TerjeLafton

@TerjeLafton , when this is merged can you open a Docs Issue referencing this PR so we document your updates?

Thanks!

plumbis avatar Apr 12 '24 14:04 plumbis

Crossplane does not currently have enough maintainers to address every issue and pull request. This pull request has been automatically marked as stale because it has had no activity in the last 90 days. It will be closed in 14 days if no further activity occurs. Adding a comment starting with /fresh will mark this PR as not stale.

github-actions[bot] avatar Sep 03 '24 09:09 github-actions[bot]