You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a CI run is cancelled (e.g., superseded by a newer push), status
jobs were incorrectly reporting "build failed" because the outcome was
empty/cancelled rather than success. Now all status jobs check for
cancelled state and exit cleanly without error annotations or artifact
uploads. Also updated ci-failure-comment.yml to only trigger on actual
failures, not cancelled runs.
Copy file name to clipboardExpand all lines: .github/workflows/linux-build-base.yml
+33-5Lines changed: 33 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -328,8 +328,12 @@ jobs:
328
328
name: "BUILD: Linux release with adapters"
329
329
steps:
330
330
- run: |
331
+
if [[ -z "$BUILD_OUTCOME" || "$BUILD_OUTCOME" == "cancelled" ]]; then
332
+
echo "Build was cancelled (likely superseded by a newer push). Skipping."
333
+
exit 0
334
+
fi
331
335
if [[ "$BUILD_OUTCOME" != "success" ]]; then
332
-
echo "::error::Linux adapters release build failed or was cancelled. Do not land this PR until the build is fixed."
336
+
echo "::error::Linux adapters release build failed. Do not land this PR until the build is fixed."
333
337
exit 1
334
338
fi
335
339
echo "Build succeeded."
@@ -366,10 +370,18 @@ jobs:
366
370
name: "TEST: Linux release with adapters"
367
371
steps:
368
372
- run: |
373
+
if [[ -z "$BUILD_OUTCOME" || "$BUILD_OUTCOME" == "cancelled" ]]; then
374
+
echo "Run was cancelled (likely superseded by a newer push). Skipping."
375
+
exit 0
376
+
fi
369
377
if [[ "$BUILD_OUTCOME" != "success" ]]; then
370
-
echo "::error::Build failed or was cancelled — tests did not run. Check the 'Linux release with adapters' build job for compiler errors and build logs."
378
+
echo "::error::Build failed — tests did not run. Check the 'Linux release with adapters' build job for compiler errors and build logs."
371
379
exit 1
372
380
fi
381
+
if [[ -z "$TEST_OUTCOME" || "$TEST_OUTCOME" == "cancelled" ]]; then
382
+
echo "Tests were cancelled (likely superseded by a newer push). Skipping."
383
+
exit 0
384
+
fi
373
385
if [[ "$TEST_OUTCOME" != "success" ]]; then
374
386
if [[ -n "$FAILED_CASES" ]]; then
375
387
CASE_LIST=$(echo "$FAILED_CASES" | sed 's/^/ - /')
@@ -663,8 +675,12 @@ jobs:
663
675
name: "BUILD: Ubuntu debug with system dependencies"
664
676
steps:
665
677
- run: |
678
+
if [[ -z "$BUILD_OUTCOME" || "$BUILD_OUTCOME" == "cancelled" ]]; then
679
+
echo "Build was cancelled (likely superseded by a newer push). Skipping."
680
+
exit 0
681
+
fi
666
682
if [[ "$BUILD_OUTCOME" != "success" ]]; then
667
-
echo "::error::Ubuntu debug build failed or was cancelled. Do not land this PR until the build is fixed."
683
+
echo "::error::Ubuntu debug build failed. Do not land this PR until the build is fixed."
668
684
exit 1
669
685
fi
670
686
echo "Build succeeded."
@@ -701,10 +717,18 @@ jobs:
701
717
name: "TEST: Ubuntu debug with system dependencies"
702
718
steps:
703
719
- run: |
720
+
if [[ -z "$BUILD_OUTCOME" || "$BUILD_OUTCOME" == "cancelled" ]]; then
721
+
echo "Run was cancelled (likely superseded by a newer push). Skipping."
722
+
exit 0
723
+
fi
704
724
if [[ "$BUILD_OUTCOME" != "success" ]]; then
705
-
echo "::error::Build failed or was cancelled — tests did not run. Check the 'Ubuntu debug with system dependencies' build job for compiler errors and build logs."
725
+
echo "::error::Build failed — tests did not run. Check the 'Ubuntu debug with system dependencies' build job for compiler errors and build logs."
706
726
exit 1
707
727
fi
728
+
if [[ -z "$TEST_OUTCOME" || "$TEST_OUTCOME" == "cancelled" ]]; then
729
+
echo "Tests were cancelled (likely superseded by a newer push). Skipping."
730
+
exit 0
731
+
fi
708
732
if [[ "$TEST_OUTCOME" != "success" ]]; then
709
733
if [[ -n "$FAILED_CASES" ]]; then
710
734
CASE_LIST=$(echo "$FAILED_CASES" | sed 's/^/ - /')
@@ -881,8 +905,12 @@ jobs:
881
905
name: "BUILD: Fedora debug"
882
906
steps:
883
907
- run: |
908
+
if [[ -z "$BUILD_OUTCOME" || "$BUILD_OUTCOME" == "cancelled" ]]; then
909
+
echo "Build was cancelled (likely superseded by a newer push). Skipping."
910
+
exit 0
911
+
fi
884
912
if [[ "$BUILD_OUTCOME" != "success" ]]; then
885
-
echo "::error::Fedora debug build failed or was cancelled. Do not land this PR until the build is fixed."
913
+
echo "::error::Fedora debug build failed. Do not land this PR until the build is fixed."
0 commit comments