Feat v0.5.5 upgrade testing (#35)
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-frontend (push) Successful in 5s
CI/CD / test-go-pg (push) Successful in 2m35s
CI/CD / test-sqlite (push) Successful in 2m52s
CI/CD / build-and-deploy (push) Successful in 30s

Co-authored-by: Jeffrey Smith <jasafpro@gmail.com>
Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #35.
This commit is contained in:
2026-03-30 20:50:53 +00:00
committed by xcaliber
parent 4da25350ac
commit 768f15b3cd
9 changed files with 1446 additions and 14 deletions

View File

@@ -2,6 +2,38 @@
All notable changes to Switchboard Core are documented here.
## v0.5.5 — Upgrade Testing
### Fixed
- **Bundled permission auto-grant on Postgres**: The `InstallBundledPackages`
auto-grant SQL used SQLite-style `granted = 1` / `granted = 0` which fails
on Postgres BOOLEAN columns. Now dialect-aware: `true`/`false` on Postgres,
`1`/`0` on SQLite. This caused bundled extensions (notes, chat-core, etc.)
to install with permissions not granted on Postgres deployments.
- **E2E test API field corrections**: Fixed `ci/e2e-chat-test.sh` login field
(`"username"``"login"`), token extraction (`"token"``"access_token"`),
and profile endpoint (`/api/v1/me``/api/v1/profile`).
### Added
- **Upgrade test harness**: `docker-compose-upgrade.yml` + `ci/e2e-upgrade-test.sh`
orchestrate a full upgrade cycle: build old image, seed data (notes,
conversations, messages, settings), stop old, start new, verify data integrity
post-upgrade. Covers auth, notes, conversations, packages, and settings.
- **Rolling upgrade test**: `ci/e2e-upgrade-rolling.sh` tests rolling upgrade
with 2 replicas sharing Postgres. Upgrades one replica at a time, verifies
cross-replica reads during the mixed-version window.
- **11 new Go tests** in `upgrade_test.go`:
- Schema edge cases: add index (idempotent), add column (idempotent),
multi-column add, row preservation across migration.
- Settings migration: global/team/user overrides preserved across package
update, new keys get defaults, removed keys not deleted.
- Package compatibility: bundled skip-if-present on restart, dormant status
for unmet requires, enabled/type preserved across version bump.
- Direct `MigrateExtTables` tests: new table creation, column add with row
preservation, index idempotency.
## v0.5.4 — Package Updates
### Added