mhenc commented on code in PR #29513:
URL: https://github.com/apache/airflow/pull/29513#discussion_r1109663644


##########
airflow/models/taskinstance.py:
##########
@@ -1207,9 +1208,11 @@ def get_dagrun(self, session: Session = NEW_SESSION) -> 
DagRun:
 
         return dr
 
+    @staticmethod
+    @internal_api_call
     @provide_session
     def check_and_change_state_before_execution(
-        self,
+        ti: TaskInstance,

Review Comment:
   Definately there are some missing parts in serialization (that's why I work 
on https://github.com/apache/airflow/pull/29355)
   Just a note, even with my PR merged, we should rather avoid passing 
TaskInstance client->Internal API. 
   As I said in the description: the SQL Alchemy state is not serializable, so 
the TaskInstance object that we will get in InternalAPI will not be fully 
functional with SQL Alchemy (e.g. for `session.merge`). 
   I am not sure if we can any solution other that introducing new DTO for it, 
but that would require a lot of changes in the whole codebase.



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