Repository navigation
chore: build java release CLIs against Maven Central - #652
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 48 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
java-sdk releases don't attach cmdline.jar to their GitHub Releases, so every java release xtest used fell back to a full source build, whose sdk module runs `buf generate` against buf.build. With a dozen xtest jobs doing that at once, BSR rate limits fail the run. When a release has no cmdline.jar asset, install_java_release now checks Maven Central for io.opentdf.platform:sdk at that version and, if present, builds only the parent pom and the cmdline module of the tag (mvn -pl .,cmdline), resolving sdk* from Central. No codegen, no BSR calls. It uses its own local Maven repo so a same-versioned head installed into ~/.m2 can't shadow the release. Any failure still raises InstallError, so setup-cli-tool falls back to the full source build. java `latest` no longer resolves to head:true when no release has a cmdline.jar asset; it is a normal release row, so it takes the path above and is tested as published rather than rebuilt against the platform under test. setup-cli-tool gains a needs-build output (any head, or any release whose artifact install failed), and the java make steps gate on it instead of on heads. Previously a run whose only java versions were releases checked out the fallback source but never built it. DSPX-5177 Signed-off-by: Dave Mihalcik <dmihalcik@virtru.com>
7639a94 to
e7dcb36
Compare
|
X-Test Failure Report |



Summary
java-sdk releases don't attach
cmdline.jarto their GitHub Releases, andcmdlineisn't published to Maven Central. So every Java release that xtest uses has been built from source with a fullmvn clean install. That build'ssdkmodule runsbuf generateagainst buf.build. With a dozen xtest jobs doing this at the same moment, BSR returnsresource_exhausted: too many requestsand fails the run (e.g. 38632037584 on #571). This is DSPX-5177.Everything
cmdlinedepends on (sdk-pom,sdk,sdk-pqc-bc,sdk-fips-bc) is on Maven Central. This PR builds just the CLI against those published jars.Changes (
otdf-sdk-mgr)install_java_release: when the GitHub Release has nocmdline.jar, the installer checks Maven Central forio.opentdf.platform:sdk:<version>. If it's there, it shallow-clones the tag into a temp dir and runsmvn -pl .,cmdline package, sosdk*resolves from Central and no codegen or BSR calls happen.src/so the javaMakefiledoesn't rebuild it.~/.m2/otdf-sdk-mgr-releases. java-sdkmaincarries the last release's version (currently0.19.1), so ansdkthat a head buildmvn installed into~/.m2/repositorywould otherwise shadow the release. I hit this locally: the v0.19.1cmdlinefailed to compile againstmain's sdk.InstallError, sosetup-cli-toolfalls back to today's full source build.versions resolve java latest: no longer returnshead: truewhen no release has acmdline.jarasset. It's now an ordinary release row and takes the path above.latestis no longer rebuilt against the platform under test viaPLATFORM_BRANCH. It's tested as published.install stable java: drops thehas_clifilter, which had made it skip Java entirely.No workflow changes: JDK and Maven are already set up before
setup-cli-toolin every job that installs Java.Expected effect
In a run like 38632037584, each job's v0.19.1 build no longer calls BSR. Combined with opentdf/java-sdk#419 (which stops
attach-sourcesfrom running codegen a second time), BSR traffic per run drops from about 96 to about 24buf generatepasses. Only real heads still build from source. Building each head once per run is a separate follow-up.Testing
sdkfor every release since 0.7.2 except 0.8.0 and 0.17.0. Those fall back to a source build.mvn -pl .,cmdline packagechecked against an empty local repo:latest): builds, zerobufcalls.bufcalls, with Maven 3.9.11 as on the runners. Maven 3.10 rejects that tag'ssdk/pom.xmlfor a duplicate plugin declaration in thefuzzprofile.otdf-sdk-mgr install artifact --sdk java --version v0.19.1 --dist-name v0.19.1takes the new path, andcmdline.jar --versionreports{"version":"0.19.1","tdfSpecVersion":"4.3.0"}, whichcli.sh supportsgates on.tests/test_installers.pyand updatedtest_resolve.py.ruff check,ruff format,pyrightandpytest(144 passed) are all clean.Summary by CodeRabbit