From: Arran Cudbard-Bell Date: Fri, 15 May 2026 20:41:04 +0000 (-0600) Subject: cleanup: also delete cancelled diagnosis runs X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd7b82dfeb047cf3ede8613ccf9165ced3009447;p=thirdparty%2Ffreeradius-server.git cleanup: also delete cancelled diagnosis runs When several CI workflows fail on the same commit, the diagnosis concurrency group queues their runs and any pending duplicates get cancelled by GitHub. Those have conclusion=cancelled (not skipped) so they were slipping past the cleanup. Include them. --- diff --git a/.github/workflows/cleanup-skipped-diagnosis-runs.yml b/.github/workflows/cleanup-skipped-diagnosis-runs.yml index fa9cd3388ba..f65eca5daca 100644 --- a/.github/workflows/cleanup-skipped-diagnosis-runs.yml +++ b/.github/workflows/cleanup-skipped-diagnosis-runs.yml @@ -11,6 +11,12 @@ name: Cleanup Skipped Diagnosis Runs # diagnosis itself broke, successes pair with the commit comment # they posted). # +# Cancelled diagnosis runs also pile up: when several CI workflows +# fail on the same commit, the concurrency group queues their +# diagnoses and any pending duplicates get cancelled. Those are +# noise too - the diagnosis was never going to add anything beyond +# what the run that did execute already posted - so delete them. +# # This cleanup workflow's own successful runs are just noise after # they've done their job - delete those too. Failures stay so we can # see if the cleanup itself has broken. @@ -30,7 +36,7 @@ jobs: actions: write # required to delete workflow runs steps: - - name: Delete skipped Claude CI Failure Diagnosis runs + - name: Delete skipped and cancelled Claude CI Failure Diagnosis runs env: GH_TOKEN: ${{ github.token }} REPO: ${{ github.repository }} @@ -44,14 +50,16 @@ jobs: exit 0 fi - gh api --paginate \ - "/repos/$REPO/actions/workflows/$WORKFLOW_ID/runs?status=skipped&per_page=100" \ - --jq '.workflow_runs[].id' \ - | while read -r id; do - [ -z "$id" ] && continue - gh api -X DELETE "/repos/$REPO/actions/runs/$id" >/dev/null 2>&1 || \ - echo " $id: delete failed" - done + for status in skipped cancelled; do + gh api --paginate \ + "/repos/$REPO/actions/workflows/$WORKFLOW_ID/runs?status=$status&per_page=100" \ + --jq '.workflow_runs[].id' \ + | while read -r id; do + [ -z "$id" ] && continue + gh api -X DELETE "/repos/$REPO/actions/runs/$id" >/dev/null 2>&1 || \ + echo " $id: delete failed" + done + done - name: Self-clean - delete successful and skipped runs of this workflow env: