Skip to content

feat(gax): add ApiCallContext and request-level settings overloads to ResumableUploadCallable - #14251

Merged
whowes merged 1 commit into
mainfrom
whowes/resumable-upload-call-context
Sep 11, 2026
Merged

feat(gax): add ApiCallContext and request-level settings overloads to ResumableUploadCallable#14251
whowes merged 1 commit into
mainfrom
whowes/resumable-upload-call-context

Conversation

@whowes

@whowes whowes commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

This is needed to meet the resumable upload requirement to allow custom headers and other settings to be applied on a per-call basis.

gemini-code-assist[bot]

This comment was marked as outdated.

@whowes
whowes force-pushed the whowes/resumable-upload-call-context branch 2 times, most recently from fc4a138 to 3a29329 Compare September 4, 2026 03:01
@whowes
whowes force-pushed the whowes/resumable-upload-call-context branch 5 times, most recently from 61f6c53 to a55db92 Compare September 4, 2026 22:09
@whowes
whowes force-pushed the whowes/resumable-upload-call-context branch from a55db92 to 26f88bb Compare September 4, 2026 22:35
@whowes
whowes force-pushed the whowes/resumable-upload-call-context branch from 26f88bb to 38e3b32 Compare September 4, 2026 23:35
@whowes
whowes force-pushed the whowes/resumable-upload-call-context branch from 38e3b32 to b599050 Compare September 5, 2026 00:51
@whowes
whowes force-pushed the whowes/resumable-upload-call-context branch 2 times, most recently from 1463b4d to 9cd06c0 Compare September 9, 2026 15:50
@whowes
whowes force-pushed the whowes/resumable-upload-call-context branch from 9cd06c0 to ade4784 Compare September 9, 2026 20:15
@whowes
whowes force-pushed the whowes/resumable-upload-call-context branch from ade4784 to 90370f3 Compare September 10, 2026 01:14
@whowes
whowes force-pushed the whowes/resumable-upload-call-context branch from 90370f3 to f13af44 Compare September 10, 2026 18:34
Base automatically changed from whowes/resumable-upload-factory to main September 11, 2026 07:45
@whowes
whowes force-pushed the whowes/resumable-upload-call-context branch 2 times, most recently from 2ffc81d to e688e1c Compare September 11, 2026 17:22
* @param settings request-level call settings overrides; may be {@code null}
* @return future for tracking and controlling the upload
*/
public ResumableUploadFuture<ResponseT> futureCall(

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.

I'm leaning towards only expose two methods for now.
futureCall(RequestT request, InputStream payload, @Nullable ResumableUploadCallSettings settings)
and
futureCall(RequestT request, InputStream payload, @Nullable ApiCallContext context, @Nullable ResumableUploadCallSettings settings).

This is inline with other callables that most of them expose two methods. One with ApiCallContext, one without it. We could try to expose more at the generated client level later.

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.

Done.

@whowes
whowes force-pushed the whowes/resumable-upload-call-context branch from e688e1c to efd92b6 Compare September 11, 2026 19:59
@whowes
whowes marked this pull request as ready for review September 11, 2026 20:03
@whowes
whowes requested review from a team as code owners September 11, 2026 20:03
… ResumableUploadCallable

Add 2-, 3-, and 4-argument overloads to ResumableUploadCallable for
futureCall and resumeCall, supporting:
1. Default context and settings (used by generated ServiceClient convenience methods).
2. Per-request ApiCallContext overrides for transport metadata (extra headers, credentials).
3. Per-request ResumableUploadCallSettings overrides for state-machine knobs.
4. Full method accepting both call context and settings overrides.

ResumableUploadCallableImpl performs a 3-tier precedence merge on settings
and merges ApiCallContext.
@whowes
whowes force-pushed the whowes/resumable-upload-call-context branch from efd92b6 to bdd7a62 Compare September 11, 2026 21:12
@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 e8cbd42 into main Sep 11, 2026
304 of 317 checks passed
@whowes
whowes deleted the whowes/resumable-upload-call-context branch September 11, 2026 21:49
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