Jira (FACT-3176) Facter long key breaks YAML formatter

2023-01-18 Thread Tomas Barton (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Tomas Barton commented on  FACT-3176  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Facter long key breaks YAML formatter   
 

  
 
 
 
 

 
 Sorry, mine fault, the yaml seems to be valid. I just haven't seen this syntax.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)  
 
 

 
   
 

  
 

  
 

   





-- 
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.478605.1673529425000.1945.1674033120019%40Atlassian.JIRA.


Jira (FACT-3176) Facter long key breaks YAML formatter

2023-01-12 Thread Tomas Barton (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Tomas Barton updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-3176  
 
 
  Facter long key breaks YAML formatter   
 

  
 
 
 
 

 
Change By: 
 Tomas Barton  
 

  
 
 
 
 

 
 {{facter -y longfact}} will output invalid YAML when some key is too long (somewhere around 130 characters){code}longfact:  ? /lib/kubelet/pods/764c8dc6-dff9-4577-8e61-cfa61eecc4f5/volumes/kubernetes.io/configmap/esconfig/pvc-e17f80f3-6f36-431f-b44e-72fcbee370a6  : foo  ? /lib/kubelet/pods/764c8dc6-dff9-4577-8e61-cfa61eecc4f5/volumes/kubernetes.io~configmap/esconfig/pvc-e17f80f3-6f36-431f-b44e-72fcbee370a6  : bar  1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567: "thisis fine"  ? 1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-12345678  : "not fine"  ? 1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890  : foo  bar: baz  foo: bar{code}the fact is defined as {{/opt/puppetlabs/puppet/cache/lib/facter/longfact.rb}}:{code}#!/usr/bin/env rubyrequire 'facter'Facter.add(:longfact) do  setcode doret = {}ret['/lib/kubelet/pods/764c8dc6-dff9-4577-8e61-cfa61eecc4f5/volumes/kubernetes.io/configmap/esconfig/pvc-e17f80f3-6f36-431f-b44e-72fcbee370a6'] = 'foo'ret['/lib/kubelet/pods/764c8dc6-dff9-4577-8e61-cfa61eecc4f5/volumes/kubernetes.io~configmap/esconfig/pvc-e17f80f3-6f36-431f-b44e-72fcbee370a6'] = 'bar'ret['bar'] = 'baz'ret['1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890'] = 'foo'ret['foo'] = 'bar'ret['1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567'] = 'this is fine'ret['1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-12345678'] = 'not fine'ret  endend{code}also I would expect{code}facter --puppet longfact."/lib/kubelet/pods/764c8dc6-dff9-4577-8e61-cfa61eecc4f5/volumes/kubernetes.io/configmap/esconfig/pvc-e17f80f3-6f36-431f-b44e-72fcbee370a6"{code} to return a value instead of {{nil}}JSON looks ok {{ facter --puppet longfact -j}}:{code :json }{  "longfact": {"/lib/kubelet/pods/764c8dc6-dff9-4577-8e61-cfa61eecc4f5/volumes/kubernetes.io/configmap/esconfig/pvc-e17f80f3-6f36-431f-b44e-72fcbee370a6": "foo","/lib/kubelet/pods/764c8dc6-dff9-4577-8e61-cfa61eecc4f5/volumes/kubernetes.io~configmap/esconfig/pvc-e17f80f3-6f36-431f-b44e-72fcbee370a6": "bar","1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567": "this is fine","1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-12345678": "not fine",

Jira (FACT-3176) Facter long key breaks YAML formatter

2023-01-12 Thread Tomas Barton (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Tomas Barton updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-3176  
 
 
  Facter long key breaks YAML formatter   
 

  
 
 
 
 

 
Change By: 
 Tomas Barton  
 

  
 
 
 
 

 
 {{facter -y  longfact }} will output invalid YAML when some key is too long (somewhere around 130 characters){code}longfact:  ? /lib/kubelet/pods/764c8dc6-dff9-4577-8e61-cfa61eecc4f5/volumes/kubernetes.io/configmap/esconfig/pvc-e17f80f3-6f36-431f-b44e-72fcbee370a6  : foo  ? /lib/kubelet/pods/764c8dc6-dff9-4577-8e61-cfa61eecc4f5/volumes/kubernetes.io~configmap/esconfig/pvc-e17f80f3-6f36-431f-b44e-72fcbee370a6  : bar  1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567: "thisis fine"  ? 1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-12345678  : "not fine"  ? 1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890  : foo  bar:   -  baz   -  foo   foo : bar{code}the fact is defined as {{/opt/puppetlabs/puppet/cache/lib/facter/longfact.rb}}:{code}#!/usr/bin/env rubyrequire 'facter'Facter.add(:longfact) do  setcode doret = {}ret['/lib/kubelet/pods/764c8dc6-dff9-4577-8e61-cfa61eecc4f5/volumes/kubernetes.io/configmap/esconfig/pvc-e17f80f3-6f36-431f-b44e-72fcbee370a6'] = 'foo'ret['/lib/kubelet/pods/764c8dc6-dff9-4577-8e61-cfa61eecc4f5/volumes/kubernetes.io~configmap/esconfig/pvc-e17f80f3-6f36-431f-b44e-72fcbee370a6'] = 'bar'ret['bar'] = 'baz' , ret['1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890'] = 'foo'ret['foo'] = 'bar'ret['1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567'] = 'this is fine'ret['1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-12345678'] = 'not fine'ret  endend{code}also I would expect{code}facter --puppet longfact."/lib/kubelet/pods/764c8dc6-dff9-4577-8e61-cfa61eecc4f5/volumes/kubernetes.io/configmap/esconfig/pvc-e17f80f3-6f36-431f-b44e-72fcbee370a6"{code} to return a value instead of {{nil}}JSON looks ok  {{ facter --puppet longfact -j}} :{code}{  "longfact": {"/lib/kubelet/pods/764c8dc6-dff9-4577-8e61-cfa61eecc4f5/volumes/kubernetes.io/configmap/esconfig/pvc-e17f80f3-6f36-431f-b44e-72fcbee370a6": "foo","/lib/kubelet/pods/764c8dc6-dff9-4577-8e61-cfa61eecc4f5/volumes/kubernetes.io~configmap/esconfig/pvc-e17f80f3-6f36-431f-b44e-72fcbee370a6": "bar","1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567": "this is fine","1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-12345678": "not fine",

Jira (FACT-3176) Facter long key breaks YAML formatter

2023-01-12 Thread Tomas Barton (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Tomas Barton created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-3176  
 
 
  Facter long key breaks YAML formatter   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Affects Versions: 
 FACT 4.2.13  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 Facter 4  
 
 
Created: 
 2023/01/12 5:17 AM  
 
 
Environment: 
 Debian 11  
 
 
Priority: 
  Normal  
 
 
Reporter: 
 Tomas Barton  
 

  
 
 
 
 

 
 facter -y will output invalid YAML when some key is too long (somewhere around 130 characters)  
 
 
 
 
 longfact:  
 
 
   ? /lib/kubelet/pods/764c8dc6-dff9-4577-8e61-cfa61eecc4f5/volumes/kubernetes.io/configmap/esconfig/pvc-e17f80f3-6f36-431f-b44e-72fcbee370a6  
 
 
   : foo  
 
 
   ?