-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Prevent context deadline error propagation in GetCommitsInfo #20346
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
Merged
6543
merged 3 commits into
go-gitea:main
from
zeripath:fix-20329-context-deadline-exceeded-err
Jul 13, 2022
Merged
Prevent context deadline error propagation in GetCommitsInfo #20346
6543
merged 3 commits into
go-gitea:main
from
zeripath:fix-20329-context-deadline-exceeded-err
Jul 13, 2022
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Although `WalkGitLog` tries to test for `context.DeadlineExceededErr` there is a small chance that the error will propagate to the reader before it is recognised. This will cause the error to propagate up to `renderDirectoryFiles` and cause a http status 500. Here we check that the error passed is a `DeadlineExceededErr` or if it could be unwrapped to one. Fix go-gitea#20329 Signed-off-by: Andrew Thornton <[email protected]>
6543
approved these changes
Jul 12, 2022
Gusted
reviewed
Jul 12, 2022
Gusted
approved these changes
Jul 13, 2022
🤖 |
6543
pushed a commit
to 6543-forks/gitea
that referenced
this pull request
Jul 13, 2022
…a#20346) * Prevent context deadline error propagation in GetCommitsInfo Although `WalkGitLog` tries to test for `context.DeadlineExceededErr` there is a small chance that the error will propagate to the reader before it is recognised. This will cause the error to propagate up to `renderDirectoryFiles` and cause a http status 500. Here we check that the error passed is a `DeadlineExceededErr` via error.Is Fix go-gitea#20329 Signed-off-by: Andrew Thornton <[email protected]>
-> #20361 |
zeripath
added a commit
that referenced
this pull request
Jul 14, 2022
…#20361) Backport #20346 Although `WalkGitLog` tries to test for `context.DeadlineExceededErr` there is a small chance that the error will propagate to the reader before it is recognised. This will cause the error to propagate up to `renderDirectoryFiles` and cause a http status 500. Here we check that the error passed is a `DeadlineExceededErr` via error.Is Fix #20329 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: zeripath <[email protected]>
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Jul 14, 2022
* giteaofficial/main: Fix icon margin in user/settings/repos (go-gitea#20281) Fix org label open count, including close count issue (go-gitea#20353) [skip ci] Updated translations via Crowdin Prevent context deadline error propagation in GetCommitsInfo (go-gitea#20346) Add missing return for when topic isn't found (go-gitea#20351) Upgrade to Node 18 on CI (go-gitea#20340) Fix checks in PR for empty commits go-gitea#19603 (go-gitea#20290) Use default values when provided values are empty (go-gitea#20318) Add tests for the host checking logic, clarify the behaviors (go-gitea#20328) Changelog for 1.16.9 (update) (go-gitea#20341) (go-gitea#20343) Fix various typos (go-gitea#20338) Correctly handle draft releases without a tag (go-gitea#20314) Add write check for creating Commit status (go-gitea#20332) Remove blue text on migrate page (go-gitea#20273) Updated dead link to Madeleine.js source (go-gitea#20322)
vsysoev
pushed a commit
to IntegraSDL/gitea
that referenced
this pull request
Aug 10, 2022
…a#20346) * Prevent context deadline error propagation in GetCommitsInfo Although `WalkGitLog` tries to test for `context.DeadlineExceededErr` there is a small chance that the error will propagate to the reader before it is recognised. This will cause the error to propagate up to `renderDirectoryFiles` and cause a http status 500. Here we check that the error passed is a `DeadlineExceededErr` via error.Is Fix go-gitea#20329 Signed-off-by: Andrew Thornton <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
backport/done
All backports for this PR have been created
lgtm/done
This PR has enough approvals to get merged. There are no important open reservations anymore.
type/bug
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Although
WalkGitLog
tries to test forcontext.DeadlineExceeded
there is a small chance that the error will propagate to the reader
before it is recognised. This will cause the error to propagate up to
renderDirectoryFiles
and cause a http status 500.Here we check that the error passed is a
DeadlineExceeded
or if itcould be unwrapped to one.
Fix #20329
Signed-off-by: Andrew Thornton [email protected]