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-1632) Only show validators that are available in the given PDK Context #867

Merged
merged 1 commit into from
Mar 5, 2020

Conversation

glennsarti
Copy link
Contributor

Previously when a validator was created which was not valid in the PDK Context,
for example environment.conf validation in a Puppet Module, the validator would
not be invoked but a message would be logged saying that the validator had no
targets. This is slightly confusing for users.

This commit changes the behaviour so that validators which are not valid in the
current PDK Context (Validator.is_valid_context?) are never run or have any
targets parsed.

This commit also updates the tests for these scenarios.

@glennsarti glennsarti requested a review from a team as a code owner March 3, 2020 08:51
@coveralls
Copy link

coveralls commented Mar 3, 2020

Coverage Status

Coverage increased (+0.007%) to 91.327% when pulling a7fd5ae on glennsarti:ignore-invalid-contexts into d51ce5e on puppetlabs:master.

@glennsarti glennsarti force-pushed the ignore-invalid-contexts branch from 409ea7c to ca7dfa2 Compare March 4, 2020 01:45
@glennsarti glennsarti changed the title {WIP} (PDK-1632) Only show validators that are available in the given PDK Context (PDK-1632) Only show validators that are available in the given PDK Context Mar 4, 2020
…ontext

Previously when a validator was created which was not valid in the PDK Context,
for example environment.conf validation in a Puppet Module, the validator would
not be invoked but a message would be logged saying that the validator had no
targets.  This is slightly confusing for users.

This commit changes the behaviour so that validators which are not valid in the
current PDK Context (Validator.is_valid_context?) are never run or have any
targets parsed.

This commit also updates the tests for these scenarios.
@glennsarti glennsarti force-pushed the ignore-invalid-contexts branch from ca7dfa2 to a7fd5ae Compare March 5, 2020 06:20
@glennsarti
Copy link
Contributor Author

Updated comment in validate_spec.rb as per @rodjek comments in slack. Will merge once CI is green.

@glennsarti glennsarti merged commit 094085b into puppetlabs:master Mar 5, 2020
@scotje scotje added the feature label May 12, 2020
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