jingi723 opened a new pull request, #77033: URL: https://github.com/apache/airflow/pull/77033
When remote log upload fails, `ActivitySubprocess._upload_logs()` reports the error through the task logger. If that logger also raises, for example from a failing structlog processor, the second exception escapes `wait()`. It can replace a successful subprocess exit or hide the original state-update exception. Keep reporting upload errors to the task log first, and fall back to the supervisor logger if that reporting fails. Two regression cases exercise `wait()` with a real failing structlog processor: successful completion and an existing state-update error. This follows up on #65308 and #67935. Validation on macOS ARM64 / Python 3.13.14, based on `a81cfb7ac980d4b72a80765f076b51aa8fe124ad`: - Both new cases fail before the change and pass afterward. - Regular and manual prek checks pass, including Task SDK mypy. - The full supervisor module has 373 passed, 4 failed, and 8 skipped locally. The same four failures also occur without the fix: three fresh-interpreter tests lose the plugin fixture on macOS, and one test requires the uninstalled Amazon provider. Five skips require that provider; three require Linux. - The Breeze image build was stopped before tests ran. The full Linux SDK/core/provider/docs checks selected by `breeze verify` remain unverified, so this PR is a draft. Successful-upload wrapper microbenchmark, with no-op upload dependencies and an unchanged control; medians of three alternating base/head runs, 200,000 calls per run: | Path | Before | After | Change | | --- | ---: | ---: | ---: | | `_upload_logs()` | 293.2 ns | 296.6 ns | +1.2% | | Unchanged control | 342.7 ns | 342.2 ns | -0.1% | The measured increase is about 3.5 ns per completed task in this isolated wrapper benchmark; it does not measure remote-service performance. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Codex (GPT-6) Generated-by: Codex (GPT-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]
