Repository navigation
1.3.0 database: CI checks that stop drift #126
Copy link
Copy link
Open
Labels
plannedActive backlog; exempt from stale botActive backlog; exempt from stale bot
Description
Goal
CI fails when the database definition drifts from the code, or when an install or an upgrade breaks.
What changes
- Fresh install on every database. Apply the 1.3.0 changelog to empty H2, PostgreSQL, Oracle Free 23, and Oracle XE 21 databases, then start the backend. Oracle XE 21 keeps the SQL compatible with Oracle 19c.
- Upgrade from 1.2.9. Restore 1.2.9 PostgreSQL and Oracle databases, start 1.3.0, and check that a second start changes nothing. This replaces the seven upgrade jobs from 1.2.6, 1.2.7, and 1.2.8 in
liquibase-upgrade.yml. - Backend tests on all three databases.
testPostgresandtestOraclerun with the sametestprofile as H2 (test,postgresandtest,oracle). Today they skip it, so test-only settings do not apply. Tests that swap in an H2 database while the Oracle profile is active use the real test database instead. - Code matches data.
CodeListsTestlists every code list value the backend, admin, viewer, and mobile apps depend on, and checks that the database has it. - History cannot be edited. The changelog immutability check covers
sitmun-backend/src/main/resources/db/changelog/and compares against the latestv*release tag:- files that tag shipped (
baseline/and earlierreleases/files) cannot change; - in the open release file, merged changesets cannot change, only new ones can be added at the end;
- every release file except the open one ends with a
tagDatabasechangeset matching its name, and the master includes release files in version order.
- files that tag shipped (
- No demo or test data in production. CI lists the changelog files inside the built backend jar and image and fails if any comes from
profiles/orsrc/test/resources/. A fresh install with the shipped master has no demo applications, territories, services, or test users. - Demo still works. The stack starts on PostgreSQL with
profiles/development-postgres.envunchanged and the root E2E suites that use demo data pass. - Retire the old drift scripts.
compare-schema-drift.shand the seed identity checks are no longer needed once only one changelog exists.
These checks need the monorepo (#105). Today the stack's CI cannot see changes inside the backend repository.
Done when
- A pull request that edits a shipped changelog file, removes a code list value the code uses, puts demo or test data in the jar, or breaks a fresh install or a 1.2.9 upgrade fails CI.
Metadata
Metadata
Assignees
Labels
plannedActive backlog; exempt from stale botActive backlog; exempt from stale bot
Activity