-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce RESTARTING state #16681
Introduce RESTARTING state #16681
Conversation
Is a new state strictly required for this? Cos each state we add needs to be shown in the UI and increases the possible places we need to deal with the new state |
I think another way to implement this is to make
|
Ready for review. The failing Helm Chart; KubernetesExecutor (pull_request) looks unrelated to this PR. |
Yep hopefully already fixed by #16750 |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code and name looks good now, though this is probably worth documenting somewhere so users can know about this behaviour.
(And you'll have to resolve conflicts obviously.)
Thanks. That's done. I added a paragraph in UPDATING.md about this new behaviour. Please see if that helps. |
I mostly also thinking somewhere in the published docs tree. Ah https://airflow.apache.org/docs/apache-airflow/stable/concepts/tasks.html#task-instances That diagram needs updating :) |
Thanks everyone for the suggestions in #6762. @kaxil @potiuk @mik-laj @kaverisharma09 I re-created the diagram with draw.io and here's a draft. Some modifications I made:
Please let me know what you think. I'll include the diagram in my PR and upload to https://cwiki.apache.org/confluence/display/AIRFLOW/File+lists if you think it works. |
Sounds good |
Looks good to me :) |
65f929e
to
7f2d2e0
Compare
Hey @ashb - any more comments ? I think I would love to merge that one :) |
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
Hey @yuqian90 , can you please rebase? We had some master issues recently, but they should be solved already :) |
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
closes: #16680
This PR makes sure that when a user clears a running task, the task does not fail. Instead it is killed and retried gracefully.
This is done by introducing a new State called
RESTARTING
. As the name suggests, aTaskInstance
is set to this state when it's cleared while running. Most of the places handlesRESTARTING
the same waySHUTDOWN
is handled, except inTaskInstance.is_eligible_to_retry
, where it is always be treated as eligible for retry.