Closed fuggle07 closed 4 years ago
Thanks @fuggle07 for reporting the issue.
The root cause seems to be a recent update of the ruby library parallel
, which is a subdependency in inspec 1.51.6
(https://github.com/inspec/inspec/blob/b1801a2219722b469082c1235cc1fe528f5de07b/inspec.gemspec#L40).
The recent update of parallel
included the drop of ruby 2.4(https://github.com/grosser/parallel/compare/v1.19.2...v1.20.0#diff-6ac3f79fc25d95cd1e3d51da53a4b21b939437392578a35ae8cd6d5366ca5485L9), which is used as ruby version by Puppet 5.
Nice one @mbloch1986.
I came to the same fix at about the same time and was about to raise a PR.
Explicitly pinning the parallel ruby gem to < 1.20 (i.e. 1.19.1 or 1.19.2) prior to attempting to install inspec 1.51.6 prevents inspec 1.51.6 pulling in parallel latest, i.e. 1.20, and breaking ruby 2.4.
Thanks @fuggle07 !
We included the fix, to lockdown the version of parallel to 1.19.2
, in Packer AEM 4.27.0
Describe the bug When baking author and publisher AMIs, inspec fails to install due to unsatisfiable dependencies:
"[0;32m aws: [1;31mError: Could not update: Execution of '/opt/puppetlabs/puppet/bin/gem install -v 1.51.18 --no-document inspec' returned 1: ERROR: Error installing inspec:[0m [0;32m aws: parallel requires Ruby version >= 2.5.[0m"
To Reproduce Steps to reproduce the behavior:
PACKER_LOG_PATH=logs/packer-aws-author.log \ PACKER_LOG=1 \ packer build \ -var-file conf/packer/vars/00_default.json -var-file conf/packer/vars/99_local.json \ -var-file=conf/packer/vars/components/author.json \ -var 'version=8' \ templates/packer/aws/generic.json
Expected behavior Expected "[0;32m aws: [mNotice: /Stage[main]/Config/Package[inspec]/ensure: created[0m[0m"
Screenshots None
Environment (please complete the following information if relevant):
Additional context This last ran successfully 20201102