-
-
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
Fix hgweb race condition in GetLastCommitTime #1026
Conversation
If a project has just been created and then a zip file uploaded to populate it with initial data, as happens often in integration tests, then hgweb could return 404 for /hg/projectCode/log because its internal list of repos was recently refreshed (by another test) and the refresh interval hasn't been reached yet. One way to avoid this is to use the command runner to get the last commit date, since the hg command line doesn't use the refreshinterval setting from hgweb.
C# Unit Tests66 tests 66 ✅ 5s ⏱️ Results for commit 31bed3b. ♻️ This comment has been updated with latest results. |
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.
I'd like to expand the test cases for ConvertHgDate, otherwise it looks good.
Also expand the range of unit tests to include all kinds of invalid values, making sure ConvertHgDate returns null for all invalid data.
We'll change this to upload build artifacts for the different container logs, but this will get the error messages more quickly for now.
kubectl logs defaults to `--tail=10` if you pass a pod selector, so we have to explicitly request `--tail=-1` to get *all* log lines.
Failing integration tests are caused by the |
Closing and reopening to get CodeQL to do its job, sigh... |
If a project has just been created and then a zip file uploaded to populate it with initial data, as happens often in integration tests, then hgweb could return 404 for /hg/projectCode/log because its internal list of repos was recently refreshed (by another test) and the refresh interval hasn't been reached yet. One way to avoid this is to use the command runner to get the last commit date, since the hg command line doesn't use the refreshinterval setting from hgweb.
Fixes #1025.