Skip to content

SQLite→PostgreSQL guide and start.sh refusal: image step is incomplete (build backend only → mixed-version stack; rollback names no rebuild) #4479

Closed

Description

@pavshulin

Found in: v1.0.5-rc2 (af465288a), release-test row B14 (upgrade in place v1.0.0 → RC, SQLite → PostgreSQL). Still present on dev (no later commit to the guide or start.sh).

Release note from the tester: better fixed before the v1.0.5 tag (wording only, no code risk); if there is no time it can ship as known debt.

The image step of the SQLite → PostgreSQL move is incomplete in both directions on a source-built install. One root cause, two symptoms.

1. Forward: following the instructions leaves a mixed-version stack that reports healthy

docs/migrations/SQLITE_TO_POSTGRES.md step 3 and the start.sh refusal message both say:

docker compose <your -f files> build backend
docker compose <your -f files> run --rm backend python -m db.sqlite_to_postgres
then re-run this script

start.sh builds nothing (scripts/deploy/start.sh:1892 is a plain up -d), and the platform services are build: entries without a versioned image name, so the images already on the host are reused.

Observed on a dev-compose install upgraded v1.0.0 → rc2 exactly as the message says: backend runs rc2 on PostgreSQL, while the scheduler and MCP server still run v1.0.0 code (scheduler service.py 2,245 lines = v1.0.0, rc2 has 2,364; MCP server package.json 1.0.0, 73 tool modules vs 83). start.sh ends with "Ready" and every container is healthy. Nothing failed in a short run; the risk of an old scheduler on the new schema is unmeasured.

By the same mechanism a production-compose install would also keep the old frontend image (docker-compose.prod.yml:586, fixed tag). Not observed: in the production run all four images were built by hand.

The general upgrade guide already builds all four: docs/user-docs/guides/deploying/upgrading.md:130,138.

Fix: in guide step 3 and in the refusal message (start.sh:1775), build backend frontend mcp-server scheduler (or say that the full rebuild from the upgrade guide is still required after the copy).

2. Rollback: the guide's rollback fails as written

SQLITE_TO_POSTGRES.md:71: "check out the previous release, set DATABASE_URL= (empty), delete trinity.db.copied-to-postgres, and start the stack."

Done exactly so on a production-compose install: the v1.0.0 compose file starts the newer backend image still on the host, which refuses with the SQLite end-of-support message — the same message that sent the operator to the copy in the first place. up -d reports "container trinity-backend is unhealthy" after about 3 minutes.

After docker compose <files> build on the old checkout the rollback works: healthy in seconds on the untouched trinity.db, data identical to the pre-upgrade snapshot. update.sh --rollback also rebuilds and works.

Fix: add the rebuild (source-built) and "set TRINITY_IMAGE_TAG back and pull" (hosted) to the rollback sentence, or point it at update.sh --rollback.

Impact

No data loss in either case. Forward: every SQLite install passes through these instructions. Rollback: affects only an operator rolling back by hand.

Related: #4478 (update.sh on the same upgrade).

Activity

  1. added
    priority-p2
    type-bug
    theme-infrastructure
    on Nov 11, 2026
  2. obasilakis commented on Nov 13, 2026

    @obasilakis
    Contributor

    /claim

  3. added
    status-in-progress
    on Nov 13, 2026
  4. github-actions commented on Nov 13, 2026

    @github-actions

    Claimed by @obasilakis. Label status-in-progress added.

    Next steps:

    1. Create branch: feature/4479-<short-slug>
    2. Implement the feature
    3. Open a PR with Fixes #4479
  5. added
    status-in-dev
    and removed
    status-in-progress
    on Nov 13, 2026
  6. removed
    status-in-dev
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority-p2theme-infrastructuretype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions