Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: field selectors support for InformerEventSource #2835

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 20, 2025
Merged

Conversation

csviri
Copy link
Collaborator

@csviri csviri commented Jun 19, 2025

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

closes #2813

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

csviri commented Jun 19, 2025

closes #2813

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

csviri commented Jun 20, 2025

@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]>
@csviri csviri requested a review from xstefank June 20, 2025 12:18
Copy link
Collaborator

@xstefank xstefank left a comment

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]>
@csviri csviri merged commit 2dc9111 into next Jun 20, 2025
25 of 29 checks passed
@csviri csviri deleted the field-selector branch June 20, 2025 15:01
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.

Support field selector in InformerEventSource
3 participants