Improve reliability of the sbt launcher SHA-1 checksum download#329
Open
Malax wants to merge 1 commit into
Open
Improve reliability of the sbt launcher SHA-1 checksum download#329Malax wants to merge 1 commit into
Malax wants to merge 1 commit into
Conversation
edmorley
reviewed
Jun 10, 2026
|
|
||
| local sha1_curl_exit_code=$? | ||
|
|
||
| if [[ "${sha1_curl_exit_code}" -ne 0 || "${sha1_http_status_code}" != "200" ]]; then |
Member
There was a problem hiding this comment.
I don't think this approach will work, since set -e will cause the script to be aborted before this runs?
Is this more complex approach needed? The original if ! <command>; then <print error>; exit 1; fi pattern works very well and is what I use for Python etc.
Member
Author
There was a problem hiding this comment.
This is actually a very good catch - I copied that pattern from another place in this buildpack. That one will be broken too. I didn't even question it. I'll create a separate PR for fixing that and update this one.
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.
The SHA-1 checksum download for the
sbtlauncher used a barecurlinvocation without retries, timeouts, or HTTP status code checks. This makes it match the established best practices already used for thesbtlauncher jar download in the same function:--retry 3,--retry-connrefused,--connect-timeout 5,--max-time 60, and an explicit HTTP status code check. The error message also now includes the failing URL, HTTP status, and curl exit code.W-22927377