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

Log the underlying panic in runMigrateTask #13096

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Oct 11, 2020

If there is a panic during runMigrateTask we should capture and log the underlying
panic error.

This PR ensures that the panic is logged and captured as part of the task message.

Fix #13095

References #13085

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

If there is a panic during runMigrateTask we should capture and log the underlying
panic error.

This PR ensures that the panic is logged and captured as part of the task message.

Fix go-gitea#13095

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

Codecov Report

Merging #13096 into master will increase coverage by 0.09%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13096      +/-   ##
==========================================
+ Coverage   42.41%   42.51%   +0.09%     
==========================================
  Files         673      673              
  Lines       74114    74113       -1     
==========================================
+ Hits        31436    31507      +71     
+ Misses      37581    37488      -93     
- Partials     5097     5118      +21     
Impacted Files Coverage Δ
modules/task/migrate.go 26.22% <0.00%> (+0.42%) ⬆️
models/unit.go 46.57% <0.00%> (-2.74%) ⬇️
services/pull/check.go 47.69% <0.00%> (-2.31%) ⬇️
routers/repo/view.go 37.47% <0.00%> (-0.65%) ⬇️
models/error.go 34.85% <0.00%> (-0.51%) ⬇️
services/pull/pull.go 40.78% <0.00%> (ø)
services/mailer/mail.go 55.91% <0.00%> (+1.07%) ⬆️
modules/notification/notification.go 81.25% <0.00%> (+2.67%) ⬆️
modules/notification/base/null.go 71.42% <0.00%> (+2.85%) ⬆️
modules/git/commit.go 54.72% <0.00%> (+4.05%) ⬆️
... and 5 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 9066d09...d6e11a4. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 11, 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 Oct 11, 2020
zeripath added a commit to zeripath/gitea that referenced this pull request Oct 11, 2020
Backport go-gitea#13096

If there is a panic during runMigrateTask we should capture and log the underlying
panic error.

This PR ensures that the panic is logged and captured as part of the task message.

Fix go-gitea#13095

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added the backport/done All backports for this PR have been created label Oct 11, 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 Oct 11, 2020
@techknowlogick techknowlogick merged commit 7edf7eb into go-gitea:master Oct 11, 2020
techknowlogick pushed a commit that referenced this pull request Oct 11, 2020
Backport #13096

If there is a panic during runMigrateTask we should capture and log the underlying
panic error.

This PR ensures that the panic is logged and captured as part of the task message.

Fix #13095

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath deleted the fix-13095-improve-logging-of-panics-during-runMigrateTask branch October 11, 2020 19:30
zeripath added a commit to zeripath/gitea that referenced this pull request Oct 11, 2020
If there is a panic during runMigrateTask we should capture and log the underlying
panic error.

This PR ensures that the panic is logged and captured as part of the task message.

Fix go-gitea#13095

Signed-off-by: Andrew Thornton <art27@cantab.net>
@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.

Migrate Task panic recovery doesn't log the cause of the panic
5 participants