Skip to content

Conversation

zeripath
Copy link
Contributor

There is a slight race in checking of a context deadline exceed in #16467
which leads to a 500 on the repository page.

The solution is to check the error coming back from *LogNameStatusRepoParser.Next()
and if it is the ContextDeadlineExceeded break from the loop.

Fix #17314
Regression #16467

Signed-off-by: Andrew Thornton art27@cantab.net

There is a slight race in checking of a context deadline exceed in go-gitea#16467
which leads to a 500 on the repository page.

The solution is to check the error coming back from `*LogNameStatusRepoParser.Next()`
and if it is the `ContextDeadlineExceeded` break from the loop.

Fix go-gitea#17314

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added type/bug skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Oct 15, 2021
@zeripath zeripath added this to the 1.16.0 milestone Oct 15, 2021
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Oct 15, 2021
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 15, 2021
@zeripath zeripath merged commit 58cd55d into go-gitea:main Oct 15, 2021
@zeripath zeripath deleted the fix-17314-context-deadline-exceeded branch October 15, 2021 18:44
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
There is a slight race in checking of a context deadline exceed in go-gitea#16467
which leads to a 500 on the repository page.

The solution is to check the error coming back from `*LogNameStatusRepoParser.Next()`
and if it is the `ContextDeadlineExceeded` break from the loop.

Fix go-gitea#17314

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

500 error when accessing repo on web (context deadline exceed, LastCommitCache related)
4 participants