AutomationDev85 commented on code in PR #61066:
URL: https://github.com/apache/airflow/pull/61066#discussion_r2730546658
##########
task-sdk/tests/task_sdk/execution_time/test_task_runner.py:
##########
@@ -2206,6 +2207,20 @@ def test_get_first_reschedule_date(
context = runtime_ti.get_template_context()
assert runtime_ti.get_first_reschedule_date(context=context) ==
expected_date
+ def test_set_task_instance_note(self, create_runtime_ti,
mock_supervisor_comms):
+ """Test that the first reschedule date is fetched from the
Supervisor."""
+ task = BaseOperator(task_id="test_task")
+ dag_id = "test_dag"
+ runtime_ti = create_runtime_ti(task=task, dag_id=dag_id,
logical_date=timezone.datetime(2025, 1, 2))
+
+ runtime_ti.set_task_instance_note(note="This is a test note.")
Review Comment:
Thanks for your feedback! In Airflow 2 there was no interface out of the
box, but by using the direct DB access it was no problem to write a note from
the operator and show it to the user and we would like to enable this as
official feature in Airflow 3.
The main objective is to provide less experienced users—who may struggle to
quickly identify issues in log files—with helpful hints about what went wrong
during task execution.
--
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]