-
Notifications
You must be signed in to change notification settings - Fork 2
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
flaky test_memoize_path_dir ? #55
Comments
@yarikoptic I'm not sure what the cause is, but I've created #56 so we can at least see what's going on in case it happens again. |
@yarikoptic As far as I can tell, when this line is called, the first & second The curious part is that this happened twice in a row, but with different test functions. |
#56 was merged, and awhile back @jwodder said that tests didn't fail for awhile and indeed https://github.com/con/fscacher/actions is all green. Closing |
now reported to fail in debian too: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1079398 . I insofar failed to reproduce locally to troubleshoot further etc. |
In Debian I added a timeout (e.g., 5s) before I don't quite understand the assumption as written here: try:
# unless this computer is too slow -- there should be less than
# cache._min_dtime between our creating the file and testing,
# so we would force a direct read: I mean the code should never wish the computer to be fast enough to achieve atomicity. According to my understanding, something similar to #60 still applies. |
Thank you @hosiet for taking care about this package/issue in Debian and looking into it! I have now eyeballed the code etc, and I still have no logical (as code logic goes) explanation besides
either of which leads to our subsequent re-check, based on except AssertionError: # pragma: no cover
# if computer is indeed slow (happens on shared CIs) we might fail
# because distance is too short
if time.time() - t0 < cache._min_dtime:
raise # if we were quick but still failed -- legit is True (since exception is raised overall), whenever presumably similar (but with def modified_in_window(self, min_dtime):
if self.last_modified is None:
return False
else:
return abs(time.time() - self.last_modified * 1e-9) < min_dtime returns So either precision of NB presumably since potentially could be
Here is the log record from that failed debian run
which shows that the first PS sorry - leaving unfinished, need to get to a meeting, will come back to it later |
It might be able to provide explanation for a flaky test observed on debian build systems etc: con#55
It might be able to provide explanation for a flaky test observed on debian build systems etc: con#55
I treat the fact that addition of I wondered if you @hosiet were lucky to more or less reliably reproduce such an issue some way? I am proposing to add more logging to get a better idea on what is going on. If you can't reproduce it either, I would prefer to upload such a version, without patches, to debian to catch the bug by its limbs: |
I can make a test build-and-upload in Debian with the current fscacher git HEAD version, and remove my custom patch in this test build. If such build still yields the test error, I can show you the updated error message. Will that help you with the debug? |
Sure, thanks in advance! no need for HEAD version. Grab 0.4.3 we released from pypi https://pypi.org/project/fscacher/ |
Fresh run https://github.com/con/fscacher/runs/4440200422?check_suite_focus=true failed on Mac
although was all green before AFAIK.
The text was updated successfully, but these errors were encountered: