puppet-generate-puppetfile icon indicating copy to clipboard operation
puppet-generate-puppetfile copied to clipboard

Support Puppet 6

Open rnelson0 opened this issue 7 years ago • 5 comments
trafficstars

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 the Puppetfile version, not the default/latest versions.

rnelson0 avatar Oct 19 '18 21:10 rnelson0

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.

logicminds avatar Jul 15 '20 22:07 logicminds

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)

rnelson0 avatar Jul 16 '20 19:07 rnelson0

Are you suggesting we add this kind of feature to r10k, librarian too?

logicminds avatar Jul 16 '20 20:07 logicminds

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

  • add another type of 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)
  • add some sort of .generate-puppetfile.yml with the test-only fixtures
  • use cli arguments

I think a local yml file is the most persistent with the least amount of changes overall.

rnelson0 avatar Jul 16 '20 20:07 rnelson0

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?

cdenneen avatar Mar 25 '21 20:03 cdenneen