Repository navigation
CAMEL-27004: camel-launcher - install.sh gives up on a download that cannot connect or stalls - #30125
Conversation
…cannot connect or stalls curl and wget ran without a connect or read limit, so a mirror that stopped sending hung the installer for as long as it kept the connection open. curl now gives up after 30 seconds without a connection, or 60 seconds under 1 KB/s; wget after the same connect and read timeouts, with 2 tries instead of 20. There is no limit on the total time, so a slow but working download of the archive (about 110 MB) is not cut off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
🔄 Backport BotThis bugfix targets
Add a Backport PRs will be created automatically on merge (once a port label is added). Comment ℹ️ If you push additional commits after |
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 1 of 726 tested, 0 compile-only — current: 1 all testedMaveniverse Scalpel detected 1 affected modules (current approach: 1). Skip-tests mode would test 1 modules (1 direct + 1 downstream), skip tests for 0 (generated code, meta-modules) Modules Scalpel would test (1)
💡 Manual integration tests recommended:
All tested modules (2 modules, 0.9s total)Total reactor time: 0.9s
Top 20 slowest modules:
|
gnodet-bot
left a comment
There was a problem hiding this comment.
LGTM. Clean, well-targeted fix — adds connect and stall timeouts to both curl and wget paths in install.sh, with a solid regression test. The curl --speed-limit/--speed-time / wget --read-timeout + --tries=2 combination is the standard POSIX install script approach. No issues found.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
What
Item 4 of CAMEL-27004 (split from CAMEL-26914):
install.shrancurlandwgetwith no connect or read limits. A mirror that stopped sending hung the installer for as long as it kept the connection open.camel self-updategives up on the installer after 5 minutes, but someone runningcurl ... | shwaited forever.--connect-timeout 30 --speed-limit 1024 --speed-time 60. It gives up when it can't connect within 30 s, or when it gets under 1 KB/s for 60 s.--connect-timeout=30 --read-timeout=60 --tries=2. wget's default is 20 tries of up to 900 s each.There's deliberately no limit on the total time: the archive is about 107 MiB for 4.23.0, and a slow but working download must not be cut off. The stall time can be set with
CAMEL_INSTALL_STALL_TIMEOUT, a test-only setting like the otherCAMEL_INSTALL_*variables.install.ps1is unchanged: in PowerShell 7,-TimeoutSecalso limits the total time, and Windows PowerShell 5.1 already has a 5-minute read timeout.The checksum of
install.shin the website manifest is generated at release time (WebsiteManifestGenerator), so nothing committed has to change for it.Tests
WebsiteInstallTest$PosixShell#givesUpOnAStalledDownload: a server sends the headers and half of the archive, then keeps the connection open. WithCAMEL_INSTALL_STALL_TIMEOUT=2the installer fails within seconds and installs nothing. With the old script, the test hangs until the server closes the connection after 60 s, and fails.PosixShellinstaller tests pass.Claude Code on behalf of Claus Ibsen (davsclaus)
🤖 Generated with Claude Code