fix: resolve Docker volume paths, IAM migration conflict, linter version, and PPC compose - #168
Merged
ilramdhan merged 4 commits intoAug 19, 2026
Conversation
postgres:18-alpine moves PGDATA to /var/lib/postgresql/18/docker and
declares /var/lib/postgresql as its VOLUME. Mounting a named volume one
level deeper, at /var/lib/postgresql/data, makes the entrypoint abort:
Error: in 18+, these Docker images are configured to store database
data in a format which is compatible with "pg_ctlcluster" [...]
Counter to that, there appears to be PostgreSQL data in:
/var/lib/postgresql/data (unused mount/volume)
All three Postgres services in the root compose plus the IAM per-service
compose still used the old path, so they exited with code 1 on any fresh
`docker compose up -d`. services/finance/deployments already carried the
corrected path from commit "chore: update postgres volume mount path in
docker-compose" -- that fix simply never reached the other four spots.
Verified: all three databases come up healthy and report
`data_directory = /var/lib/postgresql/18/docker`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Migration 000037 created a thread-based chat schema whose message table was also called `chat_message` (thread_id / ciphertext / nonce / key_version). Migration 000072 then creates the conversation-based `chat_message` (conversation_id / body_encrypted / is_deleted) with CREATE TABLE IF NOT EXISTS, so on any database that had run 000037 the CREATE was silently skipped and the next statement failed: error: migration failed: column "is_deleted" does not exist (column 11) in line 17 [...] (details: pq: column "is_deleted" does not exist) That made `make migrate-up` fail at 72 on every freshly created database, leaving schema_migrations dirty. No migration ever dropped the 000037 tables, and `chat_thread` is not referenced anywhere under internal/ -- the live design is the conversation-based one built by 000070-000074 and 000078, so the 000037 leftovers are dead weight. Drop them at the top of 000072 instead of editing the already-applied 000037: environments that are past 72 keep the table they have, while fresh databases and the ones stuck mid-migration get the correct schema. Verified against a scratch database migrated from zero: reaches version 82 with dirty=false, `chat_message` has `is_deleted`, and no `chat_thread` tables remain. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The service Makefiles installed golangci-lint v1.62.2, but .golangci.yml
declares `version: "2"`, which only v2 can parse. `make lint` therefore
failed locally while CI passed -- the workflows already pin v2.3.0, and
ppc-service.yml even documents the divergence inline:
GOLANGCI_LINT_VERSION: 'v2.3.0' # NOT the service Makefile's v1.62.2
# -- v1 cannot parse a `version: "2"` config
v2 also moved the command to a /v2 module path, so bumping the version
alone would not install. Update both, in all three services.
Verified: `golangci-lint linters` loads the v2 config and reports the
configured linter set.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
services/ppc/Makefile has docker-up, docker-down and docker-logs targets pointing at deployments/docker-compose.yaml, but the directory was empty, so all three failed: open .../services/ppc/deployments/docker-compose.yaml: no such file or directory make: *** [docker-up] Error 1 IAM and Finance both ship a per-service compose for single-service development; PPC was added later and only got wired into the shared root compose. Restore parity so the existing targets work. PPC needs less than the other two: its config.yaml declares no redis, rabbitmq or minio section, so only PostgreSQL and Jaeger are included. Ports follow config.yaml defaults (postgres 5436, OTLP 4317), which makes this file and the root compose mutually exclusive -- the same tradeoff services/finance/deployments already makes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses several setup, tooling, and database migration issues across the repository:
000037at the beginning of migration000072to resolve schema collisions during fresh database migrations.golangci-linttov2.3.0in service Makefiles to properly parse.golangci.yml(version: "2") and match CI configurations.services/ppc/deployments/docker-compose.yamlto satisfy standalonedocker-up,docker-down, anddocker-logsMakefile targets for the PPC service.Type of Change
Service(s) Affected
Changes Made
/var/lib/postgresql/datato/var/lib/postgresqlacross root compose and IAM service compose to comply withpostgres:18-alpine(PGDATA=/var/lib/postgresql/18/docker).000072to drop legacy000037thread-based tables (chat_thread, legacychat_message) prior to creating the conversation-basedchat_messagetable, preventingis_deletedcolumn mismatch errors on fresh databases.golangci-lintbinary installation path and pinned version tov2.3.0across all service Makefiles to supportversion: "2"config parsing and align local runs with CI.services/ppc/deployments/docker-compose.yamlwith PostgreSQL (port5436) and Jaeger (OTLP port4317) services, enabling standalone container lifecycle targets.Related Issues
Fixes #
Related to #
API Changes (if applicable)
Proto Changes
# No proto changesBreaking Changes
Testing Performed
Unit Tests
Integration Tests
Manual Testing
Lint & Build
golangci-lint run ./...passesgo build ./...succeedsgo test -race ./...passesDatabase (if applicable)
Documentation
Rollback Plan
000072modifications if schema conflicts occur during migration rollbacks.golangci-lintversion to previous setting if tooling incompatibilities appear.services/ppc/deployments/docker-compose.yamlif PPC standalone environment requires rollback.Screenshots/Logs (if applicable)
Pre-merge Checklist
Reviewer Notes
services/ppc/deployments/docker-compose.yamlconcurrently with the root compose is mutually exclusive due to shared port assignments (Postgres5436, OTLP4317), consistent with the existing Finance service setup.000072cleanly handles legacy tables for fresh databases while leaving environments already past version72intact.