Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-1043

top-level extract should support short-hand query syntax, or at least throw a reasonable error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PDB 3.0.0
    • Fix Version/s: PDB 3.0.0
    • Component/s: None
    • Labels:
      None

      Description

      This query:

      curl -X GET http://localhost:8080/v4/resources --data-urlencode 'query=["extract",["parameter","name"],["~","certname",".*"]]'
      

      causes a postgres exception:

      org.postgresql.util.PSQLException: ERROR: column resources.name does not exist
      

      This query:

      curl -X GET http://localhost:8080/v4/facts --data-urlencode 'query=["extract",["fact","uptime_hours"],["~","certname",".*"]]'
      

      is broken in a different way, but should also be supported. Current response is this:

      [ { }, { }, { }, { }, { }, { }, { }, { }, { }, { }, { }, { }, { }, { }, { }, { }, { }, { }, { }, { }, { }, { }, { }, { }, { }]
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  demonshi Andrii Nikitiuk
                  Reporter:
                  wyatt Wyatt Alt
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: