Skip to content

PUP-11722 causing pdk to fail in 4.x with "NameError: uninitialized constant Concurrent::RubyThreadLocalVar" #127

Open
@threepistons

Description

@threepistons

Describe the Bug

pdk validate fails with

pdk (INFO): Using Ruby 2.5.9
pdk (INFO): Using Puppet 6.28.0
pdk (ERROR): The spec_clean rake task failed with the following error(s):

rake aborted!
NameError: uninitialized constant Concurrent::RubyThreadLocalVar
Did you mean?  Concurrent::RubyThreadPoolExecutor

PUP-11722 describes the root cause, which is now resolved in Puppet with the release of gems 6.29.0 and 7.22.0.

The problem for me, as a consumer of the puppet-dev-tools Docker image, is that the puppet gems 6.29.0 and 7.22.0 aren't available to my workflow, even though they are in Rubygems and I have verified (7.22.0, 6.29.0) that they can be installed with gem into a vanilla Ubuntu container.

Expected Behavior

When I: use tag 1.0.0 of my controlrepo checking action, that worked up until recently, with no specified concurrent-ruby gem version in my site/roles/Gemfile and site/profiles/Gemfile.
And I: specify Puppet gem version 6.29.0 or 7.22.0 in my Github workflow file unittests.yml.txt
I get (if I put the block for testing 7.22.0 first):

+-------------------+
| Test the profiles |
+-------------------+
pdk (WARN): This module is compatible with an older version of PDK. Run `pdk update` to update it to your version of PDK.
pdk (ERROR): Unable to find a Puppet gem matching ~> 7.22.0.
/entrypoint.sh: line 27: return: can only `return' from a function or sourced script
pdk (WARN): This module is compatible with an older version of PDK. Run `pdk update` to update it to your version of PDK.
/opt/puppetlabs/pdk/private/ruby/2.5.9/lib/ruby/2.5.0/forwardable.rb:229: warning: Insecure world writable dir /usr/local/bundle in PATH, mode 040777
pdk (ERROR): Unable to find a Puppet gem matching ~> 7.22.0.
/entrypoint.sh: line 28: return: can only `return' from a function or sourced script

+----------------+
| Test the roles |
+----------------+
pdk (WARN): This module is compatible with an older version of PDK. Run `pdk update` to update it to your version of PDK.
pdk (ERROR): Unable to find a Puppet gem matching ~> 7.22.0.
/entrypoint.sh: line 33: return: can only `return' from a function or sourced script
pdk (WARN): This module is compatible with an older version of PDK. Run `pdk update` to update it to your version of PDK.
/opt/puppetlabs/pdk/private/ruby/2.5.9/lib/ruby/2.5.0/forwardable.rb:229: warning: Insecure world writable dir /usr/local/bundle in PATH, mode 040777
pdk (ERROR): Unable to find a Puppet gem matching ~> 7.22.0.
/entrypoint.sh: line 34: return: can only `return' from a function or sourced script

And if I put 6.29.0 first, I get the same message but stating 6.29.0 instead of 7.22.0.

Steps to Reproduce

Go to https://github.com/threepistons/action-install-versioned-puppet-gem/actions and run each workflow in turn. The unittest workflow will contain a message like "pdk (ERROR): Unable to find a Puppet gem matching ~> 6.29.0." and the other two workflows will succeed to install Puppet with numbered Gems.

Environment

  • Version 4.x and recent tagged images from Docker
  • Platform Github Actions

Additional Context

You can work around this by using an earlier Puppet gem (e.g. 7.21.0 or 6.28.0) and adding gem 'concurrent-ruby', '< 1.2.0', require: false to your the development section of your Gemfile in both the roles and profiles modules of the controlrepo, as suggested in PUP-11722.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions