Repository navigation
Conversation
DDEV v1.25.6 no longer mounts ddev-global-cache on web (ddev/ddev#9045), so PLATFORM_CACHE_DIR under /mnt/ddev-global-cache was lost on `ddev restart`. - Add docker-compose.upsun.yaml mounting an upsun-cache project volume at /mnt/ddev-upsun-cache - Point PLATFORM_CACHE_DIR at /mnt/ddev-upsun-cache - Create the mount point owned by the web user in Dockerfile.upsun so the new volume is writable - Test that the cache survives `ddev restart` Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UrTUMyt3M2SmDRFaUiqqmb
The postgres fixture's DB dump doesn't match config/sync, so its deploy hook's drush config-import fails on any restart after the DB import. The restart only checks that the cache volume persists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UrTUMyt3M2SmDRFaUiqqmb
rfay
pushed a commit
that referenced
this pull request
Nov 22, 2026
## Short Summary (TL;DR) The Postgres test DB dump now matches the shared `config/sync`, so the deploy hook's `drush config-import` passes on `ddev restart` of a Postgres test project. ## The Issue `tests/per_test.sh` imports `db-postgres.sql.gz` for Postgres variants. The dump didn't match `config/sync`. On `ddev restart`, the deploy hook runs `drush config-import`, which failed with these errors: - Site UUID in source storage does not match the target storage. - Unable to uninstall the PostgreSQL module, because it provides the `pgsql` database driver. - Entities exist of type ... need to be deleted before importing. The first `ddev start` doesn't hit this, because the DB is imported after it. A restart of `test-drupal11-postgres-flex` failed its post-start hook. ## How This PR Solves The Issue - `settings.php` sets `$settings['config_exclude_modules'] = ['mysql', 'pgsql']`. The MySQL/MariaDB and Postgres variants share one `config/sync`, so config import and export now leave the database driver modules alone. - `db-postgres.sql.gz` is regenerated on Postgres 17: 1. A `demo_umami` install, plus the other modules in `core.extension.yml`. 2. The site UUID and every config entity UUID set to the values in `config/sync`. 3. `drush config-import`, after which a second import reports no changes. 4. Cache, session and watchdog tables emptied before the dump. ## Manual Testing Instructions ```bash git clone https://github.com/ddev/ddev-upsun && cd ddev-upsun gh pr checkout 30 bats tests/drupal11-unified.bats -f 'test-drupal11-postgres-flex$' # Expect: ok 1 test-drupal11-postgres-flex ``` To check the restart by hand, run these from the `ddev-upsun` checkout: ```bash REPO=$PWD && mkdir -p ~/tmp/pgtest && cd ~/tmp/pgtest cp -r $REPO/tests/testdata/drupal11-base/. . && cp -r $REPO/tests/testdata/platform-configs/postgres-flex/. . ddev config --project-type=drupal11 --docroot=web --fail-on-hook-fail --web-environment-add=PLATFORM_PROJECT=test,PLATFORM_ENVIRONMENT=test ddev add-on get $REPO ddev start -y ddev composer install --no-dev --no-interaction ddev import-db --file=db-postgres.sql.gz ddev restart # Expect the deploy hook to run config-import without errors ``` ## Automated Testing Overview Claude Code ran these on Linux, each passing: - `bats tests/drupal11-unified.bats -f 'test-drupal11-postgres-flex$'` - The postgres, mariadb and mysql flex tests with a `ddev restart` check that runs the deploy hook under `--fail-on-hook-fail`. Nobody ran the fixed-format variants or macOS. ## Release/Deployment Notes This PR changes only test fixtures. #29 can drop `--skip-hooks` from its restart check after this merges. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01UrTUMwxMkiE5j9dzeKy8rR Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UrTUMwxMkiE5j9dzeKy8rR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short Summary (TL;DR)
Moves
PLATFORM_CACHE_DIRonto a per-project Docker volume, so build hook caches surviveddev restarton DDEV v1.25.6+, which no longer mountsddev-global-cacheonweb.The Issue
PLATFORM_CACHE_DIRis lost onddev restartwith DDEV v1.25.6 #28DDEV v1.25.6 stopped mounting
ddev-global-cacheonweb(ddev/ddev#9045).PLATFORM_CACHE_DIRpointed at/mnt/ddev-global-cache/ddev-upsun/<project>, which then lived in the container's own filesystem and was emptied byddev restart.How This PR Solves The Issue
docker-compose.upsun.yamlmounts a project volume,upsun-cache, at/mnt/ddev-upsun-cacheonweb.PLATFORM_CACHE_DIRis now/mnt/ddev-upsun-cache. The volume already belongs to one project, so the/<project>subdirectory is gone..ddev/web-build/Dockerfile.upsuncreates/mnt/ddev-upsun-cacheowned by the web user. Docker copies that ownership into the new, empty volume, so build hooks can write to it.The issue suggested mounting at
/mnt/ddev-global-cache/ddev-upsun. This uses a separate path so the volume isn't nested insideddev-global-cacheon DDEV v1.25.5 and older, which still mount it onweb.Manual Testing Instructions
Automated Testing Overview
The unified bats test now writes a marker into
$PLATFORM_CACHE_DIR, runsddev restart, and checks the marker is still there. It also checks thatdocker-compose.upsun.yamlis installed with the add-on and removed with it.test-drupal11-mariadb-flexpassed locally on DDEVv1.25.5-95-g75bf48681. The other variants were not run locally.Release/Deployment Notes
containerfills a new volume from the image the way Docker does. If it doesn't, the cache directory may not be writable there.https://claude.ai/code/session_01UrTUMyt3M2SmDRFaUiqqmb
Generated by Claude Code