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

Recover general chunker panics #3625

Merged
merged 2 commits into from
Nov 21, 2024
Merged

Recover general chunker panics #3625

merged 2 commits into from
Nov 21, 2024

Conversation

rosecodym
Copy link
Collaborator

@rosecodym rosecodym commented Nov 19, 2024

Description:

We have recently seen panics when underlying readers panic (which can happen due to third-party library bugs). I'm not sure why the panics are new - it could be a case of bad luck, but there have also been recent changes to error handling. This is the smallest change that seems to fix a real problem but I'm not sure if it's the best global solution.

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

@rosecodym rosecodym requested a review from a team as a code owner November 19, 2024 15:44
panic("panic for testing")
}

func TestChunkReader_UnderlyingReaderPanics_DoesNotPanic(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

should the test verify that the error is returned through the channel?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good question! my vote is "no," because imo the specific correct behavior is not obvious, beyond "shouldn't panic" - which is what the test checks right now.

Copy link
Contributor

@0x1 0x1 left a comment

Choose a reason for hiding this comment

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

one question. otherwise looks good

Copy link
Collaborator

@ahrav ahrav left a comment

Choose a reason for hiding this comment

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

Thank you ❤️

@rosecodym rosecodym merged commit 098072b into main Nov 21, 2024
13 checks passed
@rosecodym rosecodym deleted the rar-panic branch November 21, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants