potiuk opened a new pull request, #65119:
URL: https://github.com/apache/airflow/pull/65119

   ## Summary
   
   The CI \"Notify Slack\" job (in `ci-amd-arm.yml`, `ci-notification.yml`, 
etc.) never sent the \"all tests passing\" recovery message after a failure was 
fixed. Looking at run [24310256628 / job 
70982878551](https://github.com/apache/airflow/actions/runs/24310256628/job/70982878551),
 the determination step printed:
   
   Root cause: `scripts/ci/slack_notification_state.py` calls `gh api 
repos/.../actions/artifacts -f name=...`. The `gh` CLI defaults to **POST** 
when any `-f`/`-F` parameter is passed, and the artifacts list endpoint returns 
404 on POST. As a result, `download_previous_state()` always returned `None`, 
every run looked like the first run with no prior state, and 
`determine_action([], None)` always returned `\"skip\"` — so `notify_recovery` 
could never trigger.
   
   ## Fix
   
   - Pass `--method GET` explicitly so the `-f` parameters are encoded as query 
string instead of a POST body.
   - Add `scripts/tests/ci/test_slack_notification_state.py` covering:
     - The regression: `download_previous_state` must call `gh api` with 
`--method GET`.
     - The `determine_action` state machine (skip / notify_new / 
notify_recovery / change-of-failures).
   
   Verified the broken call locally returns 404, and the fixed call returns the 
expected artifact metadata.
   
   ## Test plan
   
   - [X] `uv run --project scripts pytest 
scripts/tests/ci/test_slack_notification_state.py -xvs`
   - [ ] Next scheduled `ci-amd-arm.yml` run on `main` should now correctly 
send a recovery notification when a previously-failing run flips to all green.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.6)
   
   Generated-by: Claude Code (Opus 4.6) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
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