Repository navigation
Conversation
## 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
rfay
force-pushed
the
20261122_rfay_postgres_config_sync
branch
from
November 22, 2026 03:48
65c9aa4 to
fad1f9d
Compare
rfay
changed the base branch from
20261122_rfay_platform_cache_volume
to
main
November 22, 2026 03:48
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)
The Postgres test DB dump now matches the shared
config/sync, so the deploy hook'sdrush config-importpasses onddev restartof a Postgres test project.The Issue
tests/per_test.shimportsdb-postgres.sql.gzfor Postgres variants. The dump didn't matchconfig/sync. Onddev restart, the deploy hook runsdrush config-import, which failed with these errors:pgsqldatabase driver.The first
ddev startdoesn't hit this, because the DB is imported after it. A restart oftest-drupal11-postgres-flexfailed its post-start hook.How This PR Solves The Issue
settings.phpsets$settings['config_exclude_modules'] = ['mysql', 'pgsql']. The MySQL/MariaDB and Postgres variants share oneconfig/sync, so config import and export now leave the database driver modules alone.db-postgres.sql.gzis regenerated on Postgres 17:demo_umamiinstall, plus the other modules incore.extension.yml.config/sync.drush config-import, after which a second import reports no changes.Manual Testing Instructions
To check the restart by hand, run these from the
ddev-upsuncheckout:Automated Testing Overview
Claude Code ran these on Linux, each passing:
bats tests/drupal11-unified.bats -f 'test-drupal11-postgres-flex$'ddev restartcheck 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-hooksfrom its restart check after this merges.https://claude.ai/code/session_01UrTUMwxMkiE5j9dzeKy8rR
Generated by Claude Code