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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
