Jira (PDB-1060) Top-level extract requires fields with underscores instead of dashes
Title: Message Title Andrii Nikitiuk created an issue PuppetDB / PDB-1060 Top-level extract requires fields with underscores instead of dashes Issue Type: Bug Affects Versions: PDB 2.2.x Assignee: Unassigned Created: 2014/12/09 5:04 PM Priority: Normal Reporter: Andrii Nikitiuk Top-level extract fields are inconsistent with all other operators fields. They are inconsistent with responses too. Query example: curl -X GET http://localhost:8080/v4/reports --data-urlencode 'query=["extract",["transaction_uuid"],["~","transaction-uuid",".*"]]' Response:
Jira (PDB-1043) top-level extract should support short-hand query syntax, or at least throw a reasonable error
Title: Message Title Andrii Nikitiuk assigned an issue to Andrii Nikitiuk PuppetDB / PDB-1043 top-level extract should support short-hand query syntax, or at least throw a reasonable error Change By: Andrii Nikitiuk Assignee: Andrii Nikitiuk Add Comment This message was sent by Atlassian JIRA (v6.3.7#6337-sha1:2ed701e) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-1043) top-level extract should support short-hand query syntax, or at least throw a reasonable error
Title: Message Title Andrii Nikitiuk commented on PDB-1043 Re: top-level extract should support short-hand query syntax, or at least throw a reasonable error I implemented a validation for the examples described here locally. May I assign this ticket to myself? Add Comment This message was sent by Atlassian JIRA (v6.3.7#6337-sha1:2ed701e) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-1043) top-level extract should support short-hand query syntax
Title: Message Title Andrii Nikitiuk commented on PDB-1043 Re: top-level extract should support short-hand query syntax As I understand here we are just missing validation for "extract" fields. Am I right? Add Comment This message was sent by Atlassian JIRA (v6.3.7#6337-sha1:2ed701e) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-722) PuppetDB response hanging on select-nodes subquery
Title: Message Title Andrii Nikitiuk commented on PDB-722 Re: PuppetDB response hanging on select-nodes subquery Created PR-1165 for the issue described in the comment above. Add Comment This message was sent by Atlassian JIRA (v6.3.7#6337-sha1:2ed701e) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-1043) top-level extract should support short-hand query syntax
Title: Message Title Andrii Nikitiuk commented on PDB-1043 Re: top-level extract should support short-hand query syntax Accoring to https://docs.puppetlabs.com/puppetdb/2.2/api/query/v4/operators.html#extract : An extract statement does not constitute a full query string. It may only be used as the second argument of an in statement. Do we need to change that? What is the desired behaviour for this top-level extract? Add Comment This message was sent by Atlassian JIRA (v6.3.7#6337-sha1:2ed701e) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-722) PuppetDB response hanging on select-nodes subquery
Title: Message Title Andrii Nikitiuk commented on PDB-722 Re: PuppetDB response hanging on select-nodes subquery Small addition to inconsistent error topic. According to https://docs.puppetlabs.com/puppetdb/latest/api/query/v4/operators.html#subquery-operators, it is allowed to extract a single field in vector-less form as in this example: curl -X GET 'http://localhost:8080/v4/facts' --data-urlencode 'query=["and", ["=", "name", "swapfree"], ["in", "name", ["extract", "fakefield", ["select-nodes", ["=", ["parameter", "name"], "mbp.corp.puppetlabs.net"]' But, this is still invalid query because of not allowed "fakefield" field. That is why it results in such a different error: Can't extract unknown 'nodes' field 'fakefield'. Acceptable fields are: ["certname","deactivated","facts-environment","report-environment","catalog-environment","facts-timestamp","report-timestamp","catalog-timestamp"] However, I think I see a bug here. If we use vector form (even with a single extract field), it stops printing such error. Here is an example that should fail with the same error as previous one, but it actually does not: curl -X GET 'http://localhost:8080/v4/facts' --data-urlencode 'query=["and", ["=", "name", "swapfree"], ["in", "name", ["extract", ["fakefield"], ["select-nodes", ["=", ["parameter", "name"], "mbp.corp.puppetlabs.net"]' This seems to be the only issue which should be fixed in scope of this jira ticket. Please correct me if I am wrong.
Jira (PDB-722) PuppetDB response hanging on select-nodes subquery
Title: Message Title Andrii Nikitiuk assigned an issue to Andrii Nikitiuk PuppetDB / PDB-722 PuppetDB response hanging on select-nodes subquery Change By: Andrii Nikitiuk Assignee: Andrii Nikitiuk Add Comment This message was sent by Atlassian JIRA (v6.3.7#6337-sha1:2ed701e) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-722) PuppetDB response hanging on select-nodes subquery
Title: Message Title Andrii Nikitiuk commented on PDB-722 Re: PuppetDB response hanging on select-nodes subquery Thank you for clarifications. I will work on those on my free time Add Comment This message was sent by Atlassian JIRA (v6.3.7#6337-sha1:2ed701e) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-722) PuppetDB response hanging on select-nodes subquery
Title: Message Title Andrii Nikitiuk commented on PDB-722 Re: PuppetDB response hanging on select-nodes subquery You were right about select-resources. But after operator replacement it seems to be generating correct error message: Andriis-MacBook-Pro:demonshi-puppetdb demonshi$ curl -X GET 'http://localhost:8080/v3/facts' --data-urlencode 'query=["and", ["=", "name", "swapfree"], ["in", "name", ["extract", ["parameter", "name"], ["select-resources", ["=", ["parameter", "name"], "mbp.corp.puppetlabs.net"]' Can't match on fields '["parameter" "name"]'. The v2-v3 query API does not permit vector-valued fields. Which seems to be correct. According to https://docs.puppetlabs.com/puppetdb/latest/api/query/v3/operators.html#subquery-operators there could only be 1 field extracted from a subquery. So, it seems that this issue is already fixed. Am I right? Add Comment This message was sent by Atlassian JIRA (v6.3.7#6337-sha1:2ed701e) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. T
Jira (PDB-722) PuppetDB response hanging on select-nodes subquery
Title: Message Title Andrii Nikitiuk commented on PDB-722 Re: PuppetDB response hanging on select-nodes subquery Currently it returns an error immediately: Andriis-MacBook-Pro:demonshi-puppetdb demonshi$ curl -X GET 'http://localhost:8080/v3/facts' --data-urlencode 'query=["and", ["=", "name", "swapfree"], ["in", "name", ["extract", ["parameter", "name"], ["select-nodes", ["=", ["parameter", "name"], "mbp.corp.puppetlabs.net"]' ["select-nodes" ["=" ["parameter" "name"] "mbp.corp.puppetlabs.net"]] is not well-formed: query operator 'select-nodes' is unknown Add Comment This message was sent by Atlassian JIRA (v6.3.7#6337-sha1:2ed701e) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-1005) regex operator does not work in abbreviated subqueries against trusted facts
Title: Message Title Andrii Nikitiuk commented on PDB-1005 Re: regex operator does not work in abbreviated subqueries against trusted facts It seems to be working now: curl -X GET http://localhost:8080/v3/facts/ --data-urlencode 'query=["~","value",".*"]' [ { "value" : "myvalue", "name" : "myfact", "certname" : "test11" } ] curl -X GET http://localhost:8080/v3/nodes --data-urlencode 'query=["~",["fact","myfact"],".*"]' [ { "name" : "test11",