Repository navigation
Conversation
aepifano-square
added a commit
to block/buzz-app
that referenced
this pull request
Nov 23, 2026
## Why An [upstream bug](actions/toolkit#2575) can keep the artifact-download action alive for **about three minutes even after the download succeeds**: a failed request leaves an open connection behind after a successful retry. ## What changes Cap native-fixture downloads at **one minute** in browser and flake-check jobs. After a timeout, continue only if the action reported a completed download and the fixture passes the existing revision, checksum and executable checks. Missing, incomplete or corrupt downloads still fail CI. This cuts an affected download step from **~3 minutes to ~1 minute**, avoiding roughly **two minutes of unnecessary waiting**. Total CI benefits when that delay holds up the last required job; unaffected downloads finish normally. **Tradeoff:** the minute includes transfer time, so a legitimate download taking longer will fail. The 99 recorded downloads without the hang took 1–24 seconds. **Temporary:** remove the timeout and completion guard once our pinned official action includes [the upstream fix](actions/toolkit#2581); keep fixture integrity checks. ## Validation [Full CI passed](https://github.com/block/buzz-app/actions/runs/45261204669), including all 29 browser jobs. A [hosted test](https://github.com/block/buzz-app/actions/runs/45260421944) confirmed that a simulated post-success hang proceeds after ~60 seconds, while missing and corrupt artifacts fail. All 36 local workflow checks passed. Signed-off-by: Alex Epifano <aepifano@squareup.com> Co-authored-by: github-enterprise-admin <5016e041c0895516b8c714b80ede89b8a4007c6083dd8737dce174359fde12b5@buzz.block.builderlab.xyz>
This branch has not been deployed
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.
Disclosure: this PR was authored by Claude (Anthropic's AI assistant, via Claude Code) on behalf of @HipHoff, who reviewed and takes responsibility for the change.
Root cause
streamExtractExternalthrows on a non-200 blob response without reading or destroyingresponse.message. The unread response keeps its keep-alive socket referenced until the http-client request timeout (180 s), so the Node process cannot exit even after the caller's retry succeeds. The fix destroys the response before throwing.Verified against download-artifact v8.0.2's bundle on Node 24.22.1: with a mock that returns 503 once, the process exits in about 5.2 s (n=5) instead of staying alive past "finished" (5/5 runs).
Test
Adds
should destroy the response when blob storage returns a non-200 statusto thestreamExtractExternalblock inpackages/artifact/__tests__/download-artifact.test.ts. It follows that file's existingHttpClientmock convention, returns a 503IncomingMessage, spies ondestroy, and asserts it is called once and the existing error is still thrown. It fails without the fix (destroycalled 0 times) and passes with it.Local results
npm test -- packages/artifact: 12 suites, 167 tests passed.eslintandprettier --checkon the two changed files: clean.Fixes #2575