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

(PDK-809) Exit early if the module is not PDK compatible #506

Merged
merged 1 commit into from
May 16, 2018

Conversation

rodjek
Copy link
Contributor

@rodjek rodjek commented May 11, 2018

The current behaviour if you run pdk validate or pdk test unit on a module that hasn't been converted to be PDK compatible is to display a warning and attempt to continue anyway.

semirhage :0: pdk/foo (git:master → origin ↑10 ?:1!)$ ../bin/pdk validate
pdk (WARN): This module is not PDK compatible. Run `pdk convert` to make it compatible with your version of PDK.
pdk (INFO): Running all available validators...
pdk (INFO): Using Ruby 2.4.4
pdk (INFO): Using Puppet 5.5.1
[✔] Resolving default Gemfile dependencies.
[✔] Checking metadata syntax (metadata.json tasks/*.json).
[✔] Checking module metadata style (metadata.json).
[✔] Checking Ruby code style (**/**.rb).
info: task-metadata-lint: ./: Target does not contain any files to validate (tasks/*.json).
info: puppet-syntax: ./: Target does not contain any files to validate (**/**.pp).
info: puppet-lint: ./: Target does not contain any files to validate (**/*.pp).

With this change, the PDK will instead display the message and exit early.

semirhage :0: pdk/foo (git:pdk-809 U:2 ?:1!)$ ../bin/pdk validate
pdk (ERROR): This module is not PDK compatible. Run `pdk convert` to make it compatible with your version of PDK.

@coveralls
Copy link

coveralls commented May 11, 2018

Coverage Status

Coverage decreased (-0.003%) to 92.844% when pulling 6fecd34 on rodjek:pdk-809 into 69f4332 on puppetlabs:master.

@bmjen bmjen merged commit 1c719d9 into puppetlabs:master May 16, 2018
@scotje scotje added the feature label May 16, 2018
@rodjek rodjek deleted the pdk-809 branch November 26, 2018 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants