Jira (PDB-5070) Determine query that provides (dotted) factpaths

2021-04-01 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper commented on  PDB-5070  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Determine query that provides (dotted) factpaths
 

  
 
 
 
 

 
 Facter 3 creates core legacy facts where part of the name can include network interface names, block devices, etc so those need to be filtered out as well. For posterity, the query I came up with is:  
 
 
 
 
 {  
 
 
   "query":  
 
 
   ["and",  
 
 
 ["~", "name", ".*\\..*"],  
 
 
 ["not",  
 
 
   ["or",  
 
 
 ["~", "name", "^blockdevice_.+_(model|size|vendor)"],  
 
 
 ["~", "name", "^(ipaddress|macaddress|mtu|netmask|network)_"],  
 
 
 ["~", "name", "^(ipaddress|macaddress|netmask|network|scope)6_"],  
 
 
 ["~", "name", "^sp_"],  
 
 
 ["~", "name", "^zone_.+_(brand|iptype|name|uuid|id|path|status)"]  
 
 
   ]  
 
 
 ]  
 

Jira (PDB-5070) Determine query that provides (dotted) factpaths

2021-03-26 Thread Austin Blatt (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Austin Blatt updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 PuppetDB /  PDB-5070  
 
 
  Determine query that provides (dotted) factpaths
 

  
 
 
 
 

 
Change By: 
 Austin Blatt  
 
 
Fix Version/s: 
 PDB n/a  
 
 
Release Notes: 
 Not Needed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)  
 
 

 
   
 

  
 

  
 

   





-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.392629.1616610675000.175285.1616776980039%40Atlassian.JIRA.


Jira (PDB-5070) Determine query that provides (dotted) factpaths

2021-03-25 Thread Austin Blatt (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Austin Blatt commented on  PDB-5070  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Determine query that provides (dotted) factpaths
 

  
 
 
 
 

 
 I believe the query that can identify any top-level dotted fact names is  
 
 
 
 
 curl -X POST http://localhost:8080/pdb/query/v4/fact-names \  
 
 
   -H 'Content-Type:application/json' \  
 
 
   -d '{"query": ["~", "name", ".*\\..*"]}'
  
 
 
 
  The exact escaping needed to make that . match only a . may differ based on where the POST is originating. From the command line my first attempt with a sngle backslash produced the error  
 
 
 
 
 Json parse error at line 1, column 30:  
 
 
    
 
 
 {"query": ["~", "name", ".*\..*"]}  
 
 
 ^  
 
 
    
 
 
 Unrecognized character escape '.' (code 46)
  
 
 
 
   
 

  
 
 
 
 

   

Jira (PDB-5070) Determine query that provides (dotted) factpaths

2021-03-25 Thread Austin Blatt (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Austin Blatt assigned an issue to Austin Blatt  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 PuppetDB /  PDB-5070  
 
 
  Determine query that provides (dotted) factpaths
 

  
 
 
 
 

 
Change By: 
 Austin Blatt  
 
 
Assignee: 
 Austin Blatt  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)  
 
 

 
   
 

  
 

  
 

   





-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.392629.1616610675000.174441.1616696940323%40Atlassian.JIRA.


Jira (PDB-5070) Determine query that provides (dotted) factpaths

2021-03-25 Thread Nick Walker (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Nick Walker updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 PuppetDB /  PDB-5070  
 
 
  Determine query that provides (dotted) factpaths
 

  
 
 
 
 

 
Change By: 
 Nick Walker  
 

  
 
 
 
 

 
 h1.  Background Facter 4 auto-converts facts with dots in the *name* to make it a structured fact.So {code}foo.bar = true{code} becomes {code}foo = { bar => true }{code} However, you can still have dots in keys inside of a structured fact so{code} baz = { zzz.yyy => true } {code} does not change in facter 4 because keys inside of a structured fact can contain dots without getting auto-converted.  Only the top level name of a fact is auto-converted when it contains dots.   h1.  What we need to do We need to construct a pdb query that can determine if customers currently have facts with dots in the name of the fact but not worry about keys inside of a structured fact.  This is so we can find cases where users with puppet < 7 will be affected by this change and can prepare appropriately because they know they are affected.     
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)  
 
 

 
   
 

  
 

  
 
   

Jira (PDB-5070) Determine query that provides (dotted) factpaths

2021-03-25 Thread Nick Walker (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Nick Walker updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 PuppetDB /  PDB-5070  
 
 
  Determine query that provides (dotted) factpaths
 

  
 
 
 
 

 
Change By: 
 Nick Walker  
 

  
 
 
 
 

 
 Facter 4 auto-converts facts with dots in the *name* to make it a structured fact.So {code}foo.bar = true{code} becomes {code}foo = { bar => true }{code} However, you can still have dots in keys inside of a structured fact so{code} baz = { zzz.yyy => true } {code} does not change in facter 4 because keys inside of a structured fact can contain dots without getting auto-converted.  Only the top level name of a fact is auto-converted when it contains dots.    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)  
 
 

 
   
 

  
 

  
 

   





-- 
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 view this discussion on the web visit 

Jira (PDB-5070) Determine query that provides (dotted) factpaths

2021-03-24 Thread Eric Thompson (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Eric Thompson created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 PuppetDB /  PDB-5070  
 
 
  Determine query that provides (dotted) factpaths
 

  
 
 
 
 

 
Issue Type: 
  Task  
 
 
Assignee: 
 Unassigned  
 
 
Created: 
 2021/03/24 11:31 AM  
 
 
Priority: 
  Normal  
 
 
Reporter: 
 Eric Thompson  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)  
 
 

 
   
 

  
 

  
 

   





-- 
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 view this discussion on the web visit