abhijeets25012-tech commented on code in PR #76184:
URL: https://github.com/apache/airflow/pull/76184#discussion_r4480538757


##########
airflow-core/src/airflow/executors/base_executor.py:
##########
@@ -930,6 +930,7 @@ def run_workload(
                 dag_rel_path=workload.dag_rel_path,
                 log_path=workload.log_path,
                 bundle_info=workload.bundle_info,
+                team_name=workload.team_name,

Review Comment:
   Agreed — fixed. `team_name` is now only passed when `workload.team_name` is 
set (77c56a7), the same way `callback_kwargs_encoding` is handled, so a 
team-less callback runs on any Task SDK and a team callback on an SDK without 
the argument fails loudly instead of silently reading the global value.
   
   I also added regression tests in fc46b0d:
   - `test_run_workload_passes_team_name_to_callback_supervisor`
   - `test_run_workload_omits_team_name_for_callback_without_team` — this one 
fails against the unconditional pass.
   
   Verified that Task SDK 1.4.0rc1's `supervise_callback` has no `team_name`, 
while its `supervise_connection_test` already does, so the connection-test call 
needs no change.
   
   Checks: `test_base_executor.py` 123 passed; `test_workloads.py` + 
`test_local_executor.py` 109 passed, 3 skipped (pre-existing non-fork 
start-method skips); ruff check/format clean; `mypy-airflow-core` hook clean.



-- 
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