fix(java): Add retry logic for transient SDKMAN bootstrap failures#1688
Open
V-Subhankar-infy wants to merge 5 commits into
Open
fix(java): Add retry logic for transient SDKMAN bootstrap failures#1688V-Subhankar-infy wants to merge 5 commits into
V-Subhankar-infy wants to merge 5 commits into
Conversation
Added a retry mechanism for SDK installation and SDKMAN CLI installation.
Mandatory minor bump for fixing the sdkman transient error
V-Subhankar-infy
enabled auto-merge (squash)
July 20, 2026 08:34
V-Subhankar-infy
marked this pull request as draft
July 20, 2026 09:07
auto-merge was automatically disabled
July 20, 2026 09:07
Pull request was converted to draft
Java version updated due to upstream update from sdkman.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce intermittent failures in the Java feature by adding retry logic around SDKMAN installation/SDK-based installs, addressing transient HTTP 503 errors during SDKMAN bootstrap and candidate downloads.
Changes:
- Added a
run_with_retrieshelper and applied it to SDKMAN bootstrap andsdk installoperations insrc/java/install.sh. - Bumped the Java feature version to
1.8.1. - Updated the “latest” Java test expectation in
test/java/install_latest_version.sh.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/java/install.sh |
Introduces and applies retry logic for SDKMAN bootstrap and SDK-based installs. |
src/java/devcontainer-feature.json |
Bumps feature version to reflect behavioral change. |
test/java/install_latest_version.sh |
Updates latest-version assertion (and currently contains a quoting bug in the hello-world check). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
V-Subhankar-infy
marked this pull request as draft
July 20, 2026 13:19
V-Subhankar-infy
marked this pull request as ready for review
July 20, 2026 13:55
V-Subhankar-infy
enabled auto-merge (squash)
July 20, 2026 13:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: Java feature transient SDKMAN 503 failures
Problem
The Java feature fails intermittently when
get.sdkman.ioreturns HTTP 503 during bootstrap/install. No recovery mechanism exists, causing build failures and manual reruns. Reported at #1684 & #454.Error:
curl: (22) The requested URL returned error: 503Solutions
1. Add Retry Logic (Temporary)
5 attempts, 10-second intervals (~50s total). Mirrors existing patterns in git, python, ruby, terraform features.
2. Switch to Alternative Package Source (Permanent)
Use OS package manager (
apt install openjdk-*) or direct Temurin downloads instead of SDKMAN.Current Choice: Retry Logic
Why temporary over permanent?
Strategy: Monitor for 2-3 weeks post-merge. If failures persist, revisit permanent solutions.
Implementation
Added to
src/java/install.sh:Applied to:
run_with_retries 5 10 "Installing SDKMAN" install_sdkman_clirun_with_retries 5 10 "Installing ${install_type} ${requested_version} via SDKMAN" ...Total change: ~30 lines
Testing & Validation
Deterministic proof:
Impact