bramhanandlingala opened a new pull request, #71610:
URL: https://github.com/apache/airflow/pull/71610

   closes: #71485
   
   Summary
   ResumableJobMixin.execute_resumable() bundled its crash-recovery decision
   (read stored external ID, call get_job_status, apply is_job_active /
   is_job_succeeded) together with submission and polling in one method.
   Deferrable operators typically call submit_job directly from execute()
   rather than execute_resumable(), so they had no way to reuse this decision
   step and had to fall back to their own operator-specific bootstrap scans
   on every retry (e.g. GlueJobOperator's task-UUID scan).
   
   Root cause
   The reconnect-decision logic was private to execute_resumable(), with no
   public entry point that returned "reconnect / already succeeded / submit
   fresh" without also submitting, persisting, or polling.
   
   Fix
   Extracted the decision block into a new public method,
   resolve_reconnect(context) -> ResumeDecision, with identical logging,
   metrics, and OpenTelemetry span attributes. execute_resumable() now just
   calls resolve_reconnect() and acts on the result. A deferrable operator
   can call resolve_reconnect() itself before defer() and again on a
   deferred retry, reconnecting via the same task_state_store lookup instead
   of an operator-specific scan.
   
   Was generative AI tooling used ?
   
   - [X] Yes - Claude
   
   Generated-by: Claude following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


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