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

6 views
Skip to first unread message

Bogdan Irimie (JIRA)

unread,
Feb 3, 2020, 9:29:05 AM2/3/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
 
Facter / Task FACT-2312
Run Bolt tests with Facter 4.x
Change By: Bogdan Irimie
Summary: Run PDK and Bolt tests with Facter 4.x
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:50:04 AM2/4/20
to puppe...@googlegroups.com
Sebastian Miclea updated an issue
Change By: Sebastian Miclea
Comment: *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:*
{code:bash}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
                     ^
{code}

Florin Dragos (JIRA)

unread,
Feb 5, 2020, 3:50:04 AM2/5/20
to puppe...@googlegroups.com
Florin Dragos updated an issue
Change By: Florin Dragos
Release Notes: Not Needed
Reply all
Reply to author
Forward
0 new messages