cluster-api-provider-aws icon indicating copy to clipboard operation
cluster-api-provider-aws copied to clipboard

Controller implementation should move towards a re-entrancy model

Open detiber opened this issue 5 years ago • 8 comments
trafficstars

/kind feature

Describe the solution you'd like Currently we do a lot of waiting within the controller for resources to be available, we should investigate switching to using re-entrancy for these tasks rather than blocking other reconciliations.

/priority important-longterm /milestone Next

detiber avatar Mar 12 '20 16:03 detiber

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar Jun 10 '20 17:06 fejta-bot

/lifecycle frozen

detiber avatar Jun 10 '20 17:06 detiber

/milestone v0.7.x

sedefsavas avatar Jun 28 '21 17:06 sedefsavas

Just dumping some findings:

Currently, Azure SDK supports non-blocking, asynchronous calls via Future constructs, which makes it easy to make CAPZ re-entrant. CAPZ controllers don't need to make a new call to get the status of a resource at each reconcile (which causes hitting API limits). When a resource is created, Future result appears.

I see that AWS SDK Java introduced async clients but I don't see any activity to that end in golang SDK. We can make improvements like introducing a cache before refactoring, but even then API limits might be a problem.

sedefsavas avatar Nov 09 '21 21:11 sedefsavas

/remove-lifecycle frozen

richardcase avatar Jul 08 '22 22:07 richardcase

Potentially, we could use a hook/dispatch system to notify listeners of a certain resource. Channels should be quite useful in that regard. Also, there are numerous libraries in Go itself which support async calls. So implementing them shouldn't be too much of a problem.

One popular one is https://github.com/hibiken/asynq. What do you think @sedefsavas @richardcase?

Skarlso avatar Sep 08 '22 07:09 Skarlso

@Skarlso - i think we can handle this by requeing....although this has the added downside of increasing API calls. A good topic for discussion at office hours?

richardcase avatar Oct 10 '22 15:10 richardcase

Certainly a good topic indeed. 👍

Skarlso avatar Oct 10 '22 15:10 Skarlso

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jan 08 '23 15:01 k8s-triage-robot

/remove-lifecycle stale

Skarlso avatar Jan 08 '23 18:01 Skarlso

/assign

I'm interested in this. But would be nice to not increase the number of API calls.

Skarlso avatar Jan 08 '23 18:01 Skarlso

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Apr 08 '23 18:04 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar May 08 '23 18:05 k8s-triage-robot