From 059b9adc3a95957cb2b6f500045e88b1c7236341 Mon Sep 17 00:00:00 2001 From: Brandt Kurowski Date: Fri, 21 Aug 2026 13:29:16 +0000 Subject: [PATCH 1/3] Point developers to devcontainer-reset-db in README Recommend `uceap devcontainer-reset-db` as the default way to reset a local database, and clarify when `uceap refresh-content` is still needed (current DEV content, the files directory, or LIVE data). Co-Authored-By: Claude Opus 5 (1M context) --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a688fdf..bf6545b 100644 --- a/README.md +++ b/README.md @@ -15,17 +15,20 @@ To see a list of available commands, run `uceap` in the terminal. You can also r ## Tips and tricks -I frequently invoke `uceap refresh-content` to reset my local environment after switching branches. It runs `composer install` and invokes `db-rebuild.sh` with a fresh copy of the latest snapshot of the dev environment database and files. With shell completions installed, it's as easy as `ucer`. +I frequently invoke `uceap devcontainer-reset-db` to reset my local database after switching branches, or after e2e tests have left data behind. It recreates the mariadb container from the seed data baked into its image and then runs `drush deploy`, so there's nothing to download from Pantheon. With shell completions installed, it's `ucedevcr`. -> 👉 When working on a PR that adds update hooks or makes config changes, it's generally a good idea to make sure it applies cleanly to a database matching the QA environment. To do this, switch to the `qa` branch, run refresh-content, switch back to your branch, and run the deploy command (e.g. `drush md` for the portal): +> 👉 When working on a PR that adds update hooks or makes config changes, it's generally a good idea to make sure it applies cleanly to a database matching the QA environment. To do this, switch to the `qa` branch, reset the database, switch back to your branch, and run the deploy command (e.g. `drush md` for the portal): > ``` zsh > git checkout qa -> uceap refresh-content +> composer install +> uceap devcontainer-reset-db > git checkout - > composer install > drush deploy > ``` +The seed data baked into the database image is a point-in-time snapshot of the DEV environment, and it doesn't include the files directory. When you need the _current_ contents of DEV, along with its files, use `uceap refresh-content` instead: it runs `composer install`, compiles the theme, and invokes `db-rebuild.sh` with the latest database and files backups from Pantheon. + Troubleshooting an issue on the live site? `TERMINUS_ENV=live uceap refresh-content` will pull the latest backup of the database and files from LIVE. _You'll be knee-deep in PII in no time!_ **Be sure to reset your database and files with DEV data as soon as you're done.** Sometimes a process can die or port forwarding can fail. `uceap devcontainer-post-start` runs a few commands that should get things working again. (Again, shell completion makes this `ucesta`). From b76e0a7d807667ae93c2094912f332b42bf40f61 Mon Sep 17 00:00:00 2001 From: Brandt Kurowski Date: Fri, 21 Aug 2026 13:31:56 +0000 Subject: [PATCH 2/3] Use --skip-deploy in the update hook testing recipe devcontainer-reset-db runs drush deploy by default, so the recipe needs --skip-deploy to leave the database at its seed state and let the developer run the composer install / drush deploy dance themselves. The qa checkout is dropped: the seed database is already at the deployed state, so switching branches before the reset accomplishes nothing. Co-Authored-By: Claude Opus 5 (1M context) --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bf6545b..19f6af9 100644 --- a/README.md +++ b/README.md @@ -17,15 +17,13 @@ To see a list of available commands, run `uceap` in the terminal. You can also r I frequently invoke `uceap devcontainer-reset-db` to reset my local database after switching branches, or after e2e tests have left data behind. It recreates the mariadb container from the seed data baked into its image and then runs `drush deploy`, so there's nothing to download from Pantheon. With shell completions installed, it's `ucedevcr`. -> 👉 When working on a PR that adds update hooks or makes config changes, it's generally a good idea to make sure it applies cleanly to a database matching the QA environment. To do this, switch to the `qa` branch, reset the database, switch back to your branch, and run the deploy command (e.g. `drush md` for the portal): +> 👉 When working on a PR that adds update hooks or makes config changes, it's generally a good idea to make sure it applies cleanly to a database matching the deployed environments. Pass `--skip-deploy` so the reset leaves the database at its seed state, then run the deploy command yourself (e.g. `drush md` for the portal) to see how it behaves against that database: > ``` zsh -> git checkout qa -> composer install -> uceap devcontainer-reset-db -> git checkout - +> uceap devcontainer-reset-db --skip-deploy > composer install > drush deploy > ``` +> Without `--skip-deploy`, the reset runs `drush deploy` for you, which applies your branch's updates before you get a chance to watch them. The seed data baked into the database image is a point-in-time snapshot of the DEV environment, and it doesn't include the files directory. When you need the _current_ contents of DEV, along with its files, use `uceap refresh-content` instead: it runs `composer install`, compiles the theme, and invokes `db-rebuild.sh` with the latest database and files backups from Pantheon. From 45c12a8760b2670cbc870b03b04cab054a53b499 Mon Sep 17 00:00:00 2001 From: Brandt Kurowski Date: Fri, 21 Aug 2026 13:34:32 +0000 Subject: [PATCH 3/3] Revert "Use --skip-deploy in the update hook testing recipe" This reverts commit b76e0a7d807667ae93c2094912f332b42bf40f61. --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 19f6af9..bf6545b 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,15 @@ To see a list of available commands, run `uceap` in the terminal. You can also r I frequently invoke `uceap devcontainer-reset-db` to reset my local database after switching branches, or after e2e tests have left data behind. It recreates the mariadb container from the seed data baked into its image and then runs `drush deploy`, so there's nothing to download from Pantheon. With shell completions installed, it's `ucedevcr`. -> 👉 When working on a PR that adds update hooks or makes config changes, it's generally a good idea to make sure it applies cleanly to a database matching the deployed environments. Pass `--skip-deploy` so the reset leaves the database at its seed state, then run the deploy command yourself (e.g. `drush md` for the portal) to see how it behaves against that database: +> 👉 When working on a PR that adds update hooks or makes config changes, it's generally a good idea to make sure it applies cleanly to a database matching the QA environment. To do this, switch to the `qa` branch, reset the database, switch back to your branch, and run the deploy command (e.g. `drush md` for the portal): > ``` zsh -> uceap devcontainer-reset-db --skip-deploy +> git checkout qa +> composer install +> uceap devcontainer-reset-db +> git checkout - > composer install > drush deploy > ``` -> Without `--skip-deploy`, the reset runs `drush deploy` for you, which applies your branch's updates before you get a chance to watch them. The seed data baked into the database image is a point-in-time snapshot of the DEV environment, and it doesn't include the files directory. When you need the _current_ contents of DEV, along with its files, use `uceap refresh-content` instead: it runs `composer install`, compiles the theme, and invokes `db-rebuild.sh` with the latest database and files backups from Pantheon.