Skip to content
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

Support multiple base configs #3029

Merged
merged 1 commit into from Jan 7, 2021

Conversation

lebauce
Copy link
Contributor

@lebauce lebauce commented Jan 7, 2021

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

Copy link
Contributor

@decentral1se decentral1se left a comment

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 🏃‍♂️

Copy link
Contributor

@tadeboro tadeboro left a comment

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.

src/molecule/shell.py Outdated Show resolved Hide resolved
@ssbarnea ssbarnea requested a review from tadeboro January 7, 2021 15:49
@lebauce
Copy link
Contributor Author

lebauce commented Jan 7, 2021

@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 :-)

Copy link
Contributor

@tadeboro tadeboro left a comment

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.

None yet

4 participants