Skip to content

Use filelock to fix race condition in version suffix test for xdist runs#58608

Merged
potiuk merged 2 commits intoapache:mainfrom
amoghrajesh:use-filelock
Nov 24, 2025
Merged

Use filelock to fix race condition in version suffix test for xdist runs#58608
potiuk merged 2 commits intoapache:mainfrom
amoghrajesh:use-filelock

Conversation

@amoghrajesh
Copy link
Copy Markdown
Contributor

I attempted to fix a breeze test in #58593 and tried eliminating race condition for xdist runs through that fix, but that fix isn't good enough. Mentioned here: #58593 (comment)

Instead, we could use a file lock by filelock library to retrieve a lock and run the critical section code that patches the toml file version to not unnecessarily mock and achieve more of an integration test behavior than mocking and not catching the issue. Used filelock library for this: https://py-filelock.readthedocs.io/en/latest/index.html which provides a platform independent file lock that will be a one stop solution for our runs.


^ 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.

Copy link
Copy Markdown
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much nicer indeed.

@potiuk potiuk merged commit 53ed24f into apache:main Nov 24, 2025
119 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 24, 2025
… for xdist runs (#58608)

* Use filelock to fix race condition in version suffix test for xdist runs

* Use filelock to fix race condition in version suffix test for xdist runs
(cherry picked from commit 53ed24f)

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
@github-actions
Copy link
Copy Markdown

Backport successfully created: v3-1-test

Status Branch Result
v3-1-test PR Link

potiuk pushed a commit that referenced this pull request Nov 24, 2025
… for xdist runs (#58608) (#58616)

* Use filelock to fix race condition in version suffix test for xdist runs

* Use filelock to fix race condition in version suffix test for xdist runs
(cherry picked from commit 53ed24f)

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
ephraimbuddy pushed a commit that referenced this pull request Dec 3, 2025
… for xdist runs (#58608) (#58616)

* Use filelock to fix race condition in version suffix test for xdist runs

* Use filelock to fix race condition in version suffix test for xdist runs
(cherry picked from commit 53ed24f)

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
Copilot AI pushed a commit to jason810496/airflow that referenced this pull request Dec 5, 2025
…uns (apache#58608)

* Use filelock to fix race condition in version suffix test for xdist runs

* Use filelock to fix race condition in version suffix test for xdist runs
itayweb pushed a commit to itayweb/airflow that referenced this pull request Dec 6, 2025
…uns (apache#58608)

* Use filelock to fix race condition in version suffix test for xdist runs

* Use filelock to fix race condition in version suffix test for xdist runs
Subham-KRLX pushed a commit to Subham-KRLX/airflow that referenced this pull request Mar 4, 2026
…uns (apache#58608)

* Use filelock to fix race condition in version suffix test for xdist runs

* Use filelock to fix race condition in version suffix test for xdist runs
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