Eliminate race condition in a test due to xdist runs#58593
Merged
amoghrajesh merged 1 commit intoapache:mainfrom Nov 23, 2025
Merged
Eliminate race condition in a test due to xdist runs#58593amoghrajesh merged 1 commit intoapache:mainfrom
amoghrajesh merged 1 commit intoapache:mainfrom
Conversation
…_pyproject_tomls due to xdist runs
jscheffl
approved these changes
Nov 23, 2025
jason810496
approved these changes
Nov 23, 2025
github-actions bot
pushed a commit
to aws-mwaa/upstream-to-airflow
that referenced
this pull request
Nov 23, 2025
…non_provider_pyproject_tomls due to xdist runs (apache#58593) (cherry picked from commit 632bfe7) Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
Member
|
Nice! Gooooooood Catch ! |
potiuk
reviewed
Nov 23, 2025
| AIRFLOWCTL_INIT_PY = AIRFLOW_ROOT_PATH / "airflow-ctl" / "src" / "airflowctl" / "__init__.py" | ||
|
|
||
|
|
||
| @pytest.fixture |
Member
There was a problem hiding this comment.
Wait. .... But would not that break things in the other direction?
I can imagine that two tests that expect those versions to be updated might also be broken by this - because fixture wll FIX the versions if the race condition happens?
I think we need to either have some lock for those changes or to avoid in-place modifications - maybe just mock the "read" method for the tests reading the version rather than modify the files.
Contributor
Author
There was a problem hiding this comment.
Good call, thanks for sharing that perspective too. If more tests expect this, it might fail somewhere else, let me take a stab at making. this portion better to avoid such issues.
Copilot AI
pushed a commit
to jason810496/airflow
that referenced
this pull request
Dec 5, 2025
…_pyproject_tomls due to xdist runs (apache#58593)
itayweb
pushed a commit
to itayweb/airflow
that referenced
this pull request
Dec 6, 2025
…_pyproject_tomls due to xdist runs (apache#58593)
Subham-KRLX
pushed a commit
to Subham-KRLX/airflow
that referenced
this pull request
Mar 4, 2026
…_pyproject_tomls due to xdist runs (apache#58593)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Saw errors like this in one of the CI runs:
Upon investigating, it seems that this is because of a race condition occurring due to parallel run of tests using pytest xdist.
This is what happens:
3.2.0.dev0instead of3.2.0and because the validation doesn't handle that, this fails.^ 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.