potiuk commented on code in PR #60494:
URL: https://github.com/apache/airflow/pull/60494#discussion_r2710609200


##########
airflow-core/docs/public-airflow-interface.rst:
##########
@@ -195,6 +195,13 @@ Task Instances
 
 Task instances are the individual runs of a single task in a Dag (in a Dag 
Run). Task instances are accessed through
 the Task Context via :func:`~airflow.sdk.get_current_context`. Direct database 
access is not possible.
+The supported public interface for task instance data is provided by the Task 
SDK.
+Specifically, the Task Context implements
+:class:`airflow.sdk.types.RuntimeTaskInstanceProtocol`, which defines the 
stable,
+supported API for accessing runtime task instance metadata and helpers.
+
+Direct use of :class:`airflow.models.taskinstance.TaskInstance` is not part of 
the

Review Comment:
   I would rewrite it - models are ORM classes that are - in general not 
accessible to tasks - so it's not even "not guaranteed" - it's simply "should 
not be ever used".



##########
airflow-core/docs/public-airflow-interface.rst:
##########
@@ -195,6 +195,13 @@ Task Instances
 
 Task instances are the individual runs of a single task in a Dag (in a Dag 
Run). Task instances are accessed through
 the Task Context via :func:`~airflow.sdk.get_current_context`. Direct database 
access is not possible.
+The supported public interface for task instance data is provided by the Task 
SDK.
+Specifically, the Task Context implements
+:class:`airflow.sdk.types.RuntimeTaskInstanceProtocol`, which defines the 
stable,
+supported API for accessing runtime task instance metadata and helpers.
+
+Direct use of :class:`airflow.models.taskinstance.TaskInstance` is not part of 
the

Review Comment:
   I would rewrite it - models are ORM classes that are - in general not 
accessible to tasks - so it's not even "not guaranteed" - it's simply "should 
not be ever used".



##########
airflow-core/docs/public-airflow-interface.rst:
##########
@@ -195,6 +195,13 @@ Task Instances
 
 Task instances are the individual runs of a single task in a Dag (in a Dag 
Run). Task instances are accessed through
 the Task Context via :func:`~airflow.sdk.get_current_context`. Direct database 
access is not possible.
+The supported public interface for task instance data is provided by the Task 
SDK.
+Specifically, the Task Context implements
+:class:`airflow.sdk.types.RuntimeTaskInstanceProtocol`, which defines the 
stable,
+supported API for accessing runtime task instance metadata and helpers.
+
+Direct use of :class:`airflow.models.taskinstance.TaskInstance` is not part of 
the

Review Comment:
   I would rewrite it - models are ORM classes that are - in general not 
accessible to tasks - so it's not even "not guaranteed" - it's simply "should 
not be ever used".



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