test: Upgrade CI postgresql to v18 - #121448
Conversation
| remote: | ||
| repo_name: sentry-shared-postgres | ||
| branch: main | ||
| branch: chore/upgrade-postgres-to-v18 |
There was a problem hiding this comment.
Bug: The devservices/config.yml points the postgres dependency to a temporary feature branch, chore/upgrade-postgres-to-v18, which will likely be deleted after merging.
Severity: MEDIUM
Suggested Fix
After the changes in the chore/upgrade-postgres-to-v18 branch are merged into the main branch of the sentry-shared-postgres repository, update devservices/config.yml to point the postgres dependency back to branch: main.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: devservices/config.yml#L41
Potential issue: The `devservices/config.yml` file is configured to use a temporary
feature branch, `chore/upgrade-postgres-to-v18`, for the `sentry-shared-postgres`
dependency. Feature branches are typically deleted after being merged. Once this branch
is deleted from the upstream repository, the `devservices up` command will fail for any
developer trying to set up their local environment, as it will be unable to clone the
specified branch. This will break the local development setup process.
Did we get this right? 👍 / 👎 to inform future reviews.
…ci-postgres-to-v18 Co-Authored-By: Michal Kuffa <michal.kuffa@sentry.io>
…ci-postgres-to-v18 Co-Authored-By: Michal Kuffa <michal.kuffa@sentry.io>
…ci-postgres-to-v18
…ci-postgres-to-v18
…ci-postgres-to-v18
| -p 127.0.0.1:5432:5432 \ | ||
| -v postgres-data:/var/lib/postgresql/data \ | ||
| -v postgres-data:/var/lib/postgresql \ | ||
| -v /tmp/pg-sock:/var/run/postgresql \ |
There was a problem hiding this comment.
Bug: The CI workflow's PostgreSQL volume mount path is updated for v18, but it doesn't validate the actual image version, risking startup failure or silent data reset with older images.
Severity: CRITICAL
Suggested Fix
Enforce the PostgreSQL version dependency. Either explicitly use a specific v18+ image tag instead of dynamically inspecting the running container, or add a step to verify the PostgreSQL version from the image before re-running the container with the new volume path. This ensures the volume mount path is compatible with the image being used.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: .github/workflows/backend.yml#L253
Potential issue: The CI workflow in `.github/workflows/backend.yml` changes the
PostgreSQL volume mount path to be compatible with PostgreSQL v18. However, the actual
PostgreSQL image version is determined dynamically from a branch specified in
`devservices/config.yml` without any validation. If this process results in an older
(pre-v18) PostgreSQL image being used, the container will either fail to start or
silently initialize a new, empty database because the volume mount path will be
incorrect for that version. This could cause CI jobs to fail or to pass incorrectly with
tests running against an empty database.
Also affects:
devservices/config.yml:41~41
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e323490. Configure here.
| remote: | ||
| repo_name: sentry-shared-postgres | ||
| branch: main | ||
| branch: chore/upgrade-postgres-to-v18 |
There was a problem hiding this comment.
Temporary feature branch dependency pin
High Severity
postgres in devservices/config.yml is pinned to the temporary branch chore/upgrade-postgres-to-v18 instead of main. If this lands, local devservices and CI depend on that branch; once it is merged or deleted, postgres startup fails for everyone.
Reviewed by Cursor Bugbot for commit e323490. Configure here.
…ci-postgres-to-v18
…ci-postgres-to-v18
…ci-postgres-to-v18


Run CI on Postgresql v18