From 915a2ee299443e84b455764a50249869ef773155 Mon Sep 17 00:00:00 2001 From: enlineawork Date: Tue, 8 Sep 2026 23:02:37 -0300 Subject: [PATCH] ci(f5): include canonical hierarchy migration in rollback gate --- .github/workflows/ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2ad509..d3389af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,12 +138,13 @@ jobs: FROM typeorm_migrations WHERE name IN ( 'F5InventoryPhysicalInstance1790087100000', + 'F5CanonicalInventoryHierarchy1790087150000', 'F5AuthoritativeTerritory1790087200000', 'F5OperationalContextCompatibility1790087250000', 'F5AuthoritativeInventoryCatalog1790087300000' ); - IF f5_migrations <> 4 THEN - RAISE EXCEPTION 'Expected 4 F5 migrations, got %', f5_migrations; + IF f5_migrations <> 5 THEN + RAISE EXCEPTION 'Expected 5 F5 migrations, got %', f5_migrations; END IF; SELECT COUNT(*) INTO real_inventory @@ -183,8 +184,8 @@ jobs: END $$; SQL - # Prove the four F5 migrations are actually reversible on a clean state. - for _ in 1 2 3 4; do + # Prove the five F5 migrations are actually reversible on a clean state. + for _ in 1 2 3 4 5; do docker compose --env-file .env.example --profile tools run --rm migrate npm run migration:revert done @@ -212,7 +213,7 @@ jobs: docker compose --env-file .env.example --profile tools run --rm migrate docker compose --env-file .env.example exec -T db \ psql -v ON_ERROR_STOP=1 -U dhv2_owner -d dhv2 -Atc \ - "SELECT CASE WHEN COUNT(*)=4 THEN 'F5_REAPPLY_OK' ELSE 'F5_REAPPLY_FAILED:'||COUNT(*) END FROM typeorm_migrations WHERE name IN ('F5InventoryPhysicalInstance1790087100000','F5AuthoritativeTerritory1790087200000','F5OperationalContextCompatibility1790087250000','F5AuthoritativeInventoryCatalog1790087300000');" \ + "SELECT CASE WHEN COUNT(*)=5 THEN 'F5_REAPPLY_OK' ELSE 'F5_REAPPLY_FAILED:'||COUNT(*) END FROM typeorm_migrations WHERE name IN ('F5InventoryPhysicalInstance1790087100000','F5CanonicalInventoryHierarchy1790087150000','F5AuthoritativeTerritory1790087200000','F5OperationalContextCompatibility1790087250000','F5AuthoritativeInventoryCatalog1790087300000');" \ | grep -Fx 'F5_REAPPLY_OK' - name: VPS-equivalent isolated API preflight run: |