-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Raise SystemExit if breeze test specifies a directory that is also ignored #41996
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
Closed
topherinternational
wants to merge
22
commits into
apache:main
from
topherinternational:refactor-run-tests
Closed
Raise SystemExit if breeze test specifies a directory that is also ignored #41996
topherinternational
wants to merge
22
commits into
apache:main
from
topherinternational:refactor-run-tests
Conversation
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
eacc8e9 to
2d7ebf1
Compare
2d7ebf1 to
646a752
Compare
646a752 to
0643efa
Compare
0643efa to
2efb571
Compare
Member
|
I am at the Airflow Summit - not sure if I will be able to take a look before my holidays after :( |
1 similar comment
Member
|
I am at the Airflow Summit - not sure if I will be able to take a look before my holidays after :( |
2efb571 to
4425281
Compare
06dc086 to
21815e9
Compare
This reverts commit b263ae6cc282b4eef22733d66e32d50ae3aa2c86.
bb2aff9 to
e8fc78d
Compare
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Followup to #41967 and parallel to #41991
My proposal is that we remove the behavior that detected an
--ignoreswitch and removed the pytest directory arg, and instead fail out of the test call when this scenario is detected.Pytest prioritizes the test arg over the ignore switch, so this code was inverting the way pytest expects to be used which creates complexity when reasoning about breeze and the CI test suites. Also, with #41991, we should be not calling these kinds of scenarios anyway, and raising an error will help us locate any straggler cases.
IOW, the command
pytest tests/providers/alpha --ignore=tests/providers/alphawill run the tests intests/providers/alpha(the ignore is ignored). Our change in #40037 attempted to override this behavior and prioritize the ignore switch; it is simpler to understand the system if we detect these scenarios upstream instead of force-fitting the reverse of how pytest wants to work.This change refactors the
_run_testfunction in the following ways:--ignore=<dir>switch; if so, a system exit is initiatedTests have been added to verify the exit functionality and also validate some of the collaborator calls. I didn't feel the need to test the entire control flow.
^ 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 newsfragments.