crossplane-runtime
crossplane-runtime copied to clipboard
Update status readiness
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.
Ready for review 😄 @phisco @pedjak
@turkenh, long since I made the issue and promised this PR. It's been busy 😅
Assigning myself - I'd like to make some time to review before we proceed here. This reconciler is very subtle and very widely used.
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 , when this is merged can you open a Docs Issue referencing this PR so we document your updates?
Thanks!
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.