Open rnelson0 opened 5 years ago
Did you have any ideas on how you wanted to implement this?
I was thinking of adding dev_only
syntax to allow us to mark a dependency as a development dependency in the Puppetfile.
mod 'puppetlabs/cron_core', dev_only: true
mod 'nwops/debug, dev_only: true, git: 'https://github.com/nwops/puppet-debug'
We could create these dev dependencies in a separate file and join them programmatically during parsing.
How about test_only
? Either way, I'm okay with it as long as it doesn't conflict with r10k or librarian-puppet's processing of the Puppetfile. However, I don't work on those projects so wouldn't be able to ensure they respect the settings properly in the long term (i.e. I think you could add the flag now without interruption, but r10k would still end up deploying it until r10k was patched)
Are you suggesting we add this kind of feature to r10k, librarian too?
If it goes in the Puppetfile
, we'd have to get them to support the functionality, or they'd download the modules we only want to be downloaded for tests.
Other alternatives would be
mod
to the Puppetfile, like mod_test_only 'puppetlabs/cron_core'
(not sure if that would cause errors in r10k/lp, we just need it to ignore it).generate-puppetfile.yml
with the test-only fixturesI think a local yml file is the most persistent with the least amount of changes overall.
With puppet5 now deprecated is this even necessary? Puppet6 is the earliest version you can test. Might be useable backlog for future releases like puppet 7 or puppet 8 specifics but not sure if more important than other issues?
Puppet 6 moved some once-core modules to separate repos. The puppet-agent typically provides those modules and they do not need to be listed in the
Puppetfile
(unless specifying a different version than the agent provides) and should not be listed when there are Puppet 5 agents connecting to the master. However, they need to be in the.fixtures.yml
for testing.We need an option to create the fixtures settings for the core modules. An additional option could add/remove them to/from the
Puppetfile
.We must also consider the case where the
Puppetfile
specifies a subset of those modules, but not all, and ensure that the resulting fixtures specifies thePuppetfile
version, not the default/latest versions.