Skip to content

CAMEL-27004: camel-launcher - install.sh gives up on a download that cannot connect or stalls - #30125

Merged
davsclaus merged 1 commit into
mainfrom
CAMEL-27004-install-script-timeouts
Nov 16, 2026
Merged

davsclaus merged 1 commit into
mainfrom
CAMEL-27004-install-script-timeouts

Conversation

@davsclaus

Copy link
Copy Markdown
Contributor

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

…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>
@davsclaus davsclaus added this to the 4.24.0 milestone Nov 15, 2026
@davsclaus davsclaus added dsl bug Something isn't working labels Nov 15, 2026
@davsclaus davsclaus self-assigned this Nov 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@gnodet

gnodet commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

🔄 Backport Bot

This bugfix targets main and may need porting to:

  • camel-4.22.x

Add a port/<branch> label to automatically create a backport PR for that branch.

Backport PRs will be created automatically on merge (once a port label is added). Comment /port to create them immediately.

ℹ️ If you push additional commits after /port, use /port again to update the port PRs.

@github-actions

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-jbang/camel-launcher

🔬 Scalpel shadow comparison — Scalpel: 1 of 726 tested, 0 compile-only — current: 1 all tested

Maveniverse 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)
  • camel-launcher-container ← downstream of org.apache.camel:camel-launcher

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

💡 Manual integration tests recommended:

You modified dsl/camel-jbang/camel-launcher. The related integration tests in dsl/camel-jbang/camel-jbang-it are excluded from CI. Consider running them manually:

mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
All tested modules (2 modules, 0.9s total)

Total reactor time: 0.9s

Module Duration Status
Camel :: Launcher :: Container 0.9s SUCCESS
Camel :: Launcher n/a

Top 20 slowest modules:

  • Camel :: Launcher :: Container (0.9s)

⚙️ View full build and test results

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@davsclaus
davsclaus merged commit 21b8ed8 into main Nov 16, 2026
13 checks passed
@davsclaus
davsclaus deleted the CAMEL-27004-install-script-timeouts branch November 16, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dsl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants