Raise on docs tarball unpack failures#110
Merged
Merged
Conversation
Unpack errors were being swallowed by Logger.error and never reached Sentry, so we had no visibility into malformed publisher tarballs (e.g. lustre 5.7.0 with mode-0 duplicate entries that hit EACCES). Replace Hexdocs.Tar.unpack_to_dir/2 with unpack_to_dir!/2 raising Hexdocs.Tar.UnpackError, and drop the error-swallowing branches in queue.ex and bucket.ex. Broadway's catch logs with crash_reason metadata, which Sentry.LoggerHandler turns into a proper exception event.
- bucket.ex delete/4: pass new_latest_version (the version actually being unpacked) instead of the version being deleted - tar.ex: replace `unless ok?` with `if not ok?` for clarity - tar_test.exs: pin the invalid-gzip raise to the message prefix
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Unpack errors were being swallowed by Logger.error and never reached Sentry, so we had no visibility into malformed publisher tarballs (e.g. lustre 5.7.0 with mode-0 duplicate entries that hit EACCES).
Replace Hexdocs.Tar.unpack_to_dir/2 with unpack_to_dir!/2 raising Hexdocs.Tar.UnpackError, and drop the error-swallowing branches in queue.ex and bucket.ex. Broadway's catch logs with crash_reason metadata, which Sentry.LoggerHandler turns into a proper exception event.