8000 Support multiple base configs by lebauce · Pull Request #3029 · ansible/molecule · GitHub
[go: up one dir, main page]

Skip to content

Support multiple base configs - #3029

Merged
ssbarnea merged 1 commit into
ansible:masterfrom
lebauce:multiple-base-configs
Jan 7, 2021
Merged

ssbarnea merged 1 commit into
ansible:masterfrom
lebauce:multiple-base-configs

Conversation

@lebauce
@lebauce lebauce commented Jan 7, 2021
Copy link
Copy Markdown
Contributor

Allow specifing the --base-config option multiple times.
The base-config option is really useful to avoid duplication but, in a complicated setup,
we often end up having multiple base-config files with a lot of duplication between these files.

PR Type

  • Feature Pull Request

@lebauce
lebauce force-pushed the multiple-base-configs branch from 8e32532 to 3a8b399 Compare January 7, 2021 14:06
@decentral1se decentral1se left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation looks legit.

I don't even want to know why you need multiple base configs 🏃‍♂️

@tadeboro tadeboro left a comment •
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also have a quite complex setup and would probably benefit from this change.

That being said, there is one area that definitely needs improvement in this PR: documenting each base config file's priority. Right now, help text only states that we can use multiple base config files, but it does not specify what happens if two of them contain the same configuration options with different values. Reading through the implementation, the last one wins, but I do not know enough about click to be certain if argument parsing preserves the order of options.

I added one comment about the default value that needs to be resolved before merging.

Comment thread 8000 src/molecule/shell.py Resolved
@lebauce
lebauce force-pushed the multiple-base-configs branch from 3a8b399 to 755a0c2 Compare January 7, 2021 15:10
@lebauce
lebauce force-pushed the multiple-base-configs branch from 755a0c2 to f5b74ba Compare January 7, 2021 15:23
@ssbarnea
ssbarnea requested a review from tadeboro January 7, 2021 15:49
@lebauce
lebauce commented Jan 7, 2021
Copy link
Copy Markdown
Contributor Author

@tadeboro The argument parsing preserves the order of options. Regarding the documentation, I tried to improve it but I'm far from being even a medium technical writer so please check if it makes any sense :-)

@tadeboro tadeboro left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @lebauce, for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0