-
Notifications
You must be signed in to change notification settings - Fork 78
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
Unhandled exception when dash in event name #487
Comments
would |
I tested that and it seems that using Perhaps the docs should be clarified first and then we could tweak our rulebooks accordingly. But in any case a quality implementation should not throw unexpected expectations for cases which are not completely unreasonable. |
Hello. There are some constraints for event keys that are not properly documented yet. The way to deal with this kind of situation would be to use a source filter to transform the incoming events. For this specific case, we already provide a source filter that replaces dashes to underscores: Related with: https://issues.redhat.com/browse/AAP-11514 |
FWIW, we'll tweak the "pcp-pmie" JSON field name that triggered this issue to split it up into {"pcp":{"pmie":{ ... }}} - on discussing with @myllynen we think this will be a cleaner approach in general anyway. |
Please confirm the following
Bug Summary
An unexpected exception is thrown when using a dash (minus) as part of the condition string:
condition: event.payload.vendor-product.rule == "Test"
Environment
Steps to reproduce
Trivial to reproduce:
Actual results
Unexcepted exception.
Expected results
No exception.
Additional information
While the code will likely be easy to fix I think the documentation should already at this point provide instruction how vendors should setup "namespace" for their products. I've now seen one project to use a generic condition name (
event.payload.<rule-name>
e.g.event.payload.lifecycle
) while another tried to create a namespace withevent.payload.project-component.rule
type approach.Since in most enterprises where only one port is expected for each service (such as EDA) instead of a separate port for each event source there needs to a way how to avoid overalapping names with different vendors and event sources. Perhaps we should a have separate doc issue for this.
Thanks.
The text was updated successfully, but these errors were encountered: