Skip to content

Fix Postgres data volume path in Breeze - #73862

Merged
ashb merged 2 commits into
apache:mainfrom
Andrushika:pr-73836-ash-separate-change
Sep 29, 2026
Merged

ashb merged 2 commits into
apache:mainfrom
Andrushika:pr-73836-ash-separate-change

Conversation

@Andrushika

@Andrushika Andrushika commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Why

Breeze mounts a named volume into the postgres container, so its data can survive breeze down --preserve-volumes. The mount path in backend-postgres.yml is /var/lib/postgresql/{$POSTGRES_VERSION}/docker. The $ sits inside the braces, so the path resolves to a literal {14} directory. Postgres never uses that directory.

The data goes to an anonymous volume instead. It is lost on down, and the anonymous volume is left behind.

What

Mount the volume at the image's data volume path. Breeze now passes this path per version (/var/lib/postgresql/data up to 17, /var/lib/postgresql from 18). #73836 made the volume name unique per project, so parallel test types still get their own data directory.

related: #73836


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude Code (Opus 5.5) following the guidelines

@Andrushika Andrushika changed the title Pr 73836 ash separate change Fix Postgres data volume path in Breeze Sep 28, 2026
@Andrushika
Andrushika marked this pull request as draft September 28, 2026 18:53
Comment thread scripts/ci/docker-compose/backend-postgres.yml
The postgres service mounted its named volume at
/var/lib/postgresql/{$POSTGRES_VERSION}/docker. The `$` sits inside the
braces, so the path resolves to a literal `{14}` directory that Postgres
never uses. The data went to an anonymous volume created from the
image's VOLUME instead, so `breeze down --preserve-volumes` did not keep
it, and each `down` without `--volumes` left anonymous volumes behind.

The image's VOLUME moved from /var/lib/postgresql/data to
/var/lib/postgresql in Postgres 18, so one static path cannot fit every
supported version.
@Andrushika
Andrushika force-pushed the pr-73836-ash-separate-change branch from 601beb6 to 16aeced Compare September 29, 2026 11:39
@Andrushika
Andrushika marked this pull request as ready for review September 29, 2026 11:42
Commands that run without a database, such as `breeze testing
task-sdk-tests`, build ShellParams with an empty postgres_version, and
parsing it as a number failed before any test ran.
@fat-catTW

Copy link
Copy Markdown
Contributor

Thanks for the fix!

@ashb
ashb merged commit a65a3dd into apache:main Sep 29, 2026
154 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: v3-3-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
❌ v3-3-test Commit Link

You can attempt to backport this manually by running:

cherry_picker a65a3dd v3-3-test

This should apply the commit to the v3-3-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

@amoghrajesh amoghrajesh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants