Enhance ResumableJobMixin.get_job_status with context for better job status tracking#68009
Merged
amoghrajesh merged 2 commits intoJun 4, 2026
Merged
Conversation
Member
|
I think this needs a backcompat shim so an old spark provider can work with new task-sdk and vice versa. |
Contributor
Author
|
I don't think there was a release for providers yet after previous iteration of task sdk changes (added in #67118)? |
Member
|
Provider release is happening today I think. Speak to @potiuk. We could possibly exclude Spark from that release wave? |
ashb
approved these changes
Jun 4, 2026
Member
ashb
left a comment
There was a problem hiding this comment.
Change looks okay (though the spark op doesn't seem to use it yet? Follow on pr to make it use this?)
Contributor
Author
|
@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 |
Contributor
Author
|
Error seems to be unrelated: Merging this one in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Was generative AI tooling used to co-author this PR?
What?
ResumableJobMixin.get_job_statushad no access tocontext, 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 wasdeleteOnTermination=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 totask_store, no way to cache terminal status before the remote resource disappears.Proposed change
Add
context: Contextas a second parameter toget_job_statusthroughout the interface.{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.