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

Update documentation and --help output to properly indicate supported puppet gem version format #1320

Open
isaiahfrantz opened this issue Feb 15, 2024 · 0 comments
Labels
bug needs-triage Newly created issue that has not been reviewed by a PDK contributor

Comments

@isaiahfrantz
Copy link

isaiahfrantz commented Feb 15, 2024

Describe the bug
The pdk docs (in many locations but 2 are below) indicate that you can provide a full puppet version but it appears that you only support the latest minor release of each major release.
https://www.puppet.com/docs/pdk/3.x/pdk_reference#pdk-validate-command
https://www.puppet.com/docs/pdk/3.x/pdk_testing#validate-a-module

This error message is misleading, causing people to waste time trying to determine what the issue is:

❯ pdk validate --puppet-version=7.24.0
pdk (ERROR): Unable to find a Puppet gem matching ~> 7.24.0.

I finally found out from folks on the puppet testing slack channel that pdk only supports the major:

❯ pdk validate --puppet-version=7
pdk (INFO): Using Ruby 2.7.8
pdk (INFO): Using Puppet 7.27.0
pdk (INFO): Running all available validators...

This uses to work as expected with pdk v1.x, (ie you could get and test against any version of puppet that there was a gem for). I have been running into this error since v2 came out, as have other people considering the results from a google search.

In addition to fixing the docs to clearly indicate that you can only ask for --puppet-version=7 or --puppet-version=8, please change the error from:

pdk (ERROR): Unable to find a Puppet gem matching ~> 7.24.0.

to something immediately meaningful to the developer, like:

pdk (ERROR): We only support testing against the latest minor release for each major Puppet gem release, please try %{requirement.split('.').first} instead.
@isaiahfrantz isaiahfrantz added bug needs-triage Newly created issue that has not been reviewed by a PDK contributor labels Feb 15, 2024
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

1 participant