-
Notifications
You must be signed in to change notification settings - Fork 585
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
Check for .kitchen.yml before creating .kitchen #1026
Comments
There are a couple things here. First, we assume you want to run the Example: http://kitchen.ci/docs/getting-started/running-verify On the other hand, i wrote a wrapper in Emacs to do this: https://github.com/jjasghar/test-kitchen-el I don't think this will be fixed. |
So whats the benefit of creating the .kitchen working directory if no .kitchen.yml exists? |
It's where it dumps the logs for |
Right, but if there was no YML there was literally nothing for kitchen to do right? So it doesn't need that working directory in that case? |
Then why are you running |
OK, but if I run it in the wrong directory by mistake, blowing up with "No .kitchen.yml" is fine, I just don't understand why test-kitchen needs to leave behind a .kitchen directory for me to remove. |
Ah i get it now. If you'd like to put in a PR to fix this that would be awesome, otherwise I think we have other priorities at this time. Thanks for the report though! |
@robertlabrie while the most common location for a .kitchen.yml is in the root of the project dir, you can actually point to it (or a kitchen.local.yml) via environmental variable which can change the requirement for where the physical .kitchen.yml is. So, as JJ said, a PR would be great but it's unlikely to be a high priority for us. |
Also we don't autoremove the .kitchen because you could have other instances that were converged prior in the folder that'd you'd want the state of in case had KITCHEN_YAML set to something other than default inadvertently and didn't want to lose that state information. |
Test Kitchen's default log configuration writes to
Autoremoving would Be Bad, as @cheeseplus said. Not logging would, I think, also Be Bad. |
Thanks for pointing this out @robbkidd somehow I'd totally overlooked that is where we store logs and as such I am entirely in agreement - autoremoving is risky but not logging is way worse. Given the ubiquity in CI pipelines this is indeed the ideal behaviour in the case of needing to troubleshoot, as such I'm closing this one as designed. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Check for .kitchen.yml before creating .kitchen. I'm used to being able to run rubocop and foodcritic from wherever in the tree, I can't with testkitchen (fine) and it blows up with the missing .kitchen.yml (fine) but after all that I still have to rm -rf .kitchen because it creates one. Would be nice if that wasn't the case.
Kitchen Version
Tell us which version of test-kitchen you are using (
kitchen --version
).ChefDK Version
If you are running test-kitchen via ChefDK,
chef --version
will provide additional relevent version details.Ruby Version
If you are not using test-kitchen via ChefDK, please provide the output of ruby --version.
Platform Version
MacOSX some cat or mountain or park or somesuch. I didn't pick this computer.
Replication Case
run
kitchen converge
in a directory without a .kitchen.yml fileKitchen Output
The relevant output of the test-kitchen run or a link to a gist of the entire run, if there is one.
The debug output (kitchen -l debug) may be useful, but please link to a gist, or truncate it.
Please do not paste the full run out put here. If the full output would be useful, link to it in a gist.
NOTE:
This repository is for core issues with the Test-Kitchen framework, so if the issue is with a plugin you may be referred to file the issue with the appropriate plugin.
The text was updated successfully, but these errors were encountered: