Skip to content

Add predicate-aware informer event handlers - #4894

Open
brendandburns wants to merge 1 commit into
kubernetes-client:masterfrom
brendandburns:fix-predicate-informer-event-handlers
Open

Add predicate-aware informer event handlers#4894
brendandburns wants to merge 1 commit into
kubernetes-client:masterfrom
brendandburns:fix-predicate-informer-event-handlers

Conversation

@brendandburns

Copy link
Copy Markdown
Contributor

Splits predicate-aware informer event-handler changes out of #4892.

Summary

  • add predicate overloads for informer event handlers
  • add FilteringResourceEventHandler
  • handle transitions into and out of a predicate match
  • harden filtering against null or malformed objects
  • add unit and end-to-end coverage

Validation

  • ./mvnw -q -pl util,e2e -am compile test-compile -DskipTests

@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 1, 2026
@kubernetes-prow
kubernetes-prow Bot requested a review from yue9944882 September 1, 2026 19:10
@linux-foundation-easycla

linux-foundation-easycla Bot commented Sep 1, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: brendandburns / name: Brendan Burns (ea2cb84)

@kubernetes-prow kubernetes-prow Bot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 1, 2026
@brendandburns
brendandburns force-pushed the fix-predicate-informer-event-handlers branch from f95f16d to ea2cb84 Compare September 1, 2026 19:19
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Sep 1, 2026
try {
return filter.test(obj);
} catch (RuntimeException e) {
return false;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Add a log here so that we don't silently drop events.

Add predicate-aware event handler overloads, transition handling, malformed-object hardening, and coverage.
@brendandburns
brendandburns force-pushed the fix-predicate-informer-event-handlers branch from ea2cb84 to c6f6bb9 Compare September 1, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant