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


##########
task-sdk/src/airflow/sdk/bases/resumablejobmixin.py:
##########
@@ -132,12 +151,31 @@ def execute_resumable(self, context: Context) -> Any:
 
         decision = self.get_resume_decision(context)
         if decision.action == "reconnect":
-            return self.poll_until_complete(decision.external_id, context)
+            self._record_try(context, DurableDecision.RECONNECTED, 
decision.external_id, status="running")
+            try:
+                result = self.poll_until_complete(decision.external_id, 
context)
+            except Exception:
+                self._record_try(context, DurableDecision.RECONNECTED, 
decision.external_id, status="failed")
+                raise
+            self._record_reconnect_outcome(context, decision.external_id)
+            return result
         if decision.action == "already_succeeded":
+            self._record_try(
+                context, DurableDecision.ALREADY_SUCCEEDED, 
decision.external_id, status="success"

Review Comment:
   Added `test_already_succeeded_records_success_without_saved_time`. It checks 
the whole entry, including that no saved time is recorded, even though the 
submit time is known.
   



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