It's possible that the reconciler process "sees" a resource slice before the corresponding composition. Currently we handle this correctly after the initial synthesis by comparing generations. But the logic is inverted in the case that the synthesis is nil - resource slices are deleted if there is a newer composition generation.
For example:
Composition is created
Composition hits the reconciler informers
Synthesis starts and completes
Resource slice hits the reconciler informers
The slice is deleted by shouldDeleteSlice - either because the composition has been updated (newer generation than resource slice), or because composition is deleted)
Synthesis status hits the reconciler informers
This doesn't break tests because the integration tests use the same informers for some controllers that normally run in separate processes, so events are received in the same order by both sets of controllers.
It's possible that the reconciler process "sees" a resource slice before the corresponding composition. Currently we handle this correctly after the initial synthesis by comparing generations. But the logic is inverted in the case that the synthesis is nil - resource slices are deleted if there is a newer composition generation.
For example:
shouldDeleteSlice
- either because the composition has been updated (newer generation than resource slice), or because composition is deleted)This doesn't break tests because the integration tests use the same informers for some controllers that normally run in separate processes, so events are received in the same order by both sets of controllers.