Jira (FACT-2312) Run PDK and Bolt tests with Facter 4.x

5 views
Skip to first unread message

Bogdan Irimie (JIRA)

unread,
Jan 29, 2020, 7:41:04 AM1/29/20
to puppe...@googlegroups.com
Bogdan Irimie created an issue
 
Facter / Task FACT-2312
Run PDK and Bolt tests with Facter 4.x
Issue Type: Task Task
Assignee: Unassigned
Created: 2020/01/29 4:40 AM
Priority: Normal Normal
Reporter: Bogdan Irimie
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Sebastian Miclea (JIRA)

unread,
Jan 30, 2020, 7:49:04 AM1/30/20
to puppe...@googlegroups.com
Sebastian Miclea commented on Task FACT-2312
 
Re: Run PDK and Bolt tests with Facter 4.x

PDK results:
Functionality wise tests passed.
The only problem is that PDK is compatible with Ruby 2.1.9 and Facter4 is compatible with Ruby 2.3 and up.
At the moment the only syntax change that we've found is that we use var_name&. that is used to suppress Nil Class exceptions.

For this there are two solutions:
1. Replace &. to be compatible with ruby 2.1.9
2. Implement a backport option for ruby 2.1.9 that allows using the safe navigation operator.

PDK PR: https://github.com/puppetlabs/pdk/pull/838

Error:

Failure/Error: require 'facter-ng'
SyntaxError:
  /home/travis/build/puppetlabs/pdk/vendor/bundle/ruby/2.1.0/gems/facter-ng-4.0.4/lib/resolvers/mountpoints_resolver.rb:21: syntax error, unexpected '.'
              match&.captures&.first
                     ^

Florin Dragos (JIRA)

unread,
Jan 30, 2020, 8:12:03 AM1/30/20
to puppe...@googlegroups.com
Florin Dragos assigned an issue to Florin Dragos
 
Change By: Florin Dragos
Assignee: Florin Dragos
Reply all
Reply to author
Forward
0 new messages