You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/02/05 07:06:32 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #29355: AIP-44 Support TaskInstance serialization/deserialization.

uranusjr commented on code in PR #29355:
URL: https://github.com/apache/airflow/pull/29355#discussion_r1096633749


##########
airflow/models/taskinstance.py:
##########
@@ -448,21 +448,30 @@ class TaskInstance(Base, LoggingMixin):
     note = association_proxy("task_instance_note", "content", creator=_creator_note)
     task: Operator  # Not always set...
 
-    def __init__(
-        self,
+    @staticmethod
+    def from_task(

Review Comment:
   I like this, but this may not be viable. Creating a TaskInstance out-of-band has historically been used quite pervasively by users, and this could potentially break many installations. We could still do this (especially since we are trying to talk people off calling various Airflow internals anyway), but need to be aware of the possible implications.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org