Skip to content

feat(gax): wire-level changes for resuming uploads - #14870

Draft
whowes wants to merge 1 commit into
mainfrom
whowes/resumable-upload-resume-wire
Draft

whowes wants to merge 1 commit into
mainfrom
whowes/resumable-upload-resume-wire

Conversation

@whowes

@whowes whowes commented Oct 30, 2026

Copy link
Copy Markdown
Contributor
  • parse chunk granularity from query responses so that user-provided chunk size on resume can be aligned to the server's granularity when present
  • stop populating the Authorization header for query, upload, and finalize commands, as it's only required for start
  • consolidate header name constants and parseChunkGranularity (now used in both start and query) into a new ResumableUploadHeaders class

@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 refactors HTTP/JSON resumable upload logic by introducing a shared ResumableUploadHeaders utility class to centralize header constants and parsing logic. It also updates ResumableUploadChunkCallable and ResumableUploadQueryStatusCallable to omit credentials and reset the EndpointContext for self-authenticating session URLs. Additionally, chunk granularity parsing has been integrated into the query status flow, and corresponding unit tests have been added. Feedback suggests avoiding the use of HttpJsonStatusCode.of when creating a StatusCode for internal exceptions to prevent incorrect classification of errors as recoverable, recommending an anonymous implementation of StatusCode instead.

@whowes
whowes added this pull request to stack #14871 October 30, 2026 23:27
@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

This branch has not been deployed

No deployments
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.

1 participant