o-nikolas commented on code in PR #75998:
URL: https://github.com/apache/airflow/pull/75998#discussion_r4460490529
##########
task-sdk/src/airflow/sdk/execution_time/context.py:
##########
@@ -205,6 +206,15 @@ async def _amask_connection_secrets(conn: Connection) ->
None:
"_preset_connections", default=None
)
+# A plain global rather than a ContextVar, so threads started by task code see
it too.
+_current_team_name: str | None = None
Review Comment:
Good point. Venv tasks already got the global value before this PR, so it
isn't a regression, but it's easy to close here. I'll have
set_current_team_name also put the team in an env var and read it back in
reinit_supervisor_comms, so a venv child that inherits the environment gets it.
With inherit_env=False the child doesn't get the AIRFLOW_VAR_* vars either, so
I'd leave the provider side alone unless you think it's worth it. Also, this is
best effort since of course tasks can reset these env vars
--
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]