Applier is eating my events somewhere #1125
-
Tldr: Why doesn't this gist work? It's very messy WIP code, but has unit tests that so problem should be easy to reproduce. The controller test is currently failing. The events are flowing through the system and updating the store. I can see the outputs from my printlns Background, we've got quite a complex controller and have chance to do some tidy up work on it soon. The main issues we need to tackle is that we need our stores to be populated before the controllers run, we want all of our stores to be fed from the same streams and we want a good way of running all of this stuff so that if part of it dies it all falls over nicely so the service will auto restart. The architecture we want to aim for is a very slim binary which runs a number of controller libraries that are groupings of one or more KubeRS controllers. The top level service should know as little as possible about the libraries while achieving the above goals, which is where this |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
After a bit more digging, it appears that the |
Beta Was this translation helpful? Give feedback.
-
I finally figured this out by adding a 1ms delay into the loop that polled my futures. I don't fully understand why that was necessary but deep within the guts of the controller scheduling stuff there are checks to ensure a delay has passed (which is set to 1ms by the applier). It looks like the tokio clock wasn't advancing so the events never got scheduled onto the runner. |
Beta Was this translation helpful? Give feedback.
I finally figured this out by adding a 1ms delay into the loop that polled my futures. I don't fully understand why that was necessary but deep within the guts of the controller scheduling stuff there are checks to ensure a delay has passed (which is set to 1ms by the applier). It looks like the tokio clock wasn't advancing so the events never got scheduled onto the runner.