-
Notifications
You must be signed in to change notification settings - Fork 396
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
Check if site can bootstrap before running updb in drupal:update #3821
Conversation
We would like to see this as well, but... can there be an option to run the install on sites that don’t have a successful bootstrap? (New multisite and database added to code base) |
Thanks a lot for the PR. I like the overall approach here (checking if a site is installed before running updates on it), but in terms of the implementation, I'd prefer if I think the What do you think? |
That makes sense but there are two other commands invoked in The |
Ah, just noticed the Sounds like from #3827 discussion it only works for the default site though. Is that true even if the site context is changed? Like right after: https://github.com/acquia/blt/blob/10.x/src/Robo/Commands/Deploy/DeployCommand.php#L743 |
That's a good question, I don't know off the top of my head whether it will change site contexts automatically. But I agree that using the inspector method (although it might require some modifications to work with non-default sites) would be the best approach. |
I confirmed that
It seems like you've got the chops to do this, but if you want help or don't have the bandwidth let me know. |
I'll give it a shot. Do you prefer I reset this branch, revert the previous commit or just close in favor of another PR? |
Closing in favor of #3831 |
Fixes #3277
Changes proposed
This change checks to see if the site can bootstrap via
drush status
(similarly to https://github.com/acquia/blt/blob/10.x/src/Robo/Commands/Doctor/DrupalCheck.php#L51) before runningdrush updb
in thedrupal:update
BLT command. If the site cannot bootstrap, it logs a warning but continues to attempt database updates on other multisites.Steps to replicate the issue
The steps originally outlined in #3277 suffice but locally you can replicate this by:
blt auda
Previous (bad) behavior, before applying PR
The previous behavior would cause the
blt auda
command to fail on a.com. This actually has potentially serious consequences like leaving b.com or any number of other multisites in a wonky state during AC deployments.Expected behavior, after applying PR and re-running test steps
The
blt auda
command logs a warning, skips running database updates on a.com and proceeds to b.com.Additional details
Maybe this should be an opt-in feature via configuration?
Any feedback would be greatly appreciated. Thanks.