potiuk commented on code in PR #75578:
URL: https://github.com/apache/airflow/pull/75578#discussion_r4368533168


##########
.github/workflows/ci-amd.yml:
##########
@@ -1508,12 +1515,18 @@ jobs:
       - tests-with-lowest-direct-resolution-providers
     runs-on: ["ubuntu-slim"]
     steps:
-      - name: "Fail if any CI job failed or was cancelled"
-        if: contains(needs.*.result, 'failure') || contains(needs.*.result, 
'cancelled')
+      - name: "Fail if any CI job failed"
+        if: contains(needs.*.result, 'failure')
         run: |
-          echo "At least one CI job failed or was cancelled."
+          echo "At least one CI job failed."
           exit 1
+      - name: "Report that CI jobs were cancelled"
+        if: contains(needs.*.result, 'cancelled')

Review Comment:
   Good catch, thanks. A job that hits its timeout comes back as `cancelled` in 
`needs`, so this change would have turned a hung job into a passing check. 
Fixed in 7fc2cbfed1, along the lines you suggested: the gate fails when a job 
was cancelled but the run itself was not (`!cancelled()`), and the "run 
cancelled" summary step runs only when the run itself was cancelled. As you 
noted, a timed-out job still shows the "(run cancelled)" name, because a job's 
`name` can't check whether the run was cancelled. The workflow comment and the 
dev README now say so.
   
   One related fix in 91346fa281: `notify-slack` didn't depend on the gate job. 
When a timeout is the only failure, the gate is the only failed job, and the 
Slack step could read the job list before the gate finished and miss it. It now 
waits for `ci-passed`.
   
   ---
   Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to