Repository navigation
ateapi/controlapi: process syncer events via rate-limiting workqueue - #674
Conversation
5a72eaf to
484f5ad
Compare
|
friendly pinging for review Eitan Yarmush (@EItanya) Scott Funkenhauser (@sfunkenhauser) Zoe Zhao (@zoez7) |
|
Sorry about the misunderstanding, I should've been more clear. When I said using the manager I meant to use the same reconcile style as We have multiple reconcile styles throughout the codebase which is already confusing, and controller-runtime controllers already implement rate limiting queues. I mentioned this to Scott Funkenhauser (@sfunkenhauser) in #728 as well |
|
I agree and thanks for the context! Eventually we would like to move Given that we want a minimal stop-gap (comment), #578 might be a better candidate since it avoids introducing a new workqueue pattern here. Let me know if you'd prefer I reopen #578 instead! Eitan Yarmush (@EItanya) Scott Funkenhauser (@sfunkenhauser) At the same time, I am happy to help with #730 |
|
My thought was that we can address the different reconciliation styles when moving the WorkerPoolSyncer to the ate-controller. This PR isn't introducing a new style, and just tries to fix gaps in the existing one. I'd rather not block this improvement on reimplementing the syncer using the controller-runtime. Eitan Yarmush (@EItanya) Feel free to push back if you disagree. |
|
I really don’t wanna be the person blocking this, of course I think incremental change is important. My broader point was that a lot of the logic added in this PR is done automatically by controller runtime, so if we’re going that direction we should just do it. But definitely don’t block on me if that’s not the plan, or if we plan to move away from that style. |
|
Eitan Yarmush (@EItanya) I appreciate you calling this out, and I agree that we should consolidate on the same reconciliation mechanism. That being said I don't want to ask Troy Chiu (@troychiu) to re-write this PR for the third time. I don't think this PR will make it anymore difficult to switch to using controller runtime (it might actually make it easier). In the interest of incremental improvement let's get this in as in, and we can handle the controller runtime refactor when moving to ate-controller (which should hopefully happen in the next week or so). |
de4c3db
into
agent-substrate:main
|
So I spoke to Julian Gutierrez Oschmann (@juli4n), and it sounds like the direction is to move away from controller-runtime generally, so either way I think this was the correct direction in the end, sorry for the delay |
|
Thanks Scott Funkenhauser (@sfunkenhauser) Eitan Yarmush (@EItanya)! Both of your suggestions were really helpful. |
Do you mind providing more details? |
Basically, controller-runtime is very opinionated, and contains more than is strictly necessary for many controllers. This sometimes leads to bloated controllers which don't behave exactly the way you expect. client-go machinery is slightly more complicated, but gives much more freedom to achieve the exact desired effect and performance. |
Fixes #609 The startup stored-worker scan (`enqueueStoredWorkers`) returned on the first `ListWorkers` error, skipping orphan cleanup until the next restart. The `#674` workqueue only retries per-key reconciles, not this initial scan, so retry the scan with capped `wait.Backoff` until it succeeds or the context is cancelled. - [x] Tests pass - [ ] Appropriate changes to documentation are included in the PR
Refactors
WorkerPoolSyncerto process events through a rate-limiting workqueue instead of processing them synchronously inline.Previously, store errors during Informer event handling, such as
store.ErrVersionConflict)store.ErrAlreadyExists)WorkerPoolnot yet present in the lister cachewere logged and dropped, leaving store state out of sync until a subsequent pod event occurred.