• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

decentraland / deployments-to-sqs / 24615061203
90%

Build:
DEFAULT BRANCH: main
Ran 18 Apr 2026 10:13PM UTC
Jobs 1
Files 14
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Apr 2026 10:12PM UTC coverage: 89.961% (-1.2%) from 91.163%
24615061203

push

github

web-flow
fix: stage storage streams to disk to survive S3 mid-download aborts (#523)

* fix: stage storage streams to disk to survive S3 mid-download aborts

During catalyst re-sync the download queue saturates and snapshot
iteration pauses on onSizeLessThan(1000). The S3 GET socket backing
the snapshot stream sits idle and AWS closes it, emitting
`error: aborted` on the IncomingMessage. readline re-emits it on its
Interface which has no listener, and the process dies under
--abort-on-uncaught-exception.

Wrap the storage component so retrieve().asStream() first pipelines
the body to a unique file in os.tmpdir() and returns a
fs.createReadStream of it. The drain runs at full speed so the S3
socket can't idle out, and a mid-download abort rejects asStream()
for snapshot-fetcher's retry layer to handle instead of escaping as
an uncaught exception.

Also bump @types/node and typescript to match the Node 24 runtime.

* fix: address review feedback on storage wrapper

- Cap stageToDisk with AbortSignal.timeout to prevent hangs on stalled
  (alive-but-not-producing) S3 streams.
- Use `catch (error: unknown)` with instanceof narrowing for type safety.
- Comment the asRawStream bypass so future maintainers know to wrap it
  if a consumer starts using it.
- Note in the forwarded-methods comment why we prefer explicit `bind`
  over `{ ...inner }` spread.
- Switch afterEach to resetAllMocks so mockResolvedValueOnce queues do
  not leak between tests; re-seed logsMock.getLogger in beforeEach.
- Add a write-failure test for the disk-full path.

* fix: log and guard temp-file cleanup in asStream

- Log unlink failures in the readStream close handler so repeated
  deletion errors surface instead of silently accumulating temp files.
- Also listen on the readStream 'error' event as a belt-and-suspenders
  against future Node changes in event ordering, guarded by a single
  `cleaned` flag to keep the unlink idempotent and avoid spurious
  ENOENT noise.
- Document the remaining ... (continued)

28 of 38 branches covered (73.68%)

Branch coverage included in aggregate %.

36 of 39 new or added lines in 2 files covered. (92.31%)

205 of 221 relevant lines covered (92.76%)

2.48 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
83.33
src/adapters/storage/index.ts
Jobs
ID Job ID Ran Files Coverage
1 24615061203.1 18 Apr 2026 10:13PM UTC 14
89.96
GitHub Action Run
Source Files on build 24615061203
  • Tree
  • List 14
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 76060943 on github
  • Prev Build on main (#21177967116)
  • Next Build on main (#24822654167)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc