Files
Sebastien Tardif 65a1ed4534 fix(agent): bound bundle downloads and remove failed temp dirs (#2226)
* fix(agent): bound bundle downloads and remove failed temp dirs

http.DefaultClient has no header timeout, and the HTTP extract used
context.Background(), so a peer that accepted and then stalled never
returned. A failed extract also left its temp directory in place.

Give each attempt a header deadline and the whole download a 10 minute
budget, and delete the temp directory unless extraction succeeds.
The directory is kept after success because the installer runs from it.

Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>

* test(agent): document the bundle temp directory helpers

CodeRabbit flagged docstring coverage on the helpers added with the
download deadline tests.

Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>

---------

Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>
2026-12-01 09:53:02 -07:00
..