Skip to content

test: reproducer for #3445#3446

Closed
SamBarker wants to merge 5 commits into
operator-framework:mainfrom
SamBarker:reproducer/status-event-filtering
Closed

test: reproducer for #3445#3446
SamBarker wants to merge 5 commits into
operator-framework:mainfrom
SamBarker:reproducer/status-event-filtering

Conversation

@SamBarker

Copy link
Copy Markdown
Contributor

Summary

  • Adds a @Disabled integration test that reproduces EventFilterWindow suppresses mapper events when controller writes through shared InformerEventSource #3445EventFilterWindow suppresses mapper events when a controller writes to a secondary resource through its own InformerEventSource
  • The test creates a primary and secondary resource, the reconciler patches the secondary's observedGeneration through the shared event source, and asserts the mapper fires for gen==obsGen — currently fails because the filter window swallows the event

Test plan

Copilot AI review requested due to automatic review settings June 29, 2026 05:39
@openshift-ci openshift-ci Bot requested review from csviri and xstefank June 29, 2026 05:39
@SamBarker SamBarker force-pushed the reproducer/status-event-filtering branch from 01de88d to d2964b7 Compare June 29, 2026 05:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 when generation == 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>
@SamBarker SamBarker force-pushed the reproducer/status-event-filtering branch from 3ce2110 to 2d2d622 Compare June 29, 2026 05:52
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>
@SamBarker SamBarker closed this Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants