test: reproducer for #3445#3446
Closed
SamBarker wants to merge 5 commits into
Closed
Conversation
01de88d to
d2964b7
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a disabled integration-test reproducer for issue #3445 in the operator-framework test suite, demonstrating that EventFilterWindow can suppress informer events in a way that prevents a SecondaryToPrimaryMapper from observing a secondary status transition and re-triggering reconciliation.
Changes:
- Introduces a new
StatusEventFilteringIT(currently@Disabled) that sets up primary/secondary CRs and asserts the mapper triggers whengeneration == observedGeneration. - Adds minimal primary/secondary CustomResource types plus spec/status POJOs to support the reproducer.
- Adds reconcilers to drive the status patch and event-source + mapper scenario under test.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/statuseventfiltering/StatusEventSecondaryResourceStatus.java | Adds status POJO with observedGeneration used by the reproducer. |
| operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/statuseventfiltering/StatusEventSecondaryResourceSpec.java | Adds spec POJO for the secondary test CR. |
| operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/statuseventfiltering/StatusEventSecondaryResource.java | Adds namespaced secondary CR type with spec/status and init helpers. |
| operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/statuseventfiltering/StatusEventSecondaryReconciler.java | Adds a no-op reconciler for the secondary CR (used in the test wiring). |
| operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/statuseventfiltering/StatusEventPrimaryResource.java | Adds namespaced primary CR type for the controller under test. |
| operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/statuseventfiltering/StatusEventPrimaryReconciler.java | Implements the primary reconciler that patches secondary status via its own InformerEventSource and configures the mapper guard. |
| operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/statuseventfiltering/StatusEventFilteringIT.java | Adds the disabled IT reproducer and assertions for the stuck-at-1-execution behavior. |
…hared InformerEventSource When a controller patches a secondary resource's status through its own InformerEventSource (via eventFilteringUpdateAndCacheResource), the EventFilterWindow suppresses the resulting informer event. If the controller's mapper guards on generation == observedGeneration, it never sees the status become ready and the controller enters a dead state. The test creates a primary and secondary resource, waits for the reconciler to patch the secondary's observedGeneration through the shared event source, then asserts that the mapper fires and triggers re-reconciliation. Currently fails — the filter window swallows the event. Assisted-by: Claude claude-opus-4-6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
The issue link in @disabled will be updated once the issue is created. Assisted-by: Claude claude-opus-4-6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
3ce2110 to
2d2d622
Compare
Replace the single-controller model (primary patches secondary status through shared InformerEventSource) with two independent controllers matching the Kroxylicious pattern: a SecondaryReconciler that patches its own status via UpdateControl.patchStatus(), and a PrimaryReconciler that watches secondaries via InformerEventSource and tracks readiness. The test uses a stall mechanism to create a timing window where the secondary controller's status patch races with the primary's own reconciliation. Currently passes — the event is delivered correctly. Assisted-by: Claude claude-opus-4-6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@Disabledintegration test that reproduces EventFilterWindow suppresses mapper events when controller writes through shared InformerEventSource #3445 —EventFilterWindowsuppresses mapper events when a controller writes to a secondary resource through its ownInformerEventSourceobservedGenerationthrough the shared event source, and asserts the mapper fires forgen==obsGen— currently fails because the filter window swallows the eventTest plan
@Disabled, runStatusEventFilteringIT— confirms the test fails (mapper never fires, controller stuck at 1 execution)@Disabledcan be removed