davsclaus opened a new pull request, #30125:
URL: https://github.com/apache/camel/pull/30125

   ## What
   
   Item 4 of CAMEL-27004 (split from CAMEL-26914): `install.sh` ran `curl` and 
`wget` with no connect or read limits. A mirror that stopped sending hung the 
installer for as long as it kept the connection open. `camel self-update` gives 
up on the installer after 5 minutes, but someone running `curl ... | sh` waited 
forever.
   
   - **curl**: `--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.
   - **wget**: `--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 other `CAMEL_INSTALL_*` variables. `install.ps1` is unchanged: in 
PowerShell 7, `-TimeoutSec` also limits the total time, and Windows PowerShell 
5.1 already has a 5-minute read timeout.
   
   The checksum of `install.sh` in 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. With 
`CAMEL_INSTALL_STALL_TIMEOUT=2` the 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.
   - All 86 `PosixShell` installer tests pass.
   
   _Claude Code on behalf of Claus Ibsen (davsclaus)_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to