diff --git a/drupal-contrib/scripts/test-issue-branches.sh b/drupal-contrib/scripts/test-issue-branches.sh index 56c56c1..2fb2b19 100755 --- a/drupal-contrib/scripts/test-issue-branches.sh +++ b/drupal-contrib/scripts/test-issue-branches.sh @@ -155,6 +155,9 @@ for SPEC in "${TESTS[@]}"; do continue fi + # A web request during `drush si` can cache a half-installed container. + ddev drush cr 2>&1 | tail -2 + log "Enabling $PROJECT..." if ! ddev drush en "$PROJECT" -y 2>&1; then log "WARNING: could not enable $PROJECT (may need manual enable)" diff --git a/drupal-contrib/template.tf b/drupal-contrib/template.tf index 0b7948e..bcdfc8e 100644 --- a/drupal-contrib/template.tf +++ b/drupal-contrib/template.tf @@ -873,6 +873,10 @@ COMPOSE_EOF fi if [ "$SETUP_FAILED" = "false" ]; then + # A healthcheck request during `drush si` can cache a half-installed + # container, which breaks the next `drush en`. + ddev drush cr >> "$SETUP_LOG" 2>&1 || true + # Enable the module or theme. # ddev drush en can exit non-zero even when the module ends up enabled # (e.g. a post-install hook in another module throws a fatal), so verify