-
Notifications
You must be signed in to change notification settings - Fork 47
Add flaky pytest infrastructure and weekend runners #1799
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
base: main
Are you sure you want to change the base?
Conversation
Hello. You may have forgotten to update the changelog!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea 💯
The only thing I would say is that we should fix those global state mutations instead of forcing the tests to only run once :)
Since this action installs from testpypi, this PR's CI will fail tests for tests depending on new features still not on testpypi yet. For example, Tuesday midnight's test pypi will fail tests added on Wednesday. This is fine. I only enable the script on PRs to check the script itself. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1799 +/- ##
=======================================
Coverage 96.61% 96.61%
=======================================
Files 82 82
Lines 9265 9265
Branches 875 875
=======================================
Hits 8951 8951
Misses 255 255
Partials 59 59 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
def reset_Failing(): | ||
save = Failing.triggered.copy() | ||
yield | ||
Failing.triggered = save |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is more straightforward, this Failing
class uses a class variable to keep track of labels it already saw, and this track record of labels is not reset over different tests, or different runs of the same test.
I just add a fixture to reset it everytime.
Context:
We wish to reduce flaky tests in CI.
There is a python package
flaky
(which we already have in ourrequirements.txt
) that reruns failed tests to hunt for flakiness.Let's actually use it.
Description of the Change:
flaky
infrastructure. A pytest run that hunts for flaky tests can be launched bymake pytest ENABLE_FLAKY=ON
Benefits:
If any new tests are flaky, this weekend runner will catch them!
[sc-87028]