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

add basic plugin panic handlers #1270

Merged
merged 2 commits into from Mar 13, 2019
Merged

Conversation

skriss
Copy link
Member

@skriss skriss commented Mar 11, 2019

Fixes #521

@carlisia @nrb this is a basic fix for #521. It captures any info about the panic and returns it as a normal error. Stack traces (per Andy's WIP #1119) to be added in subsequent PR(s).

If this looks reasonable for block_store.go then i'll add it to the other 3 plugins as well.

@skriss skriss requested review from carlisia and nrb March 11, 2019 16:20
Copy link
Contributor

@carlisia carlisia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems the way to do it 👍

@nrb
Copy link
Contributor

nrb commented Mar 12, 2019

LGTM!

@skriss
Copy link
Member Author

skriss commented Mar 12, 2019

👍 will proceed with the rest.

@skriss
Copy link
Member Author

skriss commented Mar 12, 2019

Updated the rest. Will squash before merge, and would like to do a quick manual test.

@skriss skriss changed the title [WIP] add basic plugin panic handlers add basic plugin panic handlers Mar 12, 2019
Signed-off-by: Steve Kriss <krisss@vmware.com>
@skriss
Copy link
Member Author

skriss commented Mar 12, 2019

Squashed, test looks fine.

Copy link
Contributor

@nrb nrb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, but should update copyright headers while we're here.

pkg/plugin/backup_item_action.go Show resolved Hide resolved
pkg/plugin/block_store.go Show resolved Hide resolved
pkg/plugin/object_store.go Show resolved Hide resolved
pkg/plugin/restore_item_action.go Show resolved Hide resolved
Signed-off-by: Steve Kriss <krisss@vmware.com>
@skriss
Copy link
Member Author

skriss commented Mar 13, 2019

Updated all, try out squash & merge when ready

@nrb nrb merged commit 409116f into vmware-tanzu:master Mar 13, 2019
@skriss skriss deleted the plugin-panic-handlers branch March 19, 2019 15:01
jessestuart pushed a commit to jessestuart/velero that referenced this pull request May 28, 2019
* add server-side panic handlers to all plugin methods

Signed-off-by: Steve Kriss <krisss@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add panic recovery handlers to all server-side plugin code
3 participants