From 9bf5868723bf7d1e098f18d42e63729890d280bf Mon Sep 17 00:00:00 2001 From: Paulo Date: Sun, 26 Jul 2026 14:39:32 +0200 Subject: [PATCH] Pipeline runs are ship.build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rename revision swapped the kind prefix, so build.build_workflow became ship.build_workflow — but the workflow class is Build now, and its kind is ship.build. Nothing matches the old spelling: a pre-rename run falls out of its subject's timeline, and a PR merging on one finds no parked run to cancel. --- ...1f0ab7d2e9_pipeline_runs_are_ship_build.py | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 backend/migrations/versions/4c1f0ab7d2e9_pipeline_runs_are_ship_build.py diff --git a/backend/migrations/versions/4c1f0ab7d2e9_pipeline_runs_are_ship_build.py b/backend/migrations/versions/4c1f0ab7d2e9_pipeline_runs_are_ship_build.py new file mode 100644 index 00000000..a33c3406 --- /dev/null +++ b/backend/migrations/versions/4c1f0ab7d2e9_pipeline_runs_are_ship_build.py @@ -0,0 +1,31 @@ +"""pipeline runs are ship.build + +Revision ID: 4c1f0ab7d2e9 +Revises: 9b8c7d6e5f4a +Create Date: 2026-07-26 13:00:00.000000 + +""" + +from collections.abc import Sequence + +from alembic import op + +# revision identifiers, used by Alembic. +revision: str = "4c1f0ab7d2e9" +down_revision: str | Sequence[str] | None = "9b8c7d6e5f4a" +branch_labels: str | Sequence[str] | None = None +depends_on: str | Sequence[str] | None = None + + +def upgrade() -> None: + # The workflow class is Build, so its kind is ship.build. The prefix swap in + # 9b8c7d6e5f4a carried the old class name through to ship.build_workflow, which + # matches no registered workflow; both spellings land on the real kind here. + op.execute( + "UPDATE durable_runs SET kind = 'ship.build' " + "WHERE kind IN ('ship.build_workflow', 'build.build_workflow')" + ) + + +def downgrade() -> None: + op.execute("UPDATE durable_runs SET kind = 'ship.build_workflow' WHERE kind = 'ship.build'")