• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / storage / 37605299303
85%

Build:
DEFAULT BRANCH: master
Ran 07 Oct 2026 10:09AM UTC
Jobs 2
Files 318
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Oct 2026 10:07AM UTC coverage: 84.939% (+0.03%) from 84.911%
37605299303

push

github

web-flow
fix: treat an unrecognized tenant migration as ahead (#1483)

## What kind of change does this PR introduce?

Bug fix. Replaces #1403 with a smaller change.

## What is the current behavior?

When a tenant's `migrations_version` is a name this binary doesn't know,
`DBMigration[name]` is `undefined` and the tenant looks behind. This
happens when a newer release has already migrated the tenant, for
example during a rolling deploy or after a rollback. The old pod re-runs
migrations, writes its own older version over the newer one, and turns
off features for that tenant.

In PROGRESSIVE mode both releases share the migrations queue. An old
worker that picks up a job whose `upToMigration` it doesn't have throws,
then marks the tenant FAILED and later FAILED_STALE.

## What is the new behavior?

A version the binary doesn't know is treated as ahead.

- `getTenantConfig` reports it as the newest migration this binary knows
and sets `migrationVersionAhead`. `areMigrationsUpToDate` returns `true`
for these tenants.
- Migration state writes only apply when the stored version is null,
empty or known, so an old pod can't rewind a newer one. If the write
matches no row, the pod drops its cached config and logs it.
`resetMigration` still writes unguarded.
- The fleet listing skips tenants with an unknown version.
- Migration jobs with an unknown `upToMigration`, and reset jobs with an
unknown `untilMigration` or `markCompletedTillMigration`, fail without
touching tenant state. pg-boss retries them so a worker on the newer
release can pick them up. Before, an old worker would record a reset it
never applied.

Nothing new runs on the request path, and tenants with a null version
behave as before. This should ship before any PR that adds a migration.

## Additional context

Not covered: restored databases whose control row is ahead of the
schema, a compare-and-swap on `database_url`, and two branches using the
same migration number. During a rollout an old pod can sti... (continued)

7170 of 8973 branches covered (79.91%)

Branch coverage included in aggregate %.

29 of 29 new or added lines in 6 files covered. (100.0%)

12789 of 14525 relevant lines covered (88.05%)

781.81 hits per line

Jobs
ID Job ID Ran Files Coverage
1 rest-pg18 - 37605299303.1 07 Oct 2026 10:13AM UTC 298
62.15
GitHub Action Run
2 unit - 37605299303.2 07 Oct 2026 10:09AM UTC 312
65.64
GitHub Action Run
Source Files on build 37605299303
  • Tree
  • List 318
  • Changed 7
  • Source Changed 6
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #37605299303
  • b8e2581e on github
  • Prev Build on master (#37597787634)
  • Next Build on master (#37612874185)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc