From d4ee72d729aa63765568c2897d83ea361f34722c Mon Sep 17 00:00:00 2001 From: Masahiro Tanaka Date: Thu, 28 May 2026 13:50:57 -0700 Subject: [PATCH] Stop obsolete CI jobs on workflow cancellation Signed-off-by: Masahiro Tanaka --- .github/workflows/aws-torch-latest-full.yml | 2 +- .github/workflows/cpu-torch-latest.yml | 2 +- .github/workflows/modal-torch-latest.yml | 2 +- .github/workflows/nv-pre-compile-ops.yml | 2 +- .github/workflows/python.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/aws-torch-latest-full.yml b/.github/workflows/aws-torch-latest-full.yml index 5f8b6183f968..64975155e9ee 100644 --- a/.github/workflows/aws-torch-latest-full.yml +++ b/.github/workflows/aws-torch-latest-full.yml @@ -88,7 +88,7 @@ jobs: name: Unit Tests (Full) needs: [check-changes] if: | - always() && + !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-changes.outputs.has_changes == 'true') runs-on: [self-hosted, gpu-ci, gpu-l40s, l40s-4gpu, aws] timeout-minutes: 180 diff --git a/.github/workflows/cpu-torch-latest.yml b/.github/workflows/cpu-torch-latest.yml index 3aaf30bc42ad..b8642dc97197 100644 --- a/.github/workflows/cpu-torch-latest.yml +++ b/.github/workflows/cpu-torch-latest.yml @@ -74,7 +74,7 @@ jobs: unit-tests: name: cpu-torch-latest / unit tests needs: check-paths - if: always() && (needs.check-paths.result != 'success' || needs.check-paths.outputs.should_run == 'true') + if: ${{ !cancelled() && (needs.check-paths.result != 'success' || needs.check-paths.outputs.should_run == 'true') }} runs-on: ubuntu-24.04 env: diff --git a/.github/workflows/modal-torch-latest.yml b/.github/workflows/modal-torch-latest.yml index ffa5ef9c8a0f..ee8311c21504 100644 --- a/.github/workflows/modal-torch-latest.yml +++ b/.github/workflows/modal-torch-latest.yml @@ -96,7 +96,7 @@ jobs: runs-on: ubuntu-latest needs: collect-tests - if: always() && (github.event_name == 'workflow_dispatch' || needs.collect-tests.result != 'success' || needs.collect-tests.outputs.deepspeed == 'true') + if: ${{ !cancelled() && (github.event_name == 'workflow_dispatch' || needs.collect-tests.result != 'success' || needs.collect-tests.outputs.deepspeed == 'true') }} steps: - name: Fail if path filter failed if: github.event_name != 'workflow_dispatch' && needs.collect-tests.result != 'success' diff --git a/.github/workflows/nv-pre-compile-ops.yml b/.github/workflows/nv-pre-compile-ops.yml index 1f369755775b..0e002aed6a55 100644 --- a/.github/workflows/nv-pre-compile-ops.yml +++ b/.github/workflows/nv-pre-compile-ops.yml @@ -47,7 +47,7 @@ jobs: unit-tests: name: nv-pre-compile-ops / precompile ops needs: check-paths - if: always() && (needs.check-paths.result != 'success' || needs.check-paths.outputs.should_run == 'true') + if: ${{ !cancelled() && (needs.check-paths.result != 'success' || needs.check-paths.outputs.should_run == 'true') }} runs-on: ubuntu-24.04 container: image: nvidia/cuda:12.6.3-devel-ubuntu22.04 diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index f9fe1fbf7854..b8a89181293c 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -45,7 +45,7 @@ jobs: unit-tests: name: python / install smoke (Python ${{ matrix.pyVersion }}) needs: check-paths - if: always() + if: ${{ !cancelled() }} strategy: matrix: pyVersion: ["3.10", "3.11", "3.12"]