Skip to content

Blue/green criteria 3 and 4: the expand case, and the preflight refusal (both need a release on main) #813

Not planned

Description

@athvin

Split out of #656, whose criteria 1 and 2 (zero-downtime cutover, and
rollback) were measured and proven in #811 — 116 and 98 requests across two
cutovers with zero non-2xx, plus scripts/ci/bluegreen-acceptance.sh to re-run
them. The two remaining criteria were split because neither can be exercised
from a branch
, which #656 did not anticipate.

Why they could not be done with the others

images.yml is push: branches: [main] with a paths: filter, and deploy.yml
fires on workflow_run after it succeeds. There is no branch path to a ci
deploy at all, so both remaining criteria need a release merged to main.

3. The expand case

A release that adds a nullable column, proving the old colour keeps serving
correctly against an ahead store. er-server migrate --plan on the old
digest must report ahead, not breaking.

This is the property the whole blue/green design rests on — er-entity-diff's
third verdict, and E011 forbidding SELECT * anywhere — and it has only ever
been tested at the unit/e2e layer.

Do not invent a throwaway column for it. Adding one to the product catalog
purely to exercise a deploy path leaves a test artefact in the real schema.
Instead, ride along with the next genuine additive migration: when an
entity.yaml next gains a nullable column, run the exercise on that release and
record it here. The thing to capture is er-server migrate --plan from the
old digest reporting ahead, and the old colour still serving 2xx while the
store is ahead of it.

  • attach to the next real additive migration
  • migrate --plan on the old digest reports ahead, not breaking
  • old colour serves 2xx throughout, measured with bluegreen-acceptance.sh

4. The negative path — needs a scheduled window

Push a branch that retypes a column and confirm the preflight refuses and
deploys nothing
— live colour untouched, no hook run, no DDL written.

Two things make this more invasive than it reads, both established while doing
#656:

  1. A branch cannot reach the preflight (above), so this needs the breaking
    change on main.
  2. The PR gate cannot catch it first, by design. The preflight is the
    er-schema-migrate hook running er-server migrate --expect-additive, which
    compares the compiled catalog against a live store. make check has no
    Postgres — that is make check-e2e — so a retype is self-consistent in the
    catalog and passes the PR gate cleanly. The refusal can only happen at deploy.

So the test necessarily leaves main carrying a schema change whose deploy
refuses, until it is reverted. That blocks the shared dev deploy path for every
other session in the meantime.

Therefore: schedule it. Pick a window with no other PRs in flight, land the
retype, confirm the refusal and that the live colour is untouched with no ledger
row written (pg_reconcile.rs:169 asserts the same property at the unit layer),
then revert immediately. Announce before and after.

  • a window agreed, with no other PRs in flight
  • preflight refuses; live colour untouched; no hook run; no DDL written
  • reverted, and main's deploy path confirmed healthy again

Worth considering instead

If the disruption is not worth it, the alternative is to prove the refusal at a
layer that needs no live deploy — an e2e test that stands up a store, points a
compiled catalog with a retype at it, and asserts migrate --expect-additive
exits non-zero having written nothing. That tests the same mechanism without
taking the shared deploy path down, and it would run on every PR rather than
once. Decide which before starting.

Activity

  1. added
    ci-backlog
    on Nov 7, 2026
  2. added
    pruned
    on Nov 27, 2026
  3. athvin commented on Nov 27, 2026

    @athvin
    OwnerAuthor

    Closed in the 2026-11-26 board prune. The board now targets a deduplication tool that works the same whatever the data's source. This card is speculative or process upkeep, so it isn't needed for that. It's labelled pruned and can be reopened if it becomes relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ci-backlogpruned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions