Skip to content

Fix tests: update postgres volume mount for PostgreSQL 18 compatibility#307

Open
Copilot wants to merge 2 commits intomainfrom
copilot/fix-tests-issue
Open

Fix tests: update postgres volume mount for PostgreSQL 18 compatibility#307
Copilot wants to merge 2 commits intomainfrom
copilot/fix-tests-issue

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Tests have been failing since postgres:latest updated to PostgreSQL 18, which changed the container's data directory layout to use versioned subdirectories (/var/lib/postgresql/18/main) instead of the flat /var/lib/postgresql/data path. Mounting a volume at the old path causes the entrypoint to exit with code 1, preventing postgres from starting and cascading into all dependent service/test failures.

Changes

  • docker-compose.yml / docker-compose-elastic-cloud.yml: Change postgres volume mount from /var/lib/postgresql/data/var/lib/postgresql, per the PostgreSQL 18 Docker image guidance. PostgreSQL creates its own versioned subdirectory inside the mount.
  • Remove deprecated version: "2.1" top-level field from both compose files.
# Before
volumes:
  - pgdata:/var/lib/postgresql/data

# After — postgres 18+ creates pgdata/18/main internally
volumes:
  - pgdata:/var/lib/postgresql
Original prompt

This section details on the original issue you should resolve

<issue_title>Fix tests</issue_title>
<issue_description>We'd like to fix the tests because they are failing, see https://github.com/elastic/opbeans-ruby/actions/runs/22688800574/job/65778714781?pr=305</issue_description>

<agent_instructions>You are a ruby developer expert with deep knowledge of testing</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…patibility

Co-authored-by: fr4nc1sc0-r4m0n <215478872+fr4nc1sc0-r4m0n@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing tests issue in opbeans-ruby Fix tests: update postgres volume mount for PostgreSQL 18 compatibility Mar 4, 2026
@fr4nc1sc0-r4m0n fr4nc1sc0-r4m0n marked this pull request as ready for review March 6, 2026 16:17
@fr4nc1sc0-r4m0n fr4nc1sc0-r4m0n requested a review from a team as a code owner March 6, 2026 16:17
Copy link
Contributor

@fr4nc1sc0-r4m0n fr4nc1sc0-r4m0n left a comment

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix tests

2 participants