-
-
Notifications
You must be signed in to change notification settings - Fork 616
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
ddev debug migrate-database mariadb:10.11
altered config.yaml
more than needed
#6847
Comments
Can you be more specific about what changed please? (Note that I imagine you're seeing a general bug with use of |
In this particular project, I only had https://github.com/hanoii/ddev-pimp-my-shell/blob/f8edb376716397863bd21dbfa2644895b2866b6d/config.pimp-my-shell.yaml, and all of that appeared on the main |
I am surprised. Thanks. |
I can reproduce this with your exact case. The reason is that we use GetActiveApp() in
That's the full Then we naively write the config back in ddev/cmd/ddev/cmd/debug-migrate-database.go Lines 66 to 68 in 66c3033
And what writes the whole thing. I'm not sure what the exact fix is, but in this particular case we could do |
Is there a mechanism to identify which config file contains a given setting? |
No, I don't think so. app.ReadConfig has the Lines 314 to 338 in 7a0c06c
It would be a bit of a violation for DDEV to touch a |
I think this is OK, isn't this the same that
I think that this is also currently the case: assume a mariadb of 10.4 on config.yaml, and a mariadb of 10.6 on config.db.yaml, running
Agreed, and the same reasoning should apply the other way around, it shouldn't care of what config.*.yaml does. So, if a config.something.yaml set a specific db (which I think should be very very rare), then there should be a reason for doing so even though the migration will be attempted, the config.something.yaml will continue to leave the db as it expects it to. At that case is up for the user to decide what to do. Anything further I think is overcomplicating things. We could, if it's possible, process all config.*.yaml files independently in the same way we are doing now (without the main config.yaml( and then check to see if a db is being set, and warn accordingly. But I think it's too much for a debug command. |
It would probably be legit for |
Perhaps if the database isn't in the main config file there could be a message output to the terminal that no change was made. |
I ran this command for the first time ever:
ddev debug migrate-database mariadb:10.11
All went fine but then I noticed the changed
config.yaml
had more than it should.It basically brought in all changes by the add-ons present in the project, so the updated
config.yaml
was the merged result of all config.*.yaml present on this project.Expected Behavior
Only mariadb should change, along with maybe what
ddev config --auto
orddev config --update
does, but definitely not altering it based on other config.*.yaml files.The text was updated successfully, but these errors were encountered: