amoghrajesh commented on code in PR #68213:
URL: https://github.com/apache/airflow/pull/68213#discussion_r3381595339


##########
task-sdk/src/airflow/sdk/bases/resumablejobmixin.py:
##########
@@ -101,41 +107,70 @@ def execute_resumable(self, context: Context) -> Any:
         Closing this window would require atomic "submit + persist", which is 
not possible across
         an external system boundary.
         """
-        task_store = context.get("task_store")
-
-        if task_store is None:
-            self.log.warning("task_store not available in context, crash 
recovery is disabled for this run")
-        else:
-            external_id = task_store.get(self.external_id_key)
-            if external_id:
-                status = self.get_job_status(external_id, context)
-                if self.is_job_active(status):
-                    self.log.info(
-                        "Reconnecting to existing job",
-                        external_id_key=self.external_id_key,
-                        external_id=external_id,
-                        status=status,
-                    )
-                    return self.poll_until_complete(external_id, context)
-                if self.is_job_succeeded(status):
-                    self.log.info(
-                        "Job already completed successfully, skipping 
resubmission",
-                        external_id_key=self.external_id_key,
-                        external_id=external_id,
-                    )
-                    return self.get_job_result(external_id, context)
+        operator_tag = {"operator": type(self).__name__}
+        reconnect_to: Any = None
+        already_succeeded_id: Any = None

Review Comment:
   Good call, added `resumable_job.already_succeeded` counter for consistency.



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