-
-
Notifications
You must be signed in to change notification settings - Fork 586
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
Critical global configuration misbehavior: Accidental switching between ~/.ddev and ~/.config/ddev #6234
Comments
I can't reproduce it on WSL2/Linux. Tried it with tb-wsl-12 and Arch-based Linux.
It's XDG_CONFIG_HOME, maybe you mixed up the config? Or there is something wrong with ddev/pkg/globalconfig/global_config.go Lines 606 to 616 in 5b0e640
|
No, there were no XDG variables involved here. But this was with mutagen enabled. I'll continue chasing this and the followup problem with mutagen deleting all files in project. |
What's going on here during certain situations where the MUTAGEN_DATA_DIRECTORY is moved from ~/.ddev-mutagen-data-directory to
I think we can mostly fix this by making sure that we stop mutagen sessions that may be running with a different MUTAGEN_DATA_DIRECTORY. This can be the case when we're moving our home using XDG_CONFIG_HOME, or it can be the case when moving to or from ~/.ddev or when changing the mutagen data directory from ~/.ddev-mutagen-data-directory to ~/.ddev/.mdd. The most catastrophic demonstration of this, which I've succeeded in reproducing a few times but not predictably, is where mutagen is running (with old session storage location) and a new version of DDEV is started. The new version finds that there isn't a mutagen session that matches, so it deletes and recreates the docker volume (which the other mutagen session is using), and then the other mutagen session copies the (empty) volume into the host filesystem. We do not want this to happen! |
I asked this of @xenoscopic in Mutagen Slack:
|
Hey @rfay, I'd probably add a list of legacy Mutagen data directory paths to DDEV that it iterates through at startup and (if a particular legacy directory exists) does a |
Thanks @xenoscopic - I'm essentially doing that strategy in https://github.com/ddev/ddev/pull/6239/files#diff-aea6a89b795b57caf90baa273b3363cd603dd42f110e773c7b2a245fbdd4d61eR112-R130 The difference is I was doing a |
Expected Behavior
The default directory should be ~/.ddev in the absence of XDG_CONFIG_HOME
On WSL2/Linux:
With mutagen enabled in the project,
If I remove all config,
rm -r ~/.ddev ~/.config/ddev
and thenddev start
If I then
ddev stop
The text was updated successfully, but these errors were encountered: