-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
Add a new test resource to mark flaky tests #130474
Comments
I don't think we should have any tests that are meant to be flaky. |
In general, the flaky tests are those that are tests with threading, but now I wonder if it's actually better not to have a flaky resources but rather a marker that indicates that a test can be executed multiple times until it's considered to succeed on the CI. We found some "flaky" references but in the end, they are rather scarce. So the argument "if it's flaky and we usually skip it", maybe it's better to remove them if we can't fix them (as @vstinner suggested for |
Ah, that does sound useful! Basically, make |
Actually, not entirely. Make the tests run, and if some of them fail but are marked as flaky in the skip list (to borrow Victor's terminology) rerun them more than just once. Sometimes, even rerunning them once is not sufficient. In general, the CI fails on tests because of the system being busy (perhaps because of other tests). The workflow I had in my head is:
Context: I'm a bit tired of hitting the "rerun" button everytime and/or having a notification telling me that an unrelated test has failed! |
Which tests are failing randomly? If nobody fix them, the situation will not become better. |
In general, the tests that I need to rerun are the For instance: https://github.com/python/cpython/actions/runs/13242348106/job/37023611044?pr=129175, or https://github.com/python/cpython/actions/runs/13225352402/job/36915529351?pr=129175 or https://github.com/python/cpython/actions/runs/13205748354/job/36868408015?pr=129785. Agreed that those are all free-threading related and/or threading related but I'm not sure we can actually fix them at once. For instance, https://github.com/python/cpython/actions/runs/13205748354/job/36868408015?pr=129785#step:6:516 is a failure I've usually seen but maybe it can be fixed as the second issue is that the environment seems to have changed (which then results in an overall failure I think?) Another example is https://github.com/python/cpython/actions/runs/13205748354/job/36868408015?pr=129785#step:6:516 where And another example is https://github.com/python/cpython/actions/runs/12927858394/job/36053953144?pr=127676#step:12:58 which is a socket test so could be flaky for whatever reason. If you don't really like the idea of a skip list, I'll note which tests I'm rerunning when I do so that we can fix them. I should have done that sooner but it didn't occur to me that the tests should be really fixed (since they pass most of the time, like 95% or more, I was biased and assumed that they were just flaky and that's it). |
This test is known to be flaky: issue gh-110052. It should be skipped.
It looks like a real bug, you should open an issue:
It looks like a bug in the test. |
For
I'm actually unsure that it's the actual error. The two tests that failed were rerun in https://github.com/python/cpython/actions/runs/13205748354/job/36868408015?pr=129785#step:6:1165 and it appears that they are related to conditions:
For the error you linked, I think it's a warning omission (https://github.com/python/cpython/actions/runs/13205748354/job/36868408015?pr=129785#step:6:1258):
I'll try to remember opening an issue for python/cpython/actions/runs/13225352402/job/36915529351?pr=129175 |
Feature or enhancement
Proposal:
Came up in this issue #130363 and this comment: #130363 (comment)
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: