feat(codegen): fill URI/endpoint-bound members for the CRaC warm-up call and warm sync/async clients independently#7183
Open
joviegas wants to merge 2 commits into
Conversation
…all and warm sync/async clients independently
joviegas
commented
Jul 24, 2026
| try { | ||
| task.run(); | ||
| return true; | ||
| } catch (RuntimeException | LinkageError e) { |
Contributor
Author
There was a problem hiding this comment.
This behaviour is same ad before, as part of this PR moved it to a function so that this can be resused.
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.
Motivation and Context
The CRaC warm-up selector did not select an operation that has a required member bound to the URI path or to an endpoint context param. These members do not accept null. Some services have this member on every candidate operation. For these services, the selector found no operation. Thus the SDK did not prime the marshalling path or the signing path before the checkpoint.
Also,
warmUp()warmed the sync client and the async client in one flow. If one client failed, the other client did not warm.Modifications
WarmUpOperationSelector): Accept an operation when all of its required URI/endpoint-bound members are of typeString. TheallDummyMembersAreFillablegate does this check. Add themembersRequiringDummyValuehelper and theisArnMemberhelper.WarmUpProviderSpec): Emit a dummy value for each required bound member. Use"warmup"for a plain member. Use an ARN value for an ARN member. Move the client build into the sharedclientBuilderhelper and theaddServiceSpecificOptionshelper (bearer token, endpoint-discovery disable). The sync path and the async path share these helpers.SdkWarmUpProvider.warmUp(),TargetedWarmUpInvoker): Route both paths through the sharedWarmUpDiscovery.runSafely(description, task)helper. The sync client and the async client warm on their own. If one client fails, the SDK writes a warn log and continues to warm the other client.Modules that always need each fix
Fix A. Dummy value for a required URI-path or endpoint-bound member. These modules have a required member that the marshaller rejects on null. They now get
.member("warmup").These modules need a dummy value for a required URI-path member:
apigatewaymanagementapi,iotjobsdataplane,lexruntime,lexruntimev2,quicksight,sagemakerruntime,sagemakerfeaturestoreruntime,workmailmessageflow,ebs,chimesdkmeetings,amplifyuibuilder,marketplacedeployment,eksauth,geomaps,transcribestreaming.One module needs a dummy value for an endpoint context param:
s3controlAccountIdendpoint context param (validated only as a host label, so"warmup"works)Fix A (selector gate). No dummy value is possible, so the provider builds the client only.
cloudfrontkeyvaluestoreKvsARNis ARN-validated by the endpoint rules (aws.parseArn), so no dummy value works. The selector skips it and generates a client-build-only provider.Fix B. Bearer-token auth.
codecatalyst.tokenProvider(StaticTokenProvider.create(() -> "warmup-dummy-token"))so it does not fall through to the profile/SSO token chain and fail.Fix C. Endpoint-discovery WARN suppression.
timestreamwrite.endpointDiscoveryEnabled(false)to stop the client constructor logging a WARN about the endpoint override disabling discoverytimestreamqueryTesting
License