build: Fix py3-sdk maven dependency - #8901
Conversation
Greptile SummaryThis PR hardens the
Confidence Score: 4/5Safe to merge once the JAVA_BINDINGS_MAVEN_VERSION default gap is resolved — any build omitting that build-arg will pass an empty value to install_dependencies_and_build.sh and fail at the Java bindings step. The Maven URL migration and curl retry logic are sound. The build-parallelism cap is a reasonable OOM guard. The main concern is that the top-level ARG JAVA_BINDINGS_MAVEN_VERSION=3.9.9 was removed while the same variable is still declared without a default in sdk_build (line 118) and consumed without a guard at line 149. Dockerfile.sdk — specifically lines 118 and 149 where JAVA_BINDINGS_MAVEN_VERSION is declared without a default and then forwarded to install_dependencies_and_build.sh. Important Files Changed
Reviews (7): Last reviewed commit: "build: Lower limit of the parallel threa..." | Re-trigger Greptile |
What does the PR do?
Fixes two failure modes in the
py3-sdkclient/SDK image build (Dockerfile.sdk):wgetfetch of Apache Maven (which flaked withexit code: 4/Network is unreachableagainst archive.apache.org) withcurl -fSLk --retry 3, and switches the pinned version to a full URL build-arg (JAVA_BINDINGS_MAVEN_URL, Maven 3.9.16) that CI already points at the internal Artifactory mirror. The extracted dir is resolved with a glob-based symlink and the install is verified withmvn --version.--parallel 16. A barecmake --build --parallelemits an unboundedmake -j, which spawned onecc1plusper ready gRPC translation unit (1–2+ GB each) and tripped the OOM killer (cannot allocate memory). 16 matches the RHEL Dockerfile's existing-j16.Checklist
<commit_type>: <Title>Commit Type:
Related PRs:
N/A — server-only change.
Where should the reviewer start?
Dockerfile.sdk— the "Install Maven 3.9+ manually" block (ARG JAVA_BINDINGS_MAVEN_URL+ thecurl … | tar | ln -s | mvn --versionRUN) and the client buildRUN … cmake --build . -v --parallel 16 ….Test plan:
Rebuild
py3-sdkand confirm the Maven step pulls 3.9.16 from Artifactory andmvn --versionsucceeds. Verified in pipeline 59299689 (py3-sdkgreen — Maven step + capped client build both pass).Confirm the client build no longer OOMs on the
dl325g11-*builder class.CI Pipeline ID: 59299689
Caveats:
curl -kskips TLS verification for the tarball fetch (retains prior lenient behavior on the internal build network);--retry 3absorbs transient drops. The credentialedJAVA_BINDINGS_MAVEN_URLbuild-arg is not exposed in the published image (multi-stage build discards thesdk_buildstage history — verified against the built SDK image).Background
CI
py3-sdk/py3-sdk-rhelintermittently failed fetching apache-maven from archive.apache.org (wget … exit code: 4), andpy3-sdkseparately OOM'd during the gRPC client compile. This makes both steps resilient.Related Issues:
- Resolves: TRI-1621
CI (internal): [#59299689](http://tritonserver.local/ci/pipelines/59299689)