3.2 KiB
Release Policy
Version source of truth
Config Center uses Semantic Versioning. A production release is created only from an annotated or lightweight Git tag named vMAJOR.MINOR.PATCH, for example v0.2.0.
Before creating the tag, move the relevant entries from CHANGELOG.md Unreleased into a dated heading in the form ## [MAJOR.MINOR.PATCH] - YYYY-MM-DD. The release workflow rejects a tag that has no matching changelog heading.
Server images expose the release version, Git commit, and build timestamp through OCI labels and the configcenter -version command. Production deployments must reference immutable image digests rather than mutable tags.
Required release gates
A release is eligible only when all repository verification succeeds:
- protobuf generation has no drift;
- Go unit/integration tests and race tests pass;
golangci-lintandgovulncheckpass;- Python SDK compile validation and Web Console production build pass;
- YAML, Docker Compose, and migration policy validation pass;
- dependency and final container image scans contain no untreated HIGH or CRITICAL vulnerabilities.
The tag-triggered workflow then builds Linux amd64 and arm64 server/web images, pushes them to GHCR, generates SPDX JSON SBOMs, and signs each immutable digest with Cosign using GitHub OIDC. The workflow verifies the signature immediately after signing.
Database migration rules
PostgreSQL migrations under internal/store/postgres/migrations are append-only and use contiguous filenames such as 004_add_feature.sql.
- Never edit, rename, reorder, or delete a migration that may have been applied outside a developer's disposable database.
- Schema changes must be forward-compatible with the previous application release during rolling deployment.
- Destructive changes use expand/migrate/contract: add the new structure first, migrate traffic/data, and remove the old structure only in a later release.
- The application runtime verifies migration checksums and refuses to start if an already-recorded migration has changed.
Rollback admission
Application rollback is permitted only when the database schema currently deployed remains compatible with the target application version. If a release contains a migration that breaks backward compatibility, rollback is blocked until a corrective forward migration restores compatibility.
Database rollback is not implemented by executing down migrations in production. Recovery from an erroneous destructive migration uses a tested PostgreSQL backup/restore procedure or a new forward migration, depending on incident scope.
Release procedure
- Ensure the main branch is green and update
CHANGELOG.md. - Run
make verifylocally where practical. - Create and push
vMAJOR.MINOR.PATCH. - Wait for the
Releaseworkflow to finish successfully. - Record the server and web image digests and deploy by digest to staging.
- Complete staging smoke/load/fault checks and production change approval.
- Promote the exact tested digests to production; do not rebuild between staging and production.
The remaining staging mTLS, backup/restore, sustained load, and fault-injection gates are tracked separately because they require a real multi-node environment.