Skip to content

Conversation

@dabla
Copy link
Contributor

@dabla dabla commented Jul 2, 2025

In some rare race conditions, it happens that an XCom which is stored on a local file system can't be found and raises a FileNotFoundError in the XCom io provider backend. When this exception is raised, it actually crashes the scheduler, which is not good as this means the scheduler is down until it's restarted, the task should fail but the scheduler shouldn't crash because of it. In attachment the airflow-xcom-log-trace.txt of the scheduler with the stacktrace. This PR makes sure the exception isn't propagated to the scheduler, I've also added a test case for it in the backend provider.


^ 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.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@dabla dabla changed the title Prevent FileNotFoundError in deserialize_value of XCom backend to crash the scheduler Prevent FileNotFoundError in deserialize_value of XCom io provider to crash the scheduler Jul 2, 2025
@potiuk potiuk merged commit ad10a10 into apache:main Jul 4, 2025
71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants