-
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) Do not use visitors to synchronize modules #1161
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1ff9995
(maint) Force Module.new to take a Hash of args
justinstoller 06271da
(maint) Deprecate the usage of Module#sync options
justinstoller 48cb15b
(maint) Consolidate module sync logging
justinstoller dd7f8ff
(maint) Move control branch warning to git module init
justinstoller 1901284
(maint) Allow modules to decide if they should sync
justinstoller 654f5c2
(maint) Move type generation for `depoy module` to #visit_environment
justinstoller f575902
(maint) Remove visit_module usage
justinstoller c32abfd
(maint) Document Action#initialize parameters
justinstoller cae6022
(maint) will_sync -> should_sync
justinstoller 609ea04
(maint) Update Environment::WithModules#add_modules docs
justinstoller dbc1242
(maint) Use "Deploying" in module sync logging
justinstoller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 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 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,14 +44,14 @@ def initialize(name, basedir, dirname, options = {}) | |
@dirname = dirname | ||
@options = options | ||
@puppetfile_name = options.delete(:puppetfile_name) | ||
@overrides = options.delete(:overrides) | ||
@overrides = options.delete(:overrides) || {} | ||
|
||
@full_path = File.join(@basedir, @dirname) | ||
@path = Pathname.new(File.join(@basedir, @dirname)) | ||
|
||
@puppetfile = R10K::Puppetfile.new(@full_path, | ||
{overrides: @options[:overrides], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was a bug that was uncaught earlier, but exposed with the additional testing that comes from attempting to actually use this data at the Module level. It accidentally got rolled into a refactor commit but I'm happy to break it out if that would be better. |
||
force: @options.dig(:overrides, :modules, :force), | ||
{overrides: @overrides, | ||
force: @overrides.dig(:modules, :force), | ||
puppetfile_name: @puppetfile_name}) | ||
@puppetfile.environment = self | ||
end | ||
|
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 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 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
Oops, something went wrong.
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.
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.
This was a bug in that was exposed with further functional testing.
@argv
here acts like an array but is actually a CRI::ArgumentList that includes the Enumerable module. This causes problems with logging that callsinspect
on the value. This change was accidentally rolled into another refactor, but I can break it out if that's best.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.
Might be good to add a docs comment to this method indicating the type as it comes in?