-
Notifications
You must be signed in to change notification settings - Fork 2
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
Bug: Lexical parser prohibits querying on fieldnames containing a questionmark #1
Comments
A colleague of mine solved it for me: In line 713 ( node-puppetdbquery/build/parser.js Line 713 in 445ff5b
Like this: Is changed to: Now I can execute queries that use the "latest_report?" fieldname, like this: Unless this change allow too much or makes something insecure, please update your code accordingly. |
it is possible to just quote the property in the query, like |
:-) |
For some reason, the puppetdb people thought it was a good idea to have a questionmark in one of the Events fieldnames: "latest_report?"
From the Events manual (https://docs.puppet.com/puppetdb/4.0/api/query/v4/events.html):
latest_report? (Boolean): whether the event occurred in the most recent Puppet run (per-node).
The github project Puppet Explorer (https://github.com/spotify/puppetexplorer/) use 'node-puppetdbquery'.
If I do a query for "#event.latest_report?=true", Puppet Explorer show me a red banner complaining about:
If I try removing the questionmark, I get a red banner stating that I should use a fieldname with the questionmark:
See the "latest_report?" there in the middle.
Can you please make the lexical parser not bail on the questionmark character?
The error is generated here:
node-puppetdbquery/build/parser.js
Line 586 in 445ff5b
The text was updated successfully, but these errors were encountered: