Repository navigation
Add the sdkharness customer health check (golden path) - #219
Merged
Merged
Conversation
Adds a versioned .sdkharness/ contract with one scenario, health/golden-path: a single-file Java program that authorizes, uploads, downloads and compares the bytes, lists, deletes and confirms absence against the harness's loopback simulator. The harness builds the core and httpclient jars from this checkout and passes them as SDKHARNESS_JAVA_CLASSPATH; the build is unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
sophiecarreras
enabled auto-merge (squash)
October 9, 2026 05:18
ffumero2003
approved these changes
Oct 9, 2026
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.
Summary
Adds a versioned
.sdkharness/contract so Backblaze's centralized SDK quality harness can run a customer health check against this repository's own code. One scenario,health/golden-path:.sdkharness/tests.tsv: the one contract row (health golden-path simulator ./.sdkharness/tests/run-health)..sdkharness/tests/run-health(bash, executable): checks that the target is the loopback simulator (http://127.0.0.1:<port>), drops every ambientB2_*variable except the bucket name, and runs the Java program. It prints exactly oneSDKHARNESS_RESULTline..sdkharness/tests/health/GoldenPath.java: a single-file Java program (java -cp "$SDKHARNESS_JAVA_CLASSPATH" GoldenPath.java). It authorizes, uploads a small file, downloads it and compares the bytes, lists it, deletes it, and checks that it is gone. It points the SDK at the simulator withB2ClientConfig.Builder.setMasterUrl, so the requests go tob2api/v2as they do for customers today. It uses the simulator's fixed test credential only..sdkharness/README.md: what the check can and cannot reach, and how to run it by hand.No build or source changes.
settings.gradle.kts, the Gradle files andcore/andhttpclient/are untouched. The harness builds thecoreandhttpclientjars from the checked-out revision in its own scratch copy and passes them, with their runtime dependencies, asSDKHARNESS_JAVA_CLASSPATH.One choice to review: the SDK's default HTTP client accepts only
https, and the simulator serves plain HTTP on loopback. So the check enables the SDK's own test-server option,HttpClientFactoryImpl.Builder.setSupportInsecureHttp(true).run-healthrefuses any URL that is not loopback before the program starts.Verification
bin/run-health-checks.sh --target simulator b2-sdk-java) against the pinned standalone simulator (backblaze-labs/b2-simulatoratc4e48a1, which acceptsb2api/v2). The check was run from this branch at6b47141, with the jars the harness built from that revision: PASS, with oneSDKHARNESS_RESULT health golden-path PASSline.FAIL bucket: bucket no-such-bucket not found. The SDK really authorized and listed buckets against the simulator../gradlew buildis unaffected:.sdkharness/is not in any source set, andcheck_codeonly scanssrc/main.Merge note
A merge to
masterruns the existingci_cd.ymlpush steps: Upload to b2 (maybe_upload_build_results) and Deploy Javadoc togh-pages. The Maven deploy steps run only inb2-sdk-java-private. This PR does not change those steps; it only means that merging produces a normal master build upload and Javadoc refresh.Rollout
Until this merges, the harness records Java health as
candidate(not adopted). After it merges, a separate demand-side-ai change promotes the merged revision toactive. Java joins the daily Entry Points Testing run only at the end of the Java plan.Tracking: backblaze-labs/demand-side-ai#1065
🤖 Generated with Claude Code