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

   Follow-up to #74147.
   
   `get_async_extra_dejson()` falls back to running `Connection.extra_dejson` 
in a worker thread when `Connection.aextra_dejson()` (Airflow 3.3.2+, #71890) 
is missing. `extra_dejson` masks the extra's secrets with a synchronous send to 
the supervisor, and that is only safe from a worker thread when the supervisor 
channel serializes it against the event loop's in-flight `asend()`:
   
   | Airflow (Task SDK) | Supervisor channel | Path after this PR |
   |---|---|---|
   | 3.3.2+ | — | `await conn.aextra_dejson()` (unchanged) |
   | 3.2 – 3.3.1 (1.2 – 1.3.1) | thread lock + async lock | `extra_dejson` in a 
worker thread (unchanged) |
   | 3.1 (1.1) | `asend()` but **no thread lock** — a worker thread's `send()` 
can interleave with an `asend()` in flight (e.g. several triggers in the 
triggerer) | `json.loads(conn.extra)`, no supervisor call |
   | 3.0 (1.0) | sync only, the triggerer bridges with `async_to_sync` | 
`json.loads(conn.extra)`, no supervisor call |
   | 2.x | no supervisor | `extra_dejson` in a worker thread (unchanged) |
   
   On 3.0 and 3.1 the helper therefore deserializes `Connection.extra` without 
masking its values, which is what async hooks did before the helper existed 
(#55179 for msgraph, #72130 for ADF/Synapse), so callers (#74149, #74150, 
#74161) are never worse off than before on those versions.
   
   Tests cover each branch, patching `AIRFLOW_V_3_0_PLUS` / 
`AIRFLOW_V_3_2_PLUS`; on 3.0/3.1 `extra_dejson` must not be called at all.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Opus 5.5
   
   Generated-by: Claude Opus 5.5 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