-
Notifications
You must be signed in to change notification settings - Fork 23
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
Tag group with name containing "-" hyphen breaks read op #37
Comments
Hi @tblong , Thanks for your feedback here. I think there are 2 parts to your issue. The first part is about tag and tag group naming. The actual exception here is coming not from nhaystack code but from the haystack-java reference library. This is because in the Project Haystack standard using a '-' in the tag name is invalid. I'm surprised that Niagara allows it. The rules for tag naming: https://project-haystack.org/doc/docHaystack/Kinds#names With regards to the second part of your question about how nhaystack handles the expansion of tag groups in Niagara I'm going to need to think about that some more. I'll come back to you once I have done some investigation. |
@ci-richard-mcelhinney Thanks much for the help here. My assumption is that the nhaystack side will likely have to defensively prevent the call to |
@esanderson can you please comment on the rules Niagara enforces for tag names? Is it just he same rules as slot names? If so there might be a difference here we need to reconcile. |
We are not doing much enforcement on tag or tag group names beyond the rules for slot names. We do enforce that no tag name is equal to a tag group name and vice-versa. We should be doing more enforcement, however, because NEQL only supports names that start with a letter and contain letters, digits, underbar, and dot (entered a Tridium defect for this). We may not enforce that tag names must start with a lower case letter as required by Project Haystack. Supporting the dot (a rare case, probably) would violate Haystack rules. Would be nice if the dictionary could enforce stricter rules than enforced for all tag names in Niagara (noted on the Tridium defect). Regarding the behavior of tag groups, they are mostly a container for other tags. However, Niagara also implies a marker tag that is the tag group name. That implied would be exported over nhaystack in addition to the tags in the tag group. |
nHaystack version: v3.2.0
Niagara N4 v4.12.2.16
The Issue
Creating a tag dictionary, then a tag group where the tag group name is e.g. "valve-Actuator", causes any read op filter query to return
Invalid tag name: valve$2dActuator" errTrace:"java.lang.IllegalArgumentException
. Full stack trace below. The tag group appears to be treated as a tag itself when its merely a container for other tags.Steps to reproduce
https://localhost/haystack/read?filter=point
Additional Coments
Note that when I rename the tag group from "valve-Actuator" to "valveActuator" then the read op succeeds as expected. What is unexpected is that the control point on which the tag group "valveActuator" added, the resulting read op returns "valveActuator" as a marker tag to the control point. The tag group is unexpectedly getting treated as a maker tag.
The text was updated successfully, but these errors were encountered: