Conversation

csviri

Signed-off-by: Attila Mészáros [email protected]

closes #2813

@openshift-ciopenshift-ci bot requested review from metacosm and xstefank June 19, 2025 10:13
@csviricsviri marked this pull request as draft June 19, 2025 10:13
@openshift-ciopenshift-ci bot added the do-not-merge/work-in-progressIndicates that a PR should not merge because it is a work in progress.label Jun 19, 2025
@csviri

closes #2813

@csviricsviri requested a review from xstefank June 20, 2025 07:19
@csviricsviri marked this pull request as ready for review June 20, 2025 07:19
@openshift-ciopenshift-ci bot removed the do-not-merge/work-in-progressIndicates that a PR should not merge because it is a work in progress.label Jun 20, 2025
@csviricsviri changed the base branch from main to next June 20, 2025 07:19
@csviri

@metacosm @xstefank this is ready now. Targeting next with the features.

csviri added 3 commits June 20, 2025 09:21
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
informer =
@Informer(
withFields =
@Field(field = "type", value = FieldSelectorTestReconciler.MY_SECRET_TYPE)))
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems a little strange to me to read. Maybe "name" or "key" so it's not @Field(field = ... but of course this is just recommendation so feel free to discard it.

Copy link
Collaborator Author

@csviri csviri Jun 20, 2025

Choose a reason for hiding this comment

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

Yes, it is a bit smelly.

Alternatively, we could have:

@FieldSelector(field="type", value="value", negated=false)

So there would not be with and without fields in @Informer just a list of @FieldSelector.
We might want to have similar api for java api for informers.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@metacosm what do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

refactored it to a more explicit model, PTAL

Signed-off-by: Attila Mészáros <[email protected]>
@csviricsviri requested a review from xstefank June 20, 2025 12:18

Choose a reason for hiding this comment

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

Way better!

Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
@csviricsviri merged commit 2dc9111 into next Jun 20, 2025
25 of 29 checks passed
@csviricsviri deleted the field-selector branch June 20, 2025 15:01
Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

Support field selector in InformerEventSource