-
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
(Initial investigation) PR #1161 breaks all controlrepos that use control_branch
#1173
Labels
Comments
Thanks Dylan, we're taking a look! |
justinstoller
added a commit
to justinstoller/r10k
that referenced
this issue
Jun 25, 2021
…le types In 1ff9995, we moved the setting of the `default_branch_override` from all module declarations that were Hashes (ie, not Puppetfile declared Forge modules) to all modules. This broke Forge modules for users who pass the `default_branch_override` flag. It should be noted that code-wise, users who set the `default_branch_override` flag when deploying YAML based environments (which always use Hash based module declarations) or had SVN modules in their Puppetfile (also Hash based) would have failed. However, those scenarios are either not supported (in the case of YAML based envs) or essentially unused (in the case of SVN). Other options to fix this regretion include: * Have the caller of Module.new first determine if the module will be a Git module and then conditionally add the option, or * Have the caller of Module.new set the default_branch_override after creating the module, if the module responds to the setter Both of these options involve the caller having to introspect enough about the type of module being created that it destroys what value we get from the Module.new facade. Consequently, this patch takes the approach to loosen Module argument strictness, allowing potentially unused options to passed to any module.
justinstoller
added a commit
to justinstoller/r10k
that referenced
this issue
Jun 25, 2021
…le types In 1ff9995, we moved the setting of the `default_branch_override` from all module declarations that were Hashes (ie, not Puppetfile declared Forge modules) to all modules. This broke Forge modules for users who pass the `default_branch_override` flag. It should be noted that code-wise, users who set the `default_branch_override` flag when deploying YAML based environments (which always use Hash based module declarations) or had SVN modules in their Puppetfile (also Hash based) would have failed. However, those scenarios are either not supported (in the case of YAML based envs) or essentially unused (in the case of SVN). Other options to fix this regretion include: * Have the caller of Module.new first determine if the module will be a Git module and then conditionally add the option, or * Have the caller of Module.new set the default_branch_override after creating the module, if the module responds to the setter Both of these options involve the caller having to introspect enough about the type of module being created that it destroys what value we get from the Module.new facade. Consequently, this patch takes the approach to loosen Module argument strictness, allowing potentially unused options to passed to any module.
mwaggett
added a commit
that referenced
this issue
Jun 25, 2021
(#1173) Allow default_branch_override argument for all module types
The fix for this has been merged and released as 3.9.3. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As of the current version the R10K::Puppetfile#add_module method does the following which was introduced in #1161 :
This means that all module classes will have the
:default_branch_override
argument set if theR10K::Puppetfile#load
was called with a non-nildefault_branch_override
. The:default_branch_override
option is file forR10K::Module::Git
modules but not for `R10K::Module::Forge for example and leats to deployment errors such as:Steps to Reproduce
I won't have time to do a replication case but I suspect any Puppetfile that contains something like this will cause it:
Environment
PE 2021.2.0
Additional Context
This is in a released version of PE and will affect a great many customers. Let's get onto this ASAP
The text was updated successfully, but these errors were encountered: