Repository navigation
feat: sourceBranch, comment, merge, multipart upload and 503 retry - #121
Merged
Merged
Conversation
- sourceBranch in the config (builder, VRT_SOURCEBRANCH, vrt.json): the branch whose baselines a new branch compares against. The 7-argument config constructor is kept. - TestRunOptions.comment and TestRunOptions.merge. - track(name, byte[]) and track(name, Path) upload through POST /test-runs/multipart, which is not bound by BODY_PARSER_JSON_LIMIT. The 413 hint names the limit of the endpoint that was used. - A 503 with Retry-After is retried up to 3 times, waiting at most 60 s each. - httpTimeoutInSeconds 0 means no read limit instead of failing every request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t hint from the caller Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…etry-After and Content-Length Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Newer JDKs send a body of unknown length chunked, which some proxies refuse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 2, 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.
Brings sdk-java to the phase 2 SDK contract shared by all four SDKs. Builds on Java 11 and Gradle 6.1 like
master, so it can be released as a minor before the toolchain PR.Proposed release:
5.6.0. Nothing public is removed. Merge this before the toolchain PR, which is rebased on top of it.What changes
sourceBranchVRT_SOURCEBRANCH,vrt.json. Sent with every test run, JSON and multipartcommentTestRunOptions.commentmergeTestRunOptions.mergetrack(name, Path)andtrack(name, byte[])post to/test-runs/multipart. The image is not copied (ofByteArrays), andContent-Lengthis sentRetry-Aftermin(Retry-After, 60 s). No retry without the header, or for other statusesMULTIPART_FILE_SIZE_LIMIThttpTimeoutInSeconds0IllegalArgumentException)The 7-argument
VisualRegressionTrackerConfigconstructor is kept. New code uses the builder.Upgrade note: because of the new
trackoverloads, a call with a literalnullor a bare Mockitoany()as the image is ambiguous. UseanyString()/any(String.class)instead.Rows already met (checked against the code)
apiUrl,apiKey,project,branchName,ciBuildId,enableSoftAssert,httpTimeoutInSeconds(default 360, connect 10 s). Sources are envVRT_*andvrt.json; precedence per field is builder > env > file.os,browser,viewport,device,customTags,diffTollerancePercent,ignoreAreas, base64.id,status(6 statuses plusUNKNOWNwith a warning), andurl;imageUrl/diffUrl/baselineUrlvia/images/;NEWandUNRESOLVEDfail, and soft assert logs them.TestRunException.getStatusCode()carries the server's message;IOException, which never includes headers, so noapiKey.Not in this PR
apiUrlwith a trailing slash still produces//test-runs. The server accepts it, but sdk-python strips the slash. Worth a follow-up.Verification
./gradlew checkon Java 11: 59 tests. Every new behaviour got a failing test first.visualregressiontracker/api:6.0.0-rc1, using the compose file from examples-java CI:Pathtracking;commentis stored;release-*, a build onfeature-*withsourceBranch=release-*getsOKinstead ofNEW;merge=truecomes back on the result;UNRESOLVED;stop()ends the build.Retry-Afteris covered by unit tests only: the rc1 server's diff queue can't be filled on demand.🤖 Generated with Claude Code