-
Notifications
You must be signed in to change notification settings - Fork 583
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
Base provisioner refactoring #298
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This work should lead directly to a refactoring of `Kitchen::Provisioner::Base` with logic from `Kitchen::Provisioner::ChefBase`.
This commit changes the behavior of `Provisioner#create_sandbox` in that it no longer returns the created sandbox path. Now the expected calling behavior is to call `Provisioner#create_sandbox` and then refer to the sandbox path with `Provisioner#sandbox_path`. This allows `#create_sandbox` to make use of calls to super in a clean way and to decouple the command and query nature of this method.
This is a declarative way, similar to declaring default_config, to have certain config values be path expanded. This helps when debugging using `kitchen diganose` and leaves local paths unambiguous as to the source location. In general, all local config-related paths and files should be path expanded.
fnichol
referenced
this pull request
Dec 20, 2013
Thanks to @juliandunn for the catch :)
BrentOnRails
pushed a commit
to BrentOnRails/test-kitchen
that referenced
this pull request
Jul 17, 2017
Don't try to set tags if there aren't any.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is largely an internal refactoring of the Provisioner API, internal and external (which is not yet considered stable). There are several high level changes:
#calculate_path
method is extracted toKitchen::Provisioner::Base
#create_sandbox
&#cleanup_sandbox
are extracted toKitchen::Provisioner::Base
. Now#create_sandbox
can be better chained with super calls and no longer returns the sandbox path. A new method#sandbox_path
must be used instead in Driver code.expand_path_for
is added toKitchen::Provisioner::Base
so that Provisioner authors can direct local path and file config values to be path expanded. This greatly helps with debugging and diagnostics.Kitchen::Provisioner::Base
back into the newly mergedKitchen::Provisioner::Shell
provisioner, thanks to @ChrisLundquist.