You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "amoghrajesh (via GitHub)" <gi...@apache.org> on 2026/06/04 09:09:19 UTC

[PR] Enhance `ResumableJobMixin.get_job_status` with context for better job status tracking [airflow]

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

   
   <!-- SPDX-License-Identifier: Apache-2.0
         https://www.apache.org/licenses/LICENSE-2.0 -->
   
   <!--
   Thank you for contributing!
   
   Please provide above a brief description of the changes made in this pull request.
   Write a good git commit message following this guide: http://chris.beams.io/posts/git-commit/
   
   Please make sure that your code changes are covered with tests.
   And in case of new features or big changes remember to adjust the documentation.
   
   Feel free to ping (in general) for the review if you do not see reaction for a few days
   (72 Hours is the minimum reaction time you can expect from volunteers) - we sometimes miss notifications.
   
   In case of an existing issue, reference it using one of the following:
   
   * closes: #ISSUE
   * related: #ISSUE
   -->
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   <!--
   If generative AI tooling has been used in the process of authoring this PR, please
   change below checkbox to `[X]` followed by the name of the tool, uncomment the "Generated-by".
   -->
   
   - [ ] Yes (please specify the tool below)
   
   <!--
   Generated-by: [Tool Name] following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   -->
   
   ### What?
   
   `ResumableJobMixin.get_job_status` had no access to `context`, making it impossible to handle backends where the remote resource carrying job state can disappear after completion.  I encountered this problem when running Spark with Kubernetes driver pods which after a run get garbage collected, where without context an implementation cannot distinguish "SUCCEEDED but pod gone" from "FAILED but pod gone". The only workaround was `deleteOnTermination=false`, which accumulates pods indefinitely.
   
   The same gap will also appear in another form in cases when a job is tracked by external IDs (e.g. EMR `(cluster_id, step_id)`, Glue `(job_name, run_id)`).
   
   ### Current behaviour
   
   `get_job_status(self, external_id)` has no context, no access to `task_store`, no way to cache terminal status before the remote resource disappears.
   
   ### Proposed change
   
   Add `context: Context` as a second parameter to `get_job_status` throughout the interface.
   
   
   ---
   
   * Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
   * For fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   * When adding dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   * For significant user-facing changes create newsfragment: `{pr_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments). You can add this file in a follow-up commit after the PR is created so you know the PR number.
   


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


Re: [PR] Enhance `ResumableJobMixin.get_job_status` with context for better job status tracking [airflow]

Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh merged PR #68009:
URL: https://github.com/apache/airflow/pull/68009


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


Re: [PR] Enhance `ResumableJobMixin.get_job_status` with context for better job status tracking [airflow]

Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on PR #68009:
URL: https://github.com/apache/airflow/pull/68009#issuecomment-4620760730

   I don't think there was a release for providers yet after the task sdk changes?
   


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


Re: [PR] Enhance `ResumableJobMixin.get_job_status` with context for better job status tracking [airflow]

Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on PR #68009:
URL: https://github.com/apache/airflow/pull/68009#issuecomment-4622072387

   Error seems to be unrelated:
   
   ```
     ERROR: all download attempts failed for https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/9.4.0.0-IBM-MQC-Redist-LinuxX64.tar.gz; last error: <urlopen error [Errno 110] Connection timed out>
     Downloading https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/9.4.0.0-IBM-MQC-Redist-LinuxX64.tar.gz
     Primary download failed (URLError: <urlopen error [Errno 110] Connection timed out>); trying 4 fallback IP(s)
       Retrying with public.dhe.ibm.com -> 170.225.126.18
       170.225.126.18 failed: URLError: <urlopen error [Errno 110] Connection timed out>
       Retrying with public.dhe.ibm.com -> 129.35.224.1
       129.35.224.1 failed: URLError: <urlopen error [Errno 110] Connection timed out>
       Retrying with public.dhe.ibm.com -> 129.124.168.5
       129.124.168.5 failed: URLError: <urlopen error [Errno 110] Connection timed out>
       Retrying with public.dhe.ibm.com -> 9.133.44.11
       9.133.44.11 failed: URLError: <urlopen error [Errno 110] Connection timed out>
     Pre-extras install failed for ibm.mq
   ```
   
   Merging this one in


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


Re: [PR] Enhance `ResumableJobMixin.get_job_status` with context for better job status tracking [airflow]

Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on PR #68009:
URL: https://github.com/apache/airflow/pull/68009#issuecomment-4620859952

   @ashb spark isn't going to use it. And not every operator needs to use it, this is mainly for K8s use case I mentioned in PR desc above


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


Re: [PR] Enhance `ResumableJobMixin.get_job_status` with context for better job status tracking [airflow]

Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on PR #68009:
URL: https://github.com/apache/airflow/pull/68009#issuecomment-4620829118

   Provider release is happening today I think. Speak to @potiuk. We could possibly exclude Spark from that release wave?


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


Re: [PR] Enhance `ResumableJobMixin.get_job_status` with context for better job status tracking [airflow]

Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr commented on PR #68009:
URL: https://github.com/apache/airflow/pull/68009#issuecomment-4620738866

   I think this needs a backcompat shim so an old spark provider can work with new task-sdk and vice versa.


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