-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add missing paths to allowed module layout #158
Open
seanmil
wants to merge
1
commit into
puppetlabs:master
Choose a base branch
from
seanmil:add_module_paths
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,9 +42,15 @@ already explains what a module is and what it can contain. | |
| `/examples/` | Example Puppet snippets that explain how to use the module. They can be used within acceptance tests | | ||
| `/facts.d/` | [External facts](https://www.puppet.com/docs/puppet/latest/external_facts.html) that are synced via [pluginsync](https://www.puppet.com/docs/puppet/latest/plugins_in_modules.html) | | ||
| `/lib/facter/` | MAY contain custom facts | | ||
| `/lib/puppet/type/` | Custom types | | ||
| `/lib/puppet/provider/` | Custom provider for one or multiple types | | ||
| `/lib/puppet/type/` | Custom Resource types | | ||
| `/lib/puppet/provider/` | Custom provider for one or multiple Resource types | | ||
| `/lib/puppet/functions/` | Modern functions in Ruby for the new API | | ||
| `/lib/puppet/datatypes/` | Custom Puppet Data types | | ||
joshcooper marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| `/lib/puppet/face/` | Custom Puppet Faces | | ||
| `/lib/puppet/feature/` | Custom Puppet Features for providers | | ||
| `/lib/puppet/property/` | Custom Puppet Properties for Types/Providers | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's also There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also |
||
| `/lib/puppet/transport/` | Puppet Device Transports for the Resource API | | ||
| `/lib/puppet/util/network_device` | Puppet Device Transports | | ||
| `/lib/puppet/parser/functions/` | Legacy functions in Ruby | | ||
| `/lib/puppet_x/` | Custom Ruby modules to extend types, providers, functions or facts | | ||
| `/lib/augeas/lenses/` | Custom [Augeas](https://augeas.net/) lenses | | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically, modules can put whatever they want in the
/lib
directory and it will be packaged in the module and pluginsynced to agents. So from an allowlist perspective, listing individual/lib/puppet/*
directories is misleading. But from a "what are the various extension points" perspective, it's informative.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is that something that we should allow here? Do you have anything in mind that isn't already covered by the different
/lib/puppet/
subdirs?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should allow anything under
/lib
since that's how puppet behaves today. For example, there was some early confusion about/lib/puppetx
vs/lib/puppet_x
. And given/lib/augeas
there may be some others?In the future, I think it would be good to document which extension points are allowed in the
/lib
directory and add a deprecation warning to if we detect a dir/file that isn't allowed during pluginsync. Then in a major release, only pluginsync files that are in the allow list.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it's realistic to introduce the warnings in Puppet 8 or maybe with Puppet 9.0?