You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "manipatnam (via GitHub)" <gi...@apache.org> on 2026/06/03 04:45:26 UTC

[PR] Upload task logs even when final state update fails [airflow]

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

   When a task subprocess exits, the supervisor first updates the task's terminal state and then uploads the remote logs. If the state update raised (for example, a transient API error talking to the API server), the log upload was skipped entirely — yet a failed state update is exactly when the logs are most needed for debugging.
   
   This moves the `_upload_logs()` call into a `finally` block so logs are always uploaded, while the original state-update exception still propagates to the caller. `_upload_logs()` already swallows and logs its own errors, so the `finally` cannot mask the state-update failure.
   
   Added a test (`test_logs_uploaded_even_when_state_update_fails`) covering: state update raises → logs still uploaded → original exception propagates.
   
   (task-sdk change; ships in airflow-core.)
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.8)
   
   Generated-by: Claude Code (Opus 4.8) 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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Upload task logs even when final state update fails [airflow]

Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil merged PR #67935:
URL: https://github.com/apache/airflow/pull/67935


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org