chore: replace docker-compose with nix process-compose for dev deps#114
Draft
Lakshyyaa wants to merge 3 commits into
Draft
chore: replace docker-compose with nix process-compose for dev deps#114Lakshyyaa wants to merge 3 commits into
Lakshyyaa wants to merge 3 commits into
Conversation
Follows es-entity#140. Drops Docker/podman from the dev loop in favor of a process-compose-managed Postgres, with per-worktree port allocation so multiple checkouts run their dev DB in parallel. - flake.nix: add process-compose-flake; dev-env (cwd-hash -> dynamic PGPORT), pg-start (root setpriv drop + bounded readiness), setup-db-dev, mkPg/nix-deps-base; rewrite nextest-runner (XDG_CONFIG_HOME, _pgdev, bounded wait, synchronous migrations); drop docker-compose/podman/ podman-compose, add process-compose; export dev-env/setup-db-dev/ nix-deps-base packages+apps; devShell shellHook evals dev-env - Makefile: start/clean/setup-db/reset-deps via process-compose + bounded wait; migrations folded into start-deps - tests/helpers.rs: read PG_CON from env (dynamic port) - ci/pipeline.yml: drop privileged: true (no container engine in CI) - remove docker-compose.yml, nix/podman-runner.nix - .gitignore: add .nix-deps/ Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Reviewed by Cursor Bugbot for commit 15b5a52. Configure here.
Picks up the post-migration fixes from cala that apply to job:
- flake.nix: always derive DATABASE_URL/PG_CON from PGPORT (drop the
${DATABASE_URL:-...} guard) so a stale :5432 export can't disagree with
the hash-derived port (cala 4041bb21)
- Makefile: set -e in start-deps so an orchestrator failure fails fast
instead of waiting out the 5-minute readiness loop (cala 496fd1b6)
- Makefile: drop dead test-in-ci target — CI runs `nix run .#nextest`;
the target started no deps in-scope and would panic on PG_CON (cala 0e024611)
- ci/pipeline.yml: drop unused public_docker_registry ytt import (cala e248196e)
cala's doctest PG_CON fix is N/A (job's doctests are all no_run/ignore);
online-sqlx-in-runner is already job's default.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pulls in es-entity#137 (direction-aware NULL fallback in cursor condition), #138 (opt-in nullable column attribute), and #139 (opentelemetry 0.31 -> 0.32). No source, migration, or .sqlx cache changes: job's cursor sorts on the non-nullable id, so the nullable sort-column codepath is untouched, and the offline build validates the query cache against es-entity 0.10.39. Co-Authored-By: Claude Opus 4.8 (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.

Follows GaloyMoney/es-entity#140. Migrates
job's dev loop off Docker/podman onto a Nix-managedprocess-composePostgres, with per-worktree port allocation so multiple checkouts run their dev DB in parallel. No Docker required forsqlx-prepare, integration tests, ormake start-deps.Changes
process-compose-flakeinput;dev-env(CRC32-of-cwd → dynamicPGPORT),pg-start(rootsetprivdrop + bounded readiness),setup-db-dev,mkPg/nix-deps-base; rewritenextest-runner(XDG_CONFIG_HOME,_pgdev, bounded readiness wait, synchronous migrations); dropdocker-compose/podman/podman-compose, addprocess-compose; exportdev-env/setup-db-dev/nix-deps-basepackages+apps; devShellshellHookevalsdev-envstart-deps/clean-deps/setup-db/reset-depsvia process-compose + bounded wait; migrations folded intostart-depsPG_CONfrom env (dynamic port) instead of hardcoded:5432privileged: true(no container engine needed in CI)docker-compose.yml,nix/podman-runner.nix.nix-deps/Notes
SQLX_OFFLINE=truestays incommonArgs(cranenix flake checkbuilds offline against.sqlx/). Thenextest-runnercompiles online against the live migrated PG — mirrors es-entity#140 and adds schema-drift coverage the offline checks can't.chore/nix-process-compose-dev-depsbranch, which used a static:5432port (didn't solve multi-worktree).Verification
alejandra -c flake.nix✅nix run .#dev-env→ consistent per-worktree derivation (PGPORT=25200, matchingPG_CON) ✅make start-deps→ PG up via process-compose on derived port, migrations applied ✅cargo nextest run --workspace→ 58 passed, 0 failed ✅make clean-deps→ torn down ✅🤖 Generated with Claude Code
Note
Medium Risk
Touches CI test bootstrap, dev workflows, and test DB connectivity; behavior change is intentional but broad across local and CI paths.
Overview
Replaces Docker/podman-compose dev Postgres with Nix
process-composeand a localpg-starthelper under.nix-deps/, somake start-deps,sqlx-prepare, and integration tests no longer need a container engine.Adds
dev-env(CRC32 of checkout path → dynamicPGPORT/PG_CON) so multiple worktrees can run Postgres in parallel, plussetup-db-devandnix-deps-basewith bounded readiness waits;Makefiletargets now start/stop deps vianix runand run migrations after Postgres is healthy.nextest-runnerand the dev shell follow the same flow (including rootsetprivdrop to UID 70 in CI). Integration tests readPG_CONfrom the environment instead of a fixed:5432host. CI dropsprivileged: trueon the tests job. Removesdocker-compose.yml,nix/podman-runner.nix, and ignores.nix-deps/.Reviewed by Cursor Bugbot for commit 15b5a52. Bugbot is set up for automated code reviews on this repo. Configure here.