Repository navigation
feat(task_instances): guard ti update state and set task to fail if exception encountered - #51295
Conversation
amoghrajesh
left a comment
There was a problem hiding this comment.
@Lee-W could you please update the PR description with the intent of why you are making this change?
it should be a draft one. basically what we discussed this afternoon except for changing task runner is not correct. will update the descipriont after late dinner |
8762ed8 to
e724fd4
Compare
|
It would be nice if we could get this one and #50654 reviewed. IMO, the other one is more urgent and important |
0f08675 to
022fd63
Compare
uranusjr
left a comment
There was a problem hiding this comment.
I think this makes sense. A couple of non-blocking comments.
d534d82 to
3a34038
Compare
|
Looks like the test failure is relevant. |
Yes, I'm now working on it. Basically, we'll need to remove the future rescheulde from data |
|
just rebuild the query to avoid mysql failure |
0a28e64 to
ac7ffcd
Compare
|
As it has been approved and we're about to start work on releasing 3.0.2, I will merge this one once the CI pass again |
…to fail if exception encountered (#51295) * feat(task_instances): guard ti update state and set to fail if exception enounctered * feat(task_instances): catch mysql error and set the task to fail * test: remove unnecessay check * fix(task_instances): handle mysql error * refactor(task-instances): merge mysql logic back to the original private function (cherry picked from commit b5a3b4e) Co-authored-by: Wei Lee <weilee.rx@gmail.com>
…to fail if exception encountered (#51295) (#51470) * feat(task_instances): guard ti update state and set to fail if exception enounctered * feat(task_instances): catch mysql error and set the task to fail * test: remove unnecessay check * fix(task_instances): handle mysql error * refactor(task-instances): merge mysql logic back to the original private function (cherry picked from commit b5a3b4e) Co-authored-by: Wei Lee <weilee.rx@gmail.com>
…to fail if exception encountered (#51295) (#51470) * feat(task_instances): guard ti update state and set to fail if exception enounctered * feat(task_instances): catch mysql error and set the task to fail * test: remove unnecessay check * fix(task_instances): handle mysql error * refactor(task-instances): merge mysql logic back to the original private function (cherry picked from commit b5a3b4e) Co-authored-by: Wei Lee <weilee.rx@gmail.com>
…xception encountered (apache#51295) * feat(task_instances): guard ti update state and set to fail if exception enounctered * feat(task_instances): catch mysql error and set the task to fail * test: remove unnecessay check * fix(task_instances): handle mysql error * refactor(task-instances): merge mysql logic back to the original private function
Why
closes: #50654
If an unexpected error occurs during task update, the API endpoint crashes with an unhandled exception, and the task state remains, causing the task to hang.
What
Set the task to fail if such case happens
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.