Jira (FACT-2344) Run PDK tests with Facter 4.x

8 views
Skip to first unread message

Bogdan Irimie (JIRA)

unread,
Feb 3, 2020, 9:30:03 AM2/3/20
to puppe...@googlegroups.com
Bogdan Irimie created an issue
 
Facter / Task FACT-2344
Run PDK tests with Facter 4.x
Issue Type: Task Task
Assignee: Unassigned
Created: 2020/02/03 6:29 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,
Feb 4, 2020, 8:48:03 AM2/4/20
to puppe...@googlegroups.com
Sebastian Miclea commented on Task FACT-2344
 
Re: Run PDK 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
                     ^

 

Sebastian Miclea (JIRA)

unread,
Feb 4, 2020, 8:48:05 AM2/4/20
to puppe...@googlegroups.com
Sebastian Miclea assigned an issue to Sebastian Miclea
 
Change By: Sebastian Miclea
Assignee: Sebastian Miclea

Sebastian Miclea (JIRA)

unread,
Feb 10, 2020, 8:58:05 AM2/10/20
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages