-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Introduce Filter CloudEvents Feature #5424
Introduce Filter CloudEvents Feature #5424
Conversation
Mind opening a doc PR? |
Signed-off-by: SpiritZhou <[email protected]>
2626226
to
2bfa4b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add some unit tests as well?
Co-authored-by: Tom Kerkhove <[email protected]> Signed-off-by: SpiritZhou <[email protected]>
Signed-off-by: SpiritZhou <[email protected]>
LGTM, but I'd like to see these two improvements though to improve the user experience/usability: |
Signed-off-by: SpiritZhou <[email protected]>
Signed-off-by: SpiritZhou <[email protected]>
Improvements added. |
Signed-off-by: SpiritZhou <[email protected]>
/run-e2e internal |
Would you mind fixing the conflicts please? |
Signed-off-by: SpiritZhou <[email protected]>
Fixed. |
@zroubalik / @JorTurFer Do you mind reviewing? I am not enough of an expert on the codebase but think it's generally OK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Nice job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome job! Some comments inline
Co-authored-by: Jorge Turrado Ferrero <[email protected]> Signed-off-by: SpiritZhou <[email protected]>
Signed-off-by: SpiritZhou <[email protected]>
Signed-off-by: SpiritZhou <[email protected]>
I've been thinking about this. Does it make sense supporting both at the same time? I mean, shouldn't include and exclude be mutually exclusive? Maybe we should support both, but being mutually exlusive, @tomkerkhove ? |
Signed-off-by: SpiritZhou <[email protected]>
Signed-off-by: SpiritZhou <[email protected]>
It will always let user confuse if include and exclude exist at the same time. It is better to have only one type in the specification. |
End-users should be able to use both, for example: eventSubscription: #Optional. Submit included/excluded event types will filter events when emitting events.
includedEventTypes: #Optional. Only events in this section will be emitted.
- keda.scaledobject.failed.v1
excludedEventTypes: #Optional. Events in this section will not be emitted.
- keda.scaledobject.ready.v1 But this should not be allowed and blocked: eventSubscription: #Optional. Submit included/excluded event types will filter events when emitting events.
includedEventTypes: #Optional. Only events in this section will be emitted.
- keda.scaledobject.ready.v1
excludedEventTypes: #Optional. Events in this section will not be emitted.
- keda.scaledobject.ready.v1 |
Yeah, currently they can, but my doubt is if that makes sense. In the moment when you add include Maybe we can go adding them as mutually exclusive, we will maintain the flexibility for the users because they can use include or exclude, but we can improve the logic not supporting both at the same time. WDYT? |
Oh in that way, that makes sense indeed. Let's only allow one or the other indeed |
Signed-off-by: SpiritZhou <[email protected]>
/run-e2e internal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
/run-e2e internal |
/run-e2e internal |
Signed-off-by: Jorge Turrado Ferrero <[email protected]>
/skip-e2e |
Introduce filter CloudEvents feature
Checklist
Fixes #
Relates to #3533