-
Notifications
You must be signed in to change notification settings - Fork 16.3k
[v2-11-test] Allow failure callbacks for stuck in queued TIs that fail #53038
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
base: v2-11-test
Are you sure you want to change the base?
Conversation
|
tests are failing: |
…multiple_attempts
|
@kaxil all tests are passing now. |
| ti=ti, | ||
| session=session, | ||
| ) | ||
| self._maybe_requeue_stuck_ti(ti=ti, session=session, executor=executor) |
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.
We don't do this in main, do you think that should be updated too? or is it 2.* specific? If latter, why?
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.
potiuk
left a comment
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.
LGTM - providing that #53435 will also be merged :)
Yeah, let's get that one merged first |
|
I see #53435 is merged |
|
@eladkal I had to make some changes there. Let me see if the changes are needed here as well. |
@karenbraganz -> did you check it ? |
|
@potiuk There are a few changes that I need to make. Working on the changes now. |
|
I still need to run some tests to ensure my changes work as expected. |
|
Just need to figure out why one of the checks is failing. I think it might have something to do with the rich-click package version being used. Everything else is completed. |
|
I had to make changes to airflow/www/static/js/types/api-generated.ts because one of the CI hooks was failing. My PR is not related to the UI. |
|
Going to close and re-open the PR to re-trigger tests. |
closes: #51301
In issues #51301, it was reported that failure callbacks do not run for task instances that get stuck in queued and fail in Airflow 2.10.5. This is happening due to the changes introduced in PR #43520. In this PR, logic was introduced to requeue tasks that get stuck in queued (up to two times by default) before failing them.
Previously, the executor's fail method was called when the task needed to be failed after max requeue attempts. This was replaced by the task instance's set_state method in the PR
ti.set_state(TaskInstanceState.FAILED, session=session). Without the executor's fail method being called, failure callbacks will not be executed for such task instances. Therefore, I changed the code to call the executor's fail method instead.^ 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.