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

PQL fact path projection whitespace sensitive

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Duplicate
    • None
    • None
    • PuppetDB
    • None
    • 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 = > < <= >= ~> ~
    • PuppetDB
    • Needs 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

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

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support