-
-
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
Reproducible race condition in creating Mercurial project and uploading .zip file #1025
Comments
Further test results: if, instead of getting the last commit date from |
It's definitely the The reason why using the command runner to get the last commit date fixes the issue is because the command runner is using the |
Some logs showing failure with a refresh interval of 1 second:
Note how the |
I would be in favor of switching how we get the latest date to use the command runner. We need to be carful and make sure it returns the same date that our current method gets (maybe do both and compare, throw an error if they are off by more than 1 second, then test it against a bunch of repos. Also, that log just shows that the command returned a 200, does it actually have data? it won't necessarily error if there's no data in the folder. |
The I'll open a PR changing GetLastCommitDate to use the command runner. |
Okay, #1026 opened with a fix and a unit test. The dates in the test were taken from an actual repo and have positive, negative, and zero timezone offsets. I've also verified that the code doesn't fall over when run on a repo with no commits in it. |
Bumping size estimate up from Small to Medium because this issue has expanded to include figuring out why the GHA integration tests have failures that aren't showing up when I run them locally. |
Describe the bug
While working on sillsdev/LfMerge#342, I found a consistent reproduction for the race condition that #765 was addressing. I believe that the fix for #765 did manage to fix the NFS issue for most cases, but sillsdev/LfMerge#342 has a consistently reproducible test failure that shows that the NFS issue may not be completely gone.
To Reproduce
Steps to reproduce the behavior:
dotnet test -l "console;verbosity=normal" --filter=Foo_
TusException : The remote server returned an error: (500) Internal Server Error.
ProjectService.FinishReset
is callingUpdateProjectMeta
which in turn callsHgService.GetLastCommitTimeFromHg
, and Mercurial is returning a 404 for/hg/s/{projectCode}/log?style=json-lex&rev=tip
.Expected behavior
FinishReset would get a correct last commit time and would not return a 404 for a project that exists and has just had a .zip file uploaded to it.
The text was updated successfully, but these errors were encountered: