Skip to content

feat(gax): add ResumableUploadClient.startUpload() and supporting types - #14138

Merged
whowes merged 1 commit into
mainfrom
whowes/resumable-upload-client
Aug 28, 2026
Merged

feat(gax): add ResumableUploadClient.startUpload() and supporting types#14138
whowes merged 1 commit into
mainfrom
whowes/resumable-upload-client

Conversation

@whowes

@whowes whowes commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

HTTP/JSON client implementation for startUpload is in #14139.

gemini-code-assist[bot]

This comment was marked as outdated.

@whowes whowes changed the title whowes/resumable upload client feat(gax): add ResumableUploadClient SPI and types Aug 19, 2026
@whowes whowes changed the title feat(gax): add ResumableUploadClient SPI and types feat(gax): add ResumableUploadClient.startUpload() and supporting types Aug 19, 2026
@whowes
whowes force-pushed the whowes/resumable-upload-client branch from c0e396a to 3f2b223 Compare August 19, 2026 23:36
@whowes

whowes commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@whowes
whowes force-pushed the whowes/resumable-upload-client branch from 3f2b223 to dd5cb3e Compare August 20, 2026 00:10

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces low-level resumable upload components to the GAX library, including the ResumableUploadClient interface, the ResumableUploadSession metadata class, and the StartUploadRequest configuration class, along with their corresponding unit tests. The reviewer's feedback suggests a minor readability and performance improvement in StartUploadRequest.Builder to assign the result of getPath() to a local variable instead of invoking the getter multiple times.

@whowes whowes changed the title feat(gax): add ResumableUploadClient.startUpload() and supporting types feat(gax): add ResumableUploadClient.startUpload() and supporting types Aug 20, 2026
@whowes
whowes force-pushed the whowes/resumable-upload-client branch from dd5cb3e to 4758549 Compare August 21, 2026 00:37
@whowes
whowes force-pushed the whowes/resumable-upload-client branch from 4758549 to 0229e07 Compare August 24, 2026 19:40
@whowes
whowes force-pushed the whowes/resumable-upload-client branch from 0229e07 to fad9e9c Compare August 25, 2026 01:03
@whowes
whowes force-pushed the whowes/resumable-upload-client branch 2 times, most recently from 083072d to 6878a77 Compare August 25, 2026 21:44
@whowes
whowes force-pushed the whowes/resumable-upload-client branch from 6878a77 to 83f8c5b Compare August 25, 2026 22:00

/** Returns the optional initial JSON request payload. */
@Nullable
public abstract String getJsonPayload();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this for the proto message (e.g. CreateVideoRequest) defined in the RPC?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - expanded the comment to clarify this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use a proto type instead of String? Or when we made it here, the proto message has already been serialized?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pushing on this - I do think it makes sense for this interface to accept/return protos rather than JSON, and have serialization/deserialization happen in the impl.

While implementing that (in a subsequent PR) it became pretty clear that the other concerns in this request POJO (path and query params) are retrievable from the ApiMethodDescriptor associated with the resumable upload-powered method (along with the request formatter and response parser). So if the client impl is created with a reference to that descriptor (similarly to long running clients), there's actually no reason to have a separate container—just passing the request proto is sufficient.

@whowes
whowes force-pushed the whowes/resumable-upload-client branch from 83f8c5b to 55ce02f Compare August 26, 2026 17:56
@whowes
whowes force-pushed the whowes/resumable-upload-client branch 2 times, most recently from 96a4d11 to cd7189e Compare August 26, 2026 18:28
@whowes
whowes force-pushed the whowes/resumable-upload-client branch 3 times, most recently from a362b5f to 7199b9d Compare August 27, 2026 20:58
@whowes
whowes force-pushed the whowes/resumable-upload-client branch 2 times, most recently from 04b2e13 to 854ebb2 Compare August 28, 2026 01:34
@whowes
whowes force-pushed the whowes/resumable-upload-client branch 2 times, most recently from adb6a7d to efc1a40 Compare August 28, 2026 16:49
@whowes
whowes force-pushed the whowes/resumable-upload-client branch from efc1a40 to f1e5a2a Compare August 28, 2026 17:02
@whowes
whowes force-pushed the whowes/resumable-upload-client branch from f1e5a2a to df3845d Compare August 28, 2026 17:23
@whowes
whowes force-pushed the whowes/resumable-upload-client branch from df3845d to 251a1f0 Compare August 28, 2026 19:11
@whowes
whowes marked this pull request as ready for review August 28, 2026 19:11
@whowes
whowes requested review from a team as code owners August 28, 2026 19:11
@whowes
whowes force-pushed the whowes/resumable-upload-client branch from 251a1f0 to 8b0416c Compare August 28, 2026 20:51
Base automatically changed from whowes/get-first-header to main August 28, 2026 21:40
@whowes
whowes force-pushed the whowes/resumable-upload-client branch from 8b0416c to b034273 Compare August 28, 2026 21:40
@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'gapic-generator-java-root'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@whowes
whowes merged commit d7e2be2 into main Aug 28, 2026
304 of 306 checks passed
@whowes
whowes deleted the whowes/resumable-upload-client branch August 28, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants