Skip to content

Raise on docs tarball unpack failures#110

Merged
ericmj merged 2 commits into
mainfrom
worktree-fix-eacces-unpack-error
May 27, 2026
Merged

Raise on docs tarball unpack failures#110
ericmj merged 2 commits into
mainfrom
worktree-fix-eacces-unpack-error

Conversation

@ericmj
Copy link
Copy Markdown
Member

@ericmj ericmj commented May 27, 2026

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.

ericmj added 2 commits May 27, 2026 21:33
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
@ericmj ericmj merged commit ce6b224 into main May 27, 2026
12 checks passed
@ericmj ericmj deleted the worktree-fix-eacces-unpack-error branch May 27, 2026 19:48
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.

1 participant