This is an automated email from the ASF dual-hosted git repository.
amoghdesai pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new d2d91e69414 Log rtif overwrite error with simpler context (#63705)
d2d91e69414 is described below
commit d2d91e69414abb6d9aa7edd5852f93ca29479129
Author: Amogh Desai <[email protected]>
AuthorDate: Tue Mar 17 12:37:20 2026 +0530
Log rtif overwrite error with simpler context (#63705)
---
task-sdk/src/airflow/sdk/execution_time/task_runner.py | 6 +++++-
task-sdk/tests/task_sdk/execution_time/test_task_runner.py | 4 ++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/task-sdk/src/airflow/sdk/execution_time/task_runner.py
b/task-sdk/src/airflow/sdk/execution_time/task_runner.py
index e26344a81e5..611c4fc28ec 100644
--- a/task-sdk/src/airflow/sdk/execution_time/task_runner.py
+++ b/task-sdk/src/airflow/sdk/execution_time/task_runner.py
@@ -1765,7 +1765,11 @@ def finalize(
try:
SUPERVISOR_COMMS.send(SetRenderedFields(rendered_fields=_serialize_rendered_fields(ti.task)))
except Exception:
- log.exception("Failed to set rendered fields during
finalization", ti=ti, task=ti.task)
+ log.exception(
+ "Failed to set rendered fields during finalization",
+ task_id=ti.task_id,
+ dag_id=ti.dag_id,
+ )
log.debug("Running finalizers", ti=ti)
if state == TaskInstanceState.SUCCESS:
diff --git a/task-sdk/tests/task_sdk/execution_time/test_task_runner.py
b/task-sdk/tests/task_sdk/execution_time/test_task_runner.py
index 37d3963146b..47de56c384f 100644
--- a/task-sdk/tests/task_sdk/execution_time/test_task_runner.py
+++ b/task-sdk/tests/task_sdk/execution_time/test_task_runner.py
@@ -2337,8 +2337,8 @@ class TestRuntimeTaskInstance:
mock_log.exception.assert_called_once_with(
"Failed to set rendered fields during finalization",
- ti=runtime_ti,
- task=task,
+ task_id=runtime_ti.task_id,
+ dag_id=runtime_ti.dag_id,
)
@pytest.mark.parametrize(