Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughPostgreSQL upgraded from version 17.8 to 18.2 across Docker Compose configurations and test containers. PostgreSQL data directory path added to production environment. Database migration documentation added with step-by-step procedures. Keycloak development setup simplified to reflect automatic realm import on startup. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
docker-compose.prod.yml (1)
117-124: PGDATA override works for Alpine, but the official PG 18+ recommendation is to mount at/var/lib/postgresql.The PG 18 Docker image changed the default
PGDATAto be version-specific — for PG 18, it is/var/lib/postgresql/18/docker. The declaredVOLUMEalso moved to/var/lib/postgresql, and mounts/volumes are meant to target that updated location.The current setup (
PGDATA=/var/lib/postgresql/data+ mount at./postgres_data:/var/lib/postgresql/data) is safe for now because Alpine images include a compatibility symlink that creates/var/lib/postgresql/data -> .to support legacy mount paths, so postgres will initialize correctly.However, the suggested container configuration for 18+ is to place a single mount at
/var/lib/postgresql, which would position future major-version upgrades to usepg_upgrade --linkefficiently. If that migration is acceptable, the recommended setup would be:- - PGDATA=/var/lib/postgresql/data + - PGDATA=/var/lib/postgresql/18/docker volumes: - - ./postgres_data:/var/lib/postgresql/data + - ./postgres_data:/var/lib/postgresql(This would require a data directory migration step — moving files from
./postgres_data/into./postgres_data/18/docker/before restarting — so keeping the override is the lower-risk path for this PR.)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docker-compose.prod.yml` around lines 117 - 124, Update the postgres service using image "postgres:18.2-alpine" (container_name thesis-management-db) to mount the canonical Postgres 18 volume: change the volumes entry from ./postgres_data:/var/lib/postgresql/data to ./postgres_data:/var/lib/postgresql and remove or update the PGDATA environment override (PGDATA currently set to /var/lib/postgresql/data) — either remove PGDATA so the image uses its default, or set PGDATA to the versioned path (/var/lib/postgresql/18/docker) if you plan to migrate data into that layout; perform any on-disk data migration beforehand if you switch to the new mount layout.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/DATABASE.md`:
- Around line 102-103: The pg_restore invocation currently used ("docker exec
thesis-management-db pg_restore -U \"$DB_USER\" -d \"$DB_NAME\" --no-owner
--no-acl /tmp/thesis_dump.dump") should be updated to include the
--exit-on-error flag so the command fails non-zero on any restore error and the
script won't proceed with a partial restore; locate the pg_restore call in
docs/DATABASE.md and add the --exit-on-error option to the existing argument
list.
In `@docs/DEVELOPMENT.md`:
- Around line 11-13: The fenced code block containing the command "docker
compose up keycloak -d" in DEVELOPMENT.md is missing a language specifier and
triggers the MD040 linter; update the opening fence to include a shell language
(e.g., change the triple backticks before the command to "```shell" or
"```bash") so the block reads as a shell code block and the linter warning is
resolved.
---
Nitpick comments:
In `@docker-compose.prod.yml`:
- Around line 117-124: Update the postgres service using image
"postgres:18.2-alpine" (container_name thesis-management-db) to mount the
canonical Postgres 18 volume: change the volumes entry from
./postgres_data:/var/lib/postgresql/data to ./postgres_data:/var/lib/postgresql
and remove or update the PGDATA environment override (PGDATA currently set to
/var/lib/postgresql/data) — either remove PGDATA so the image uses its default,
or set PGDATA to the versioned path (/var/lib/postgresql/18/docker) if you plan
to migrate data into that layout; perform any on-disk data migration beforehand
if you switch to the new mount layout.
- Add --exit-on-error to pg_restore to prevent proceeding with partial restore - Add pg_isready wait step between starting DB and restoring dump - Add bash language specifier to fenced code block (MD040) - Fix docs claiming plural "compose files" set PGDATA (only prod does) - Clarify rollback should also revert PGDATA override Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
PGDATA=/var/lib/postgresql/datato production compose file to handle PG 18's changed default data directory pathdocs/DATABASE.mddocs/DEVELOPMENT.md(realm, users, and roles are auto-imported)Motivation
PostgreSQL 18 is the latest stable major release. All dependencies (JDBC 42.7.10, Hibernate 7, Liquibase 5, TestContainers 2.0.3) are compatible. The upgrade brings performance improvements and continued security support.
Breaking Change: PGDATA Path
PG 18's Docker image changed the default
PGDATAfrom/var/lib/postgresql/datato/var/lib/postgresql/18/docker. The prod compose file explicitly setsPGDATA=/var/lib/postgresql/datato preserve existing volume mounts.Changes
docker-compose.ymlpostgres:17.8-alpine→postgres:18.2-alpinedocker-compose.prod.ymlPGDATAenv varBaseIntegrationTest.javaBaseKeycloakIntegrationTest.javadocs/DATABASE.mddocs/DEVELOPMENT.mdTest plan
Summary by CodeRabbit
Documentation
Chores