itstalmeez commented on PR #32825:
URL: https://github.com/apache/airflow/pull/32825#issuecomment-1843645156
Addresses a critical issue identified during the work on PR #32646. When
tasks are externally marked as failed by the scheduler, such as in cases where
a task times out while stuck in the queue, the current behavior sets the task
state to 'failed' but neglects to assign the corresponding try_number for the
attempt.
This omission creates problems for subsequent functionalities like log
retrieval and viewing legacy logs, as the necessary try_number is not fetched.
Consequently, logs are unavailable for try_number=0, which is incorrectly set
for the task instance instead of the appropriate try_number based on the
attempt.
This PR resolves the issue by ensuring that the corresponding try_number is
correctly set when handling external failures for the task. Your review and
feedback on this fix are appreciated. Please adhere to the Pull Request
Guidelines. For fundamental code changes, consider initiating an Airflow
Improvement Proposal (AIP). Also, check for compliance with the ASF 3rd Party
License Policy in case of new dependencies. If there are potential backwards
incompatible changes, leave a note in a newsfragment file, named
{pr_number}.significant.rst or {issue_number}.significant.rst, within the
newsfragments directory. Thank you for your attention to these considerations.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]