Upgrades
Upgrade a Compose or Helm installation, and what happens to the database and the index.
Every Synaxis version migrates its own database schema before it serves, so an upgrade is a new image and a restart. A release that changes the index format re-indexes in the background as a new generation, while searches keep using the current one.
Before you upgrade
- Read the release notes, and verify the image.
- Back up the database (Backup and restore). A migration cannot be undone by running the older image.
Docker Compose
Set the new
SYNAXIS_VERSIONin.env(or the new digest inSYNAXIS_IMAGE).Bring in the new version's
compose.yamlandmonitoring/folder, keeping your.env,compose.override.yaml,secrets/andconfig/.Pull and restart:
docker compose pull docker compose up -d
The server migrates the database at start, then serves. Expect a short interruption while the container restarts.
With compose.scale.yaml, the migrate container runs first, and the API and worker start only when it succeeds.
Kubernetes
helm upgrade synaxis ./codewright-synaxis -n synaxis \
-f ./codewright-synaxis/values-production.yaml -f my-values.yaml --atomic --timeout 20m
- The migrate hook Job runs first. If it fails,
--atomicrolls the release back and nothing that was running changes. The previous version's pods stay ready while it runs and afterwards: each release's migrations keep the previous release working on the upgraded schema. - The API rolls with no pod unavailable, so with more than one API replica the upgrade has no downtime. A new pod is ready once the database has its version's schema.
- The workers roll one at a time. Each stops claiming jobs and finishes or releases its work within its grace period.
For a canary, the StatefulSet's
partitioncan hold back some workers.
The chart's major version changes only with breaking value changes; the chart's README.md lists the migrations
between major versions. Run helm test synaxis -n synaxis afterward.
Rolling back
helm rollback synaxis <revision> -n synaxis runs the previous version against the upgraded database (migrations are
never undone), and it serves: a release supports the database of the release after it. A release that removes
something from the schema says so in its notes, and supports only the releases from the one before it; an older
version then reports not ready ("upgrade") and refuses to migrate. Restore the backup taken before the upgrade to
go back further (Backup and restore).
After the upgrade
- Overview shows the new Version.
- If the release changed the index format, Generations shows a new generation building; it serves by itself when
complete (Index generations). Its embeddings count against the
embeddingbudget. - The server address stays the same, so CodeWrightAI and the CLI need no change. Update the
synaxisCLI from the release when its notes say so.
Scaling workers
Raising or lowering worker.replicas rebalances repositories across the workers: about one in n repositories moves,
its queued jobs follow it, and the new owner clones it fresh. Scaling down keeps the removed workers' volumes, so
scaling back up is cheap. The change is audited as workers.rebalance.