Skip to content

Commit c8a0e07

Browse files
author
abs2023
committed
fix(cicd): allow skipped Deploy-to-Morpheus-P-Node to satisfy C-Node deploy needs
Root cause of the first v7 test-branch run (GH Actions run 24796856145): the drain job ran and deregistered the dev C-Node from both NLB target groups, then Deploy-to-Morpheus-C-Node was silently skipped because its implicit success() guard propagated the skip from Deploy-to-Morpheus-P-Node (which is main-only and intentionally skips on test pushes). That left dev with the old C-Node task running in ECS but with no load-balancer membership until we manually re-registered it. Fix: - Add an explicit `if` to Deploy-to-Morpheus-C-Node that: - Requires GHCR build + drain success. - Accepts Deploy-to-Morpheus-P-Node.result in {success, skipped}. - Wraps in `!cancelled()` so manual cancels still short-circuit. - Rewrite the inline comment that previously (incorrectly) claimed skipped jobs are treated as successful for dependency resolution; they are not. No change to the deploy logic itself, the drain job, or any other workflow sequencing. This is a pure `needs` / guard correctness fix. Made-with: Cursor
1 parent 68e39db commit c8a0e07

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,18 +1297,32 @@ jobs:
12971297
12981298
Deploy-to-Morpheus-C-Node:
12991299
name: Deploy to Morpheus Consumer via GitHub
1300+
# NOTE on `needs` + skipped dependencies:
1301+
# GitHub Actions' default job condition is implicit `success()`, which returns
1302+
# false when ANY needed job was skipped. P-Node is main-only (see its own `if`),
1303+
# so on a `test` deploy `Deploy-to-Morpheus-P-Node` is always skipped. Without
1304+
# an explicit `if` that tolerates that skip, the C-Node deploy gets skipped
1305+
# too — which is exactly what bit us on the first v7 test run: the drain job
1306+
# ran and deregistered the C-Node, then the actual deploy silently skipped,
1307+
# leaving dev without a replacement task.
1308+
#
1309+
# This `if` explicitly allows the skipped P-Node outcome, while still gating
1310+
# on drain + GHCR success and requiring we're on a deploy-eligible branch.
1311+
# `!cancelled()` keeps the guard working if a user cancels mid-run.
13001312
if: |
1313+
!cancelled() &&
13011314
github.repository == 'MorpheusAIs/Morpheus-Lumerin-Node' &&
1315+
needs.GHCR-Build-and-Push.result == 'success' &&
1316+
needs.Drain-Morpheus-C-Node.result == 'success' &&
1317+
(needs.Deploy-to-Morpheus-P-Node.result == 'success' || needs.Deploy-to-Morpheus-P-Node.result == 'skipped') &&
13021318
(
1303-
(github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/test'))||
1319+
(github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/test')) ||
13041320
(github.event_name == 'workflow_dispatch' && github.event.inputs.build_all_os == 'true' && github.event.inputs.create_deployment == 'true')
13051321
)
13061322
needs:
13071323
- Generate-Tag
13081324
- GHCR-Build-and-Push
13091325
- Drain-Morpheus-C-Node
1310-
# P-Node is main-only; on test this job is skipped and the `needs` is still
1311-
# satisfied (skipped jobs are treated as successful for dependency resolution).
13121326
- Deploy-to-Morpheus-P-Node
13131327
runs-on: ubuntu-latest
13141328
environment: ${{ github.ref_name }}

0 commit comments

Comments
 (0)