test(db): run the startup migration chain against PostgreSQL in CI #7

Merged
benvin merged 4 commits from benvin/ci-postgres-migration-chain into main 2026-09-12 22:22:13 +10:00
Member

Every PostgreSQL test carries Category=RequiresDocker and the pipeline filters that category out, so the provider production runs on was never exercised and two upgrade-path bugs reached it in a row. Nothing covered the whole startup sequence either, with code and schema migrations interleaved the way the migration service orders them.

  • run both database stages through JellyfinMigrationService, against a seeded library and a fresh install
  • take the server from JELLYFIN_TEST_POSTGRES when set, else start a container
  • add a pipeline step running the PostgreSQL tests on every push and pull request, with the server inside the step: the kubernetes backend has no docker daemon, and a service container deadlocks on the workspace volume

Stacked on #6; merge that first.

Every PostgreSQL test carries Category=RequiresDocker and the pipeline filters that category out, so the provider production runs on was never exercised and two upgrade-path bugs reached it in a row. Nothing covered the whole startup sequence either, with code and schema migrations interleaved the way the migration service orders them. - run both database stages through JellyfinMigrationService, against a seeded library and a fresh install - take the server from JELLYFIN_TEST_POSTGRES when set, else start a container - add a pipeline step running the PostgreSQL tests on every push and pull request, with the server inside the step: the kubernetes backend has no docker daemon, and a service container deadlocks on the workspace volume Stacked on #6; merge that first.
unkin-agent added 4 commits 2026-09-12 21:28:28 +10:00
fix(db): materialise the rating list before updating
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
f59ab11c43
MigrateRatingLevels issued an ExecuteUpdate while the SELECT DISTINCT reader
was still open on the same connection. SQLite tolerates that, Npgsql does not,
so the AppInitialisation stage aborted and every PostgreSQL instance
crash-looped on startup.

- read the distinct ratings into a list before the update loop
- cover the migration against a real PostgreSQL, with NULL and empty ratings
ci: probe service containers
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/probe Pipeline was canceled
ad834167d5
test(db): run the startup migration chain against PostgreSQL in CI
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
b501ba9620
Every PostgreSQL test carries Category=RequiresDocker and the pipeline filters
that category out, so the provider production runs on was never exercised and
two upgrade-path bugs reached it in a row. Nothing covered the whole startup
sequence either - code and schema migrations interleaved the way the migration
service orders them.

- run both database stages through JellyfinMigrationService against a seeded
  library and against a fresh install
- take the server from JELLYFIN_TEST_POSTGRES when it is set, else start a
  container
- add a pipeline step that runs the PostgreSQL tests on every push and pull
  request, with the server inside the step: the kubernetes backend has no
  docker daemon, and a service container deadlocks on the workspace volume
unkin-agent added 1 commit 2026-09-12 21:36:10 +10:00
test(db): drop a leftover test database before recreating it
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful
bc42ff4b28
A server handed in through JELLYFIN_TEST_POSTGRES outlives the run, so a second
run finds the databases the first one created. Also name the failures in
Jellyfin.Database.Tests.PostgreSQL the CI step steps around.
benvin merged commit 25269263ce into main 2026-09-12 22:22:13 +10:00
benvin deleted branch benvin/ci-postgres-migration-chain 2026-09-12 22:22:13 +10:00
Sign in to join this conversation.