Handle triggerer cross-loop connection fallback (#64213)#64282
Closed
deepujain wants to merge 1 commit intoapache:mainfrom
Closed
Handle triggerer cross-loop connection fallback (#64213)#64282deepujain wants to merge 1 commit intoapache:mainfrom
deepujain wants to merge 1 commit intoapache:mainfrom
Conversation
Contributor
Author
|
Pushed a targeted Task SDK fix for the triggerer cross-loop RuntimeError path, plus regression coverage for both RuntimeError variants. Ruff checks and the focused |
Contributor
Author
|
duplicate of #64238. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title: Handle triggerer cross-loop connection RuntimeError in Task SDK (#64213)
Summary
The Task SDK connection backend now treats the triggerer worker-thread cross-loop
RuntimeErrorthe same way it already treats the existing AsyncToSync event-loop error, so deferrable AWS hooks can keep resolving connections instead of silently falling back to empty credentials.Changes
task-sdk/src/airflow/sdk/execution_time/secrets/execution_api.py-- broadened the greenback fallback gate to recognize the cross-loopFuture attached to a different looperror in addition to the existing AsyncToSync event-loop message.task-sdk/tests/task_sdk/execution_time/test_secrets.py-- extended the regression test to cover both runtime-error variants and verify the greenback fallback still returns the expected connection.Test plan
uv run --project task-sdk ruff check task-sdk/src/airflow/sdk/execution_time/secrets/execution_api.py task-sdk/tests/task_sdk/execution_time/test_secrets.pyuv run --project task-sdk ruff format --check task-sdk/src/airflow/sdk/execution_time/secrets/execution_api.py task-sdk/tests/task_sdk/execution_time/test_secrets.pyuv run --project task-sdk pytest task-sdk/tests/task_sdk/execution_time/test_secrets.py -xvsFixes #64213