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

nil basedir when instantiating R10K::Puppetfile #214

Closed
mwaggett opened this issue Jul 22, 2021 · 1 comment
Closed

nil basedir when instantiating R10K::Puppetfile #214

mwaggett opened this issue Jul 22, 2021 · 1 comment

Comments

@mwaggett
Copy link

mwaggett commented Jul 22, 2021

A recent update to r10k started causing TypeErrors when using kitchen-puppet (see puppetlabs/r10k#1188).

This is because you explicitly instantiate R10K::Puppetfile with a nil basedir: https://github.com/neillturner/kitchen-puppet/blob/master/lib/kitchen/provisioner/puppet/r10k.rb#L50

While this worked with previous versions of r10k, we have never intentionally/explicitly supported the use of a nil basedir.
In order to fix this issue, we recommend updating the instantiation to one of the following, depending on your needs:

R10K::Puppetfile.new(<basedir>, { moduledir: path, puppetfile_path: puppetfile })

OR

R10K::Puppetfile.new("", { moduledir: path, puppetfile_path: puppetfile })

If path and puppetfile are relative paths, they will be resolved relative to the basedir. If they are absolute paths, basedir should be ignored for your particular use case.

We've deprecated some params, as seen here: https://github.com/puppetlabs/r10k/blob/ded1045f29f99a624c19eae25d96217cd0dee179/lib/r10k/puppetfile.rb#L53-L58
We'll be updating that yardoc to be clearer about how each param is used.

Apologies for the breakage! but I want to make clear that we do not consider the internals of the r10k lib to be public API, so things could potentially 'break' without a major version bump.

@neillturner
Copy link
Owner

fixed hopefully in version 3.60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants