Site rename task (using migrate) doesn't delete the original, renamed site, just deploys clone with the new name. I'm sure it already worked fine and fast, and now it is reverted back to using clone task (and forgets to delete?)

CommentFileSizeAuthor
#2 903872.patch1017 bytesmig5

Comments

Anonymous’s picture

The 'deploying over existing site' logic introduced in this commit breaks that functionality (somehow).

Rather than investigate why the conditional logic doesn't ring true, it occurs to me that the new logic there is actually unnecessary: in every case of Migrate, you would *want* to delete the old directory in the post hook like we used to. Whether the site is being migrated or renamed, in both cases the old dir should be removed.

Clone is exempt because it doesn't call the migrate hooks, but its own invocation provision-deploy, so it's still safe.

I think we can remove the 'deploy_replace_site' conditional, but I missed a lot and may not be aware of something else that requires it here, so I'll wait for Vertice to chime in.

Anonymous’s picture

Status: Active » Needs review
StatusFileSize
new1017 bytes

The problem is that the 'deploy_replace_site' logic is for when only the db server is changing. The logic relies on the idea that the platforms are identical. However, platforms *are* identical when simply renaming the site, so the potential for renaming the site and thus the requirement for deleting the old directory, is getting skipped.

Attached patch adds a 'deploy_rename_site' option if we are renaming. The 'deploy_replace_site' is not set if this is the case, allowing the old dir to be removed.

I'm worried if this potentially screws up if we *are* renaming the site and *also* changing the db server though :/

Anonymous’s picture

Status: Needs review » Fixed

Confirmed that Vertice has fixed this in HEAD.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.