-
Notifications
You must be signed in to change notification settings - Fork 83
fix(CE): fixed deployment errors for postgres 18+ #884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe docker-compose.yml volume configuration was changed: the PostgreSQL service now mounts a new Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (1)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
docker-compose.yml (1)
1-96: Consider adding a clarifying comment about the PostgreSQL 18+ requirement.The changes address PostgreSQL 18+ mount path requirements, but this is not documented in the YAML itself. For future maintainers, adding a brief inline comment (e.g., above the postgresql service or the volumes section) explaining why the mount path is
/var/lib/postgresqlwould improve clarity.Example comment to add above line 3 or 92:
# This section is for the Temporal services + # Note: PostgreSQL 18+ requires data mounted at /var/lib/postgresql (not /var/lib/postgresql/data) postgresql:Alternatively, add a comment in the volumes section:
# Volumes for the database and redis + # PostgreSQL data volumes mounted at /var/lib/postgresql for version 18+ compatibility volumes:
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docker-compose.yml(3 hunks)
🔇 Additional comments (1)
docker-compose.yml (1)
94-96: Volume declarations are properly explicit and organized.The volumes section now explicitly declares all three volumes (
temporal-pg-data,mw-pg-data,mw-redis-data), which is clear and maintainable.
docker-compose.yml
Outdated
| - 5432:5432 | ||
| volumes: | ||
| - /var/lib/postgresql/data | ||
| - temporal-pg-data:/var/lib/postgresql |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
PostgreSQL volume mount paths correctly updated for version 18+ compatibility.
The changes align with the PR objective: PostgreSQL 18+ images expect a single mount at /var/lib/postgresql rather than /var/lib/postgresql/data to support in-place upgrades with pg_upgrade. Both services (postgresql and db) now use the correct mount paths, with separate volumes (temporal-pg-data and mw-pg-data).
Verify that the PostgreSQL image versions in use support the new mount path:
Also applies to: 55-55
🏁 Script executed:
#!/bin/bash
# Description: Verify PostgreSQL version configuration supports the mount path change.
# Check TEMPORAL_POSTGRESQL_VERSION variable default or in .env
grep -r "TEMPORAL_POSTGRESQL_VERSION" . --include="*.env*" --include="*.sh" --include="Makefile" 2>/dev/null | head -20
# Check db service image version in compose file
grep -A 2 'image: postgres:' docker-compose.ymlLength of output: 158
This will help locate the docker-compose.yml and identify if the PostgreSQL version is actually 13 (which uses `/var/lib/postgresql/data`) or if it's been updated to 18+.
---
🏁 Script executed:
```shell
#!/bin/bash
# Find docker-compose.yml location
fd -name "docker-compose.yml" --type f
# Check if there are multiple compose files or variations
fd -name "docker-compose*.yml" --type f
# Look for version overrides or dynamic configuration
grep -r "TEMPORAL_POSTGRESQL_VERSION" . --include="*.yml" --include="*.yaml" -A 2 -B 2 2>/dev/null | head -40
Length of output: 997
---
🏁 Script executed:
```shell
#!/bin/bash
# View the full docker-compose.yml to see volume mounts and version
cat ./docker-compose.yml
# Also check if there's a .env file with actual version override
if [ -f ./.env ]; then
echo "=== .env file ==="
cat ./.env
fi
# Check git diff or commits for version changes
git log --oneline -20 2>/dev/null || echo "Git history not available"
Length of output: 3412
---
🏁 Script executed:
```shell
#!/bin/bash
# Check if TEMPORAL_POSTGRESQL_VERSION was updated anywhere in the PR
grep -r "TEMPORAL_POSTGRESQL_VERSION.*18" . --include="*.env*" --include="*.yml" --include="*.yaml" --include="*.md" 2>/dev/null
# Check for any version update documentation or migration guides
find . -name "*.md" -type f -exec grep -l "postgres.*18\|TEMPORAL_POSTGRESQL_VERSION" {} \; 2>/dev/null | head -10
# Show contents of main README or CHANGELOG if they mention this
if [ -f ./README.md ]; then
grep -A 5 -B 5 "postgres\|database\|version" ./README.md | head -50
fi
Length of output: 466
Critical version incompatibility: Mount path change requires PostgreSQL 18+ but default version remains 13.
The changes update volume mount paths to /var/lib/postgresql (compatible with PostgreSQL 18+), but TEMPORAL_POSTGRESQL_VERSION in .env.example still defaults to 13, which uses /var/lib/postgresql/data. This creates a breaking change:
- PostgreSQL 13 with mount at
/var/lib/postgresqlwill fail to access data - Users upgrading will face deployment errors unless they manually set
TEMPORAL_POSTGRESQL_VERSION=18 - No migration path or documentation provided
Required fixes:
- Update
TEMPORAL_POSTGRESQL_VERSION=18in.env.examplefiles (currently set to13) - Add documentation or migration guide explaining the PostgreSQL version requirement
🤖 Prompt for AI Agents
In docker-compose.yml around line 12 the volume mount was changed to
/var/lib/postgresql which requires PostgreSQL 18+, but .env.example still
defaults TEMPORAL_POSTGRESQL_VERSION=13 causing a breaking mismatch; update all
.env.example files to set TEMPORAL_POSTGRESQL_VERSION=18, add a brief note in
the repo README or a new migration doc that calls out the PostgreSQL 18
requirement and explains the upgrade step (set TEMPORAL_POSTGRESQL_VERSION=18
and recreate containers/volumes), and ensure the docker-compose and docs mention
the required path change so users know to adjust their environment before
upgrading.
Description
Fixes the deployment error below:
Related Issue
Type of Change
How Has This Been Tested?
Ran the deployment and tested Connectors, Models & Syncs
Checklist:
feature,bugfix,hotfix,release,styleorchorefollowed by/and branch name e.gfeature/add-salesforce-connectorSummary by CodeRabbit