Repository navigation
Run database updates before any cache rebuild on TEST/LIVE deploys - #64
Conversation
Deploying ucdcweb2 to TEST failed after a Drupal core upgrade from 11.1 to 11.4: cache-rebuild ran before drush deploy, so the new core code rebuilt its router against the live database's old schema and hit "Unknown column 'alias'". The earlier fix only covered major upgrades, but minor releases change the schema too. drush deploy already runs updatedb before config:import and cache:rebuild, so drop the cache-rebuild in front of it, the pre-deploy env:clear-cache (which fails the same way after a stalled deploy), and the major-version detection that only existed to work around them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
see comments here https://github.com/UCEAP/.github-private/wiki/Developer-Meeting-Agenda-2026-11-12#deployment-change and think REAL HARD about them before merging |
|
Reviewed the concerns from the 2026-11-12 dev meeting notes against Drush 13.6 / Drupal core 11.4 source:
Remaining difference: discovery/plugin caches aren't flushed before Dropping the Next check: a normal (sync) Deploy to TEST on ucdcweb2 once the image publishes. LIVE is still on 11.1, so that run reproduces the original failure. 🤖 Generated with Claude Code |
The image build looked up the latest atuin and gh release assets through api.github.com without authentication. Shared CI runners regularly hit its rate limit, so jq got an error object instead of a release, curl got no URL, and the build failed (scheduled run 45119517088, and the arm64 leg of 45480383545 after merging #64). atuin now downloads from releases/latest/download/<asset>, which needs no API call. gh's asset names include the version, so the version comes from the releases/latest redirect instead. curl -f makes a bad download fail at the curl step instead of as a confusing tar error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
Deploy to TEST for ucdcweb2 failed after a Drupal core upgrade from 11.1.10 to 11.4.11:
_pantheon_complete_deploymentrunscache-rebuildbeforedrush deploy. Against LIVE's synced database, the new core rebuilt the router before its update hook had added therouter.aliascolumn. The deploy then stopped with TEST still in maintenance mode.1780e49 and f0a549d already handled this, but only for major upgrades. Minor releases change the schema too.
Change
drush deployalready runsupdatedb, thenconfig:import, thencache:rebuild, so nothing needs to rebuild caches before it. This PR removes:cache-rebuildbeforedrush deployenv:clear-cachebeforeenv:deploy, which fails the same way when an earlier deploy stalled with new code on the old schema (the cache clear at the end still runs)_drupal_major_upgrade_pendingand the extraupdatedb, which only worked around the two calls aboveThe TEST/LIVE deploy is now: maintenance on →
env:deploy→drush deploy→ maintenance off →env:clear-cache. The training deploy also calls_pantheon_complete_deploymentand gets the same fix.Testing
Only
bash -nhas been run so far. To verify: after this image is published, run a normal (sync) Deploy to TEST on ucdcweb2. LIVE is still on 11.1, so this reproduces the original failure and should now pass. Do this before ucdcweb2 deploys to LIVE.🤖 Generated with Claude Code