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

PQL fact path projection whitespace sensitive

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:
    • Acceptance Criteria:
      Hide

      This query should now work, where it previously failed.

      ❯ curl -sSXGET 'http://localhost:8080/pdb/query/v4' \
          -d 'query=inventory[fact.os.family, facts.os]{}'
      []
      

      This query should continue to fail.

      ❯ curl -sSXGET 'http://localhost:8080/pdb/query/v4' \
          -d 'query=resources { parameters.content= "a"}'
      PQL parse error at line 1, column 33:
       
      resources { parameters.content= "a"}
                                      ^
       
      Expected one of:
       
      is not null
      is null
      in
      =
      >
      <
      <=
      >=
      ~>
      ~
      

      Show
      This query should now work, where it previously failed. ❯ curl -sSXGET 'http://localhost:8080/pdb/query/v4' \ -d 'query=inventory[fact.os.family, facts.os]{}' [] This query should continue to fail. ❯ curl -sSXGET 'http://localhost:8080/pdb/query/v4' \ -d 'query=resources { parameters.content= "a"}' PQL parse error at line 1, column 33:   resources { parameters.content= "a"} ^   Expected one of:   is not null is null in = > < <= >= ~> ~
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      The currently working PQL query for fact path projection looks like. The extra spaces are problematic and error-prone

      curl -sSXGET 'http://localhost:8080/pdb/query/v4' \
          -d 'query=inventory[fact.os.family , facts.os ]{}'
      > []
      

      For the sake of backwards compatibility we will not fix the query fields until PDB 7.0.0

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              austin.blatt Austin Blatt
              Reporter:
              austin.blatt Austin Blatt
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support