-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[gettext] fix flaky test on windows #11940
Conversation
Something I've been wondering about: is the It seems like the failing test is trying to say that "no, modifying the .mo file should not result in detection of files-to-update". But I think that some of the logic in the codebase (notably here) does seem to consider |
Well the issue is that it sometimes works and not on Windows. I suspect that it's because when we are querying the last modification time, something happens. So I put some debug prints here and there to check. As for the dependency, I don't know but I think yes. |
Ok, so I know what happens:
Now, the failure that I could extract has a It should be fine to err for the release build because better be safe than sorry. But for the tests, since those failures appear quite often, we always get a notification on the fact that the workflow fails. Also, people might get confused because they don't know whether what they did affected this component or not sometimes. So I suggest that, for the tests only, we could mock Actually the whole issue stems from the fact that |
Closing since I'm done with my investigation. |
So let's work again on that one. |
I think it now works? |
Merging this one should technically (and I hope so) fix the future issues on Windows that we had. |
FYI: I've got a branch where I've attempted to keep all the 'fix' parts of this, while filtering-out the refactor-like changes. That helped me to understand that the key parts are both the time-mocking and also the very-specific modified-time patch after the BOM file has been written but before it is re-read. It's currently visible for comparison at: master...jayaddison:sphinx:issue-11941/pr-11940-review-experimentation#files_bucket (although I'll probably remove that branch at some point) I did also make one or two changes during that - nothing too significant. I'll try to remember to provide the relevant things as code-review feedback. |
I think I'll merge this one next since it's not hard to revert it if there are issues. It's not blocking per se but at least it would reduce the number of random CI/CD failures. |
Nice work @picnixz! |
This is a PR for triggering the CI/CD. I'll try to see if it changes anything (and to check if a special statement caused the regular issues). So I'll likely leave that PR open and try to retrigger CI/CD a few times to make it fail.