Skip to content
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

Prevent panic in stopwatch #10670

Merged

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Mar 8, 2020

There is a panic in the stopwatch API whereby prepareIssueStopwatch will return a nil issue causing panics after reporting a http status code.

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
@codecov-io
Copy link

codecov-io commented Mar 8, 2020

Codecov Report

Merging #10670 into master will decrease coverage by 0.02%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10670      +/-   ##
==========================================
- Coverage   43.61%   43.59%   -0.03%     
==========================================
  Files         588      588              
  Lines       82485    82487       +2     
==========================================
- Hits        35977    35961      -16     
- Misses      42045    42065      +20     
+ Partials     4463     4461       -2
Impacted Files Coverage Δ
routers/api/v1/repo/issue_stopwatch.go 81.67% <50%> (+4.95%) ⬆️
models/repo_mirror.go 2.12% <0%> (-10.64%) ⬇️
modules/avatar/avatar.go 48% <0%> (-6%) ⬇️
services/pull/check.go 50% <0%> (-4.27%) ⬇️
modules/notification/indexer/indexer.go 50.66% <0%> (-4%) ⬇️
modules/git/command.go 86.95% <0%> (-2.61%) ⬇️
models/unit.go 37.03% <0%> (-2.47%) ⬇️
modules/indexer/issues/indexer.go 56.19% <0%> (-1.33%) ⬇️
modules/log/event.go 64.61% <0%> (-1.03%) ⬇️
routers/repo/view.go 36.14% <0%> (-0.68%) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1966f42...dd21a29. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 8, 2020
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 8, 2020
@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 Mar 8, 2020
@guillep2k guillep2k merged commit 33c5e5e into go-gitea:master Mar 8, 2020
@zeripath zeripath deleted the prevent-panic-in-issue-stopwatch branch March 8, 2020 18:20
zeripath added a commit to zeripath/gitea that referenced this pull request Mar 8, 2020
Signed-off-by: Andrew Thornton <art27@cantab.net>
lafriks pushed a commit that referenced this pull request Mar 8, 2020
Signed-off-by: Andrew Thornton <art27@cantab.net>
@lafriks lafriks added the backport/done All backports for this PR have been created label Mar 8, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants