-
-
Notifications
You must be signed in to change notification settings - Fork 582
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
fix: do not remove mounted files directory, fixes #6188 #6199
Conversation
Download the artifacts for this pull request:
See Testing a PR. |
1c22d43
to
40e5161
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me!
Not related to this PR, but:
Use otiai10/copy to do the copying instead of fileutil.CopyDir (which requires the target directory not to exist)
I'm not sure, but maybe we can use a wrapper for otiai10/copy
in fileutil
because it's not always obvious in the code why it's used, and if we wrap it, we don't need to do an import for that library in many places.
otiai10/copy is so much better than the ancient home-grown one we use in general. I just haven't been willing to disrupt so much code by replacing the old one. It would be reasonable to do that with a wrapper. |
Yes, I meant not to replace |
I think otaia10/copy may even have an option in its options for that, so we could do that cleanly. It think it might be better to just disrupt everything and get rid of the current behavior (requiring deleted directory) |
The Issue
upload_dirs
do not have any files in them inside container, when using mutagen after addev pull pantheon
orddev import-files
#6188It turns out that with mutagen enabled, all of our import-files and
ddev pull
actions will fail because the host-side target files directory gets removed during the import process.When mutagen is enabled, then each of the
upload_dirs
are bind-mounted from the host. In this situation, the existing code removes the host-side directory, breaking the bind-mount because the host source dir has been removed.ddev restart
fixes everything, but that's just a workaround.How This PR Solves The Issue
Manual Testing Instructions
With a Drupal (and all other CMS) directory, and with mutagen enabled,
ddev import-files --src=<tarball>
and verify that the files get loaded into the target directorySame with
ddev pull <anything>
Automated Testing Overview
Related Issue Link(s)
Release/Deployment Notes