@actions/artifact: a non-200 blob response is not destroyed before the retry, so the process waits for the 3-min socket timeout
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github, node.js, typescript
Research direction
Start in streamExtractExternal in the @actions/artifact package, where the issue says a non-200 response is left open before the retry. Read the response handling and its tests, then reproduce the 404-then-200 case with the local mock described in the issue. Done when the retry succeeds and the process exits promptly instead of waiting for the socket timeout.
Written by the indexing model from the issue text.
Description
Package: @actions/artifact, as bundled in actions/download-artifact@v8.
What happens.
- The first GET of the blob URL gets a non-200 answer (seen with 404 and 503).
streamExtractExternalthrows without consuming or destroying the response.- The download retries after 5 s, the retry succeeds, and the step logs success.
- The first response's socket stays open.
@actions/http-client's default request timeout (req.setTimeout(3 * 60000)) then keeps node alive until it fires, so the step ends about 180 s after the blob request instead of at once.
Reproducer. We used a local mock of the artifact API whose blob URL answers 404 (or 503) once, then 200. We ran download-artifact@v8's dist/index.js with GITHUB_API_URL pointed at the mock:
- With the one error, it logs
Failed to download artifact after 1 retries due to Unexpected HTTP response from blob storage: 404 Not Found, then success, and exits at 180.3 s. - With a clean 200, it exits in 0.2 s.
No proxy is involved.
In real runs (self-hosted Linux runners, 181 download steps over 40 workflow runs): the step ran past 60 s 5 times. Each time it ended 181.4 s after its "Redirecting to blob download url" line, and the download itself took about 7.7 s (one failed GET, the 5 s wait, a 1.6 s retry).
Suggested fix. In streamExtractExternal, destroy response.message (or read it to the end) before throwing on a non-200 status, so the failed attempt's socket is released.
Workaround on our side: a 1-min step timeout on the download, then a second try.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- Avg merge
- 15m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from actions/toolkit
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
@actions/io: `mv(file, dest)` replaces `dest` when it is a symlink to a directory instead of moving into itPossibly taken @bardrop claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
@actions/exec: `exec(commandLine)` drops `""` arguments and trims trailing spaces of the last argumentPossibly taken @bardrop claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
actions/toolkit#2565 · 1 comment ·
Maintainers usually reply within 1 day
-
@actions/cache: downloadCacheHttpClientConcurrent never stops its progress timer on failure, so the step hangs until the job times outPossibly taken @YodHeVauHe claimed this 46 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
Similar issues
-
db-d1-sqlite: upsert is aliased to updateOne, so payload.kv.set never inserts new keysPossibly taken @pcbeingused333 claimed this today. OpenBug db: d1-sqlite Payload OSS
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
payloadcms/payload#19766 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
device-management-toolkit/sample-web-ui#3711 ·
Maintainers usually reply within 1 day
-
bug impact:low Team: SecuritySolution Team:Defend Workflows v9.6.0
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
elastic/kibana#306401 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
agentes-chat/agentes-chat#927 ·
Maintainers usually reply within 1 day
-
Closing a pinned tab jumps to the Tabs section instead of the next open pinned tabPossibly taken @seenimohamed claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ardia-browser/ardia#2769 ·
Maintainers usually reply within 1 day