(PUP-7582) Error on virtual and exported classes#8346
Merged
GabrielNagy merged 1 commit intopuppetlabs:mainfrom Oct 6, 2020
Merged
(PUP-7582) Error on virtual and exported classes#8346GabrielNagy merged 1 commit intopuppetlabs:mainfrom
GabrielNagy merged 1 commit intopuppetlabs:mainfrom
Conversation
Contributor
Author
|
jenkins please test this with servertests |
Contributor
Author
|
Travis is failing due to a facter detecting travis as AWS due to puppetlabs/facter#2095 Acceptance is failing due to #8340, which is also blocked on the facter issue |
|
CLA signed by all contributors. |
Previously puppet would warn or error if it encountered a virtual
class (indicated by `@class`) or an exported class (indicated by `@@class`)
based on the `Puppet[:strict]` setting. By default, puppet would warn, yet
include resources from the virtual class in the catalog. So the resources in the
virtual class weren't virtual! Also note, it wasn't possible to turn off the
warning.
This commit makes puppet always error on virtual and exported classes. The
validator_factory_4_0.rb validates static resource expressions, while
runtime3_support validates `create_resources` calls, which can be used to create
resources at runtime, so we need to prevent things like:
create_resources('@Class', {})
The integration tests are removed since we already test for validation errors in
unit tests.
c0cd46f to
0befcf3
Compare
Contributor
Author
|
jenkins please test this with servertests |
GabrielNagy
approved these changes
Oct 6, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously puppet would warn or error if it encountered a virtual
class (indicated by
@class) or an exported class (indicated by@@class)based on the
Puppet[:strict]setting. By default, puppet would warn, yetinclude resources from the virtual class in the catalog. So the resources in the
virtual class weren't virtual! Also note, it wasn't possible to turn off the
warning.
This commit makes puppet always error on virtual and exported classes. The
validator_factory_4_0.rb validates static resource expressions, while
runtime3_support validates
create_resourcescalls, which can be used to createresources at runtime, so we need to prevent things like:
The integration tests are removed since we already test for validation errors in
unit tests.