Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

controller: return the resource as ready as soon as possible #126

Merged
merged 1 commit into from
Oct 20, 2021

Conversation

muvaf
Copy link
Member

@muvaf muvaf commented Oct 20, 2021

Description of your changes

Right now, even if the resource is ready if we late initialize, a spec update is issued causing that condition update in status to be dropped. So, we wait another reconciliation to update the status. Also, Plan call takes a few seconds which also delays the readiness update.

Note that we keep the annotation late-initialization, which covers external name, as still high priority since there are cases where we need to get the external name as soon as possible.

Fixes #

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Tested with AWS VPC and we got to Ready in 42s compared to 77s previously. Note that in my local, every resource creation performs a terraform init(includes download over network) because I didn't put the plugin mirroring in place. So, these are not the real numbers only the significance of the difference is.

…plan and late-init

Signed-off-by: Muvaffak Onus <me@muvaf.com>
@muvaf muvaf requested review from ulucinar and turkenh October 20, 2021 08:50
Copy link
Member

@turkenh turkenh left a comment

Choose a reason for hiding this comment

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

Resources taking too long to be ready was indeed something I also noticed and bothering me, but couldn't find time to debug the underlying reason.

Great that you've tackled this @muvaf!

@muvaf muvaf merged commit c9e2138 into crossplane:main Oct 20, 2021
@muvaf muvaf deleted the get-ready-fast branch October 20, 2021 10:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants