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

Impossible to update from version 3.3.0 #1423

Open
philippeganz opened this issue Dec 4, 2024 · 3 comments
Open

Impossible to update from version 3.3.0 #1423

philippeganz opened this issue Dec 4, 2024 · 3 comments
Labels
bug needs-triage Newly created issue that has not been reviewed by a PDK contributor

Comments

@philippeganz
Copy link

Describe the bug
I'm using a module running on pdk version 3.3.0. I tried to update to version 3.4.0 but it failed with following stack trace :

$ pdk update
/opt/puppetlabs/pdk/private/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/pdk-3.4.0/lib/pdk/template/template_dir.rb:39:in `initialize': Could not find a compatible template renderer for /opt/puppetlabs/pdk/share/cache/pdk-templates.git (RuntimeError)
	from /opt/puppetlabs/pdk/private/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/pdk-3.4.0/lib/pdk/template/template_dir.rb:12:in `new'
	from /opt/puppetlabs/pdk/private/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/pdk-3.4.0/lib/pdk/template/template_dir.rb:12:in `instance'
	from /opt/puppetlabs/pdk/private/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/pdk-3.4.0/lib/pdk/template.rb:44:in `block in with'
	from /opt/puppetlabs/pdk/private/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/pdk-3.4.0/lib/pdk/template/fetcher.rb:45:in `with'
	from /opt/puppetlabs/pdk/private/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/pdk-3.4.0/lib/pdk/template.rb:43:in `with'
	from /opt/puppetlabs/pdk/private/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/pdk-3.4.0/lib/pdk/module/convert.rb:137:in `stage_changes!'
	from /opt/puppetlabs/pdk/private/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/pdk-3.4.0/lib/pdk/module/update.rb:11:in `run'
	from /opt/puppetlabs/pdk/private/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/pdk-3.4.0/lib/pdk/cli/update.rb:45:in `block (2 levels) in <module:CLI>'
	from /opt/puppetlabs/pdk/private/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/cri-2.15.12/lib/cri/command.rb:362:in `run_this'
	from /opt/puppetlabs/pdk/private/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/cri-2.15.12/lib/cri/command.rb:298:in `run'
	from /opt/puppetlabs/pdk/private/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/cri-2.15.12/lib/cri/command.rb:316:in `run'
	from /opt/puppetlabs/pdk/private/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/pdk-3.4.0/lib/pdk/cli.rb:58:in `run'
	from /opt/puppetlabs/pdk/private/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/pdk-3.4.0/exe/pdk:6:in `<top (required)>'
	from /opt/puppetlabs/pdk/private/ruby/3.2.5/bin/pdk:25:in `load'
	from /opt/puppetlabs/pdk/private/ruby/3.2.5/bin/pdk:25:in `<main>'

To Reproduce
Run pdk update on a pdk version 3.3.0 enabled module.

Expected behavior
The usual list of files that will be modified by pdk update.

Additional context

Also seen on Windows with MSI installer, same Ruby stack trace.

@philippeganz philippeganz added bug needs-triage Newly created issue that has not been reviewed by a PDK contributor labels Dec 4, 2024
@david22swan
Copy link
Member

david22swan commented Dec 5, 2024

There is a known issue with this release where the bundled templates are inaccessible, which we are currently working on. However it was decided to go ahead with the release regardless due to a severe CVE with one of the bundled gems.
It is listed in the known issues document, with a workaround of manually pointing the PDK at a copy of the templates, either the main branch or a tag on Github or a downloaded local copy.

https://www.puppet.com/docs/pdk/3.x/pdk_known_issues

@yorokobi
Copy link

yorokobi commented Dec 5, 2024

The known issue recommends using --template-url with pdk update; unfortunately, pdk update does not recognize that option.

% pdk update --template-url=file:///Users/username/github/pdk-templates --template-ref=3.4.0
update: unrecognised option -- template-url

pdk update --help lists only --force, --noop, --template-ref

@david22swan
Copy link
Member

david22swan commented Dec 5, 2024

@yorokobi Thanks for pointing that out, the correct option in this case would be to either run pdk convert with the added options in order to point the module at the new templates, or to manually change them within the metadata.
Will update the known issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs-triage Newly created issue that has not been reviewed by a PDK contributor
Projects
None yet
Development

No branches or pull requests

3 participants