Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to 9.1.0 make /apt_key.rb:100: syntax error, unexpected ']' #1144

Open
aqueos opened this issue Nov 8, 2023 · 4 comments
Open

upgrade to 9.1.0 make /apt_key.rb:100: syntax error, unexpected ']' #1144

aqueos opened this issue Nov 8, 2023 · 4 comments

Comments

@aqueos
Copy link

aqueos commented Nov 8, 2023

Describe the Bug

since upgrading to 9.1.0 puppet fail to run with

Error: Could not autoload puppet/provider/apt_key/apt_key: /opt/puppetlabs/puppet/cache/lib/puppet/provider/apt_key/apt_key.rb:100: syntax error, unexpected ']'
...   key_long: fingerprint[-16..], # last 16 characters of fin...

downgrading to 9.0.2 and all works again.
puppet module install puppetlabs-apt --ignore-dependencies --version 9.0.2 --force

Expected Behavior

continue working like with 9.0.2

Steps to Reproduce

Steps to reproduce the behavior:

  1. upgrade the module version
    2 run puppet agent

Environment

  • Version puppet 6 with apt module 9.1.0
  • Platform debian 10

Additional Context


Notice: Found 'puppetlabs-apt' (v9.0.2) in /etc/puppetlabs/code/environments/production/modules ...                                                                                                                                                           
Notice: Downloading from https://forgeapi.puppet.com ...                                                                                                                                                                                                      
Notice: Upgrading -- do not interrupt ...                                                                                                                                                                                                                     
/etc/puppetlabs/code/environments/production/modules                                                                                                                                                                                                          
└── puppetlabs-apt (v9.0.2 -> v9.1.0)  
[~]: puppetreload 
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Error: Could not autoload puppet/provider/apt_key/apt_key: /opt/puppetlabs/puppet/cache/lib/puppet/provider/apt_key/apt_key.rb:100: syntax error, unexpected ']'
...   key_long: fingerprint[-16..], # last 16 characters of fin...
@kenyon
Copy link

kenyon commented Nov 8, 2023

This is due to the Ruby version being too old. This version of the module doesn't support Puppet 6 anymore. Same as puppetlabs/puppetlabs-vcsrepo#624.

@aqueos
Copy link
Author

aqueos commented Mar 28, 2024

Thanks for your answer.

I wonder why puppet module upgrade it then, is there not a mean to specify which version of puppet the module suport ?

best regards,
Ghislain.

@kenyon
Copy link

kenyon commented Mar 29, 2024

Supported Puppet versions are listed in the metadata, but it is not enforced:

"requirements": [
{
"name": "puppet",
"version_requirement": ">= 7.0.0 < 9.0.0"
}
],

@aqueos
Copy link
Author

aqueos commented Apr 5, 2024

oh ok, so it is a bug/missing feature of puppet core then, thanks a lot !

best regards,
Ghislain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants