-
Notifications
You must be signed in to change notification settings - Fork 352
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
(maint) Pass the appropriate Puppetfile path to module loader #1203
(maint) Pass the appropriate Puppetfile path to module loader #1203
Conversation
9729808
to
8b9830c
Compare
This commit moves the Puppetfile logging to the `R10K::ModuleLoader::Puppetfile` since that is what does the actual loading.
8b9830c
to
7880c0c
Compare
This should be good to go now. |
This passed for me locally. |
well.. some iteration of it lol 👀 |
1eef305
to
8d37831
Compare
okay that should be better 😅 |
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 this looks alright, but Justin has more context.
44cd72b
to
b79efdf
Compare
Do you want to add a unit test for the puppetfile spec that passing |
b79efdf
to
6de38b1
Compare
@justinstoller tests added 😊 |
6de38b1
to
ac97fc5
Compare
Previously, we always passed the `puppetfile_name` from the `R10K::Puppetfile` class to `R10K::ModuleLoader::Puppetfile`. That was an attempt to fix a bug where relative Puppetfile paths were not getting resolved correctly by the module loader (puppetlabs@9082511). That, however, unearthed another bug: when instantiating a new instance of `R10K::Puppetfile` with the `puppetfile_path` option, that path would get completely ignored in favor of the default `puppetfile_name` value. This broke usage of the `r10k puppetfile purge` command. This commit ensures that we pass the appropriate Puppetfile path to the module loader - we pass the `puppetfile_path` if it exists, otherwise we pass the `puppetfile_name`. In order to maintain the fix for the original bug around relative Puppetfile paths, we no longer attempt to resolve the `puppetfile_path` in the `R10K::Puppetfile` class, since `R10K::ModuleLoader::Puppetfile` already handles that resolution.
Previously, we were using the remote version of the Puppetfile to test the `r10k puppetfile purge` command. This commit updates the test to use the deployed version of the Puppetfile, which is what a user would actually use.
ac97fc5
to
7cd14c0
Compare
see individual commit messages for details