-
-
Notifications
You must be signed in to change notification settings - Fork 580
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
Provide feature flag for overriding config.*.yaml instead of merging #4100
Comments
I would really appreciate this feature! Let me describe our current issue. We run a drupal application that uses language negotiation based on the hostname. A big advantage of DDEV was that you could run different feature branches of a project in parallel. Just do another checkout and provide a config.local.yaml like this:
or
If you now start such a feature branch you break the ddev-router because the additional hostnames from config.yaml get applied and lead to dupplicates and errors. |
This seems like a great approach! Thanks for the good thinking. |
I'd love it if you could all review and test the PR for this, #4118 (comment) |
I did not yet test the pull request, but the per file override is really nifty. Do I understand correctly that in order to override some settings set to a non-nil value in an "earlier" config.yaml one has to add override_config: true to the file in order to eg disable mutagen? And that this would also be asymmetrical because one could use a merge (override_config: false) to override nil values from such an earlier config.yaml? |
@oliverhabara can you please test this on our use case? Thanks |
@HeineDeelstra overriding any non-nil value would require a
I hope that answers your question. I pretty much hope that people don't put |
I find the requirement for override_config: true to set scalar config to nil, but not to a non-nil value rather surprising. I would naively expect the default merge to:
|
@HeineDeelstra I understand why you would expect the default merge (v1.20.0) would not be what it is, but this is discussed in #4079
You can see examples of expectations behavior in https://github.com/drud/ddev/tree/master/pkg/ddevapp/testdata/TestConfigMerge This PR adds a "fulloverride" section which shows the behavior with override_config. I do hope you'll try out the PR (you don't mention that you tried it). You can easily experiment with various values and files; just |
Is there an existing issue for this?
Is your feature request related to a problem? Please describe
In our setup, we're overriding hooks with a limited set when we're running certain operations - e.g. we're not installing drupal. Since #3983 changes behaviour, we're no longer able to do it.
Describe the solution you'd like
I would like to set up a (project) flag in
config.*.yaml
file that would indicate if I want to merge multiple config files or if those should be overriden.Describe alternatives you've considered
One alternative would be to use
yq
or similar scripting solution, requiring additional tooling on the server and user machines.Additional context
No response
The text was updated successfully, but these errors were encountered: