[EndpointUri PR 3/4] Update codegen to use the EndpointUrl#7160
Merged
alextwoods merged 2 commits intoJul 20, 2026
Merged
Conversation
…oviders Update both rules1 (EndpointProviderSpec) and rules2 (CodeGeneratorVisitor) codegen to emit EndpointUrl.fromString() instead of URI.create() or SdkUri.getInstance().create() when building Endpoint objects in generated code. This is a uniform change: all URL expressions now go through EndpointUrl.fromString(urlString), which performs lightweight string splitting instead of full URI parsing. The endpointCaching/SdkUri path is no longer needed since EndpointUrl.fromString() is already cheaper than both URI.create() and SdkUri.
Contributor
There was a problem hiding this comment.
IfendpointCaching is no longer needed, should we remove it?
Contributor
Author
There was a problem hiding this comment.
Good call - removed!
zoewangg
approved these changes
Jul 17, 2026
jencymaryjoseph
approved these changes
Jul 20, 2026
alextwoods
merged commit Jul 20, 2026
77f5539
into
feature/master/endpoint-remove-uri
3 of 4 checks passed
|
This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This is PR 3/4 for replacing Uri.create in endpoint resolution with the light weight EndpointUrl.
Note: This PR merges to feature/master/endpoint-remove-uri and NOT to master
Previous PRs:
Modifications
Update both rules1 (EndpointProviderSpec) and rules2 (CodeGeneratorVisitor) codegen to emit EndpointUrl.fromString() instead of URI.create() or SdkUri.getInstance().create() when building Endpoint objects in generated code. This is a uniform change: all URL expressions now go through EndpointUrl.fromString(urlString), which performs lightweight string splitting instead of full URI parsing.
The endpointCaching/SdkUri path is no longer needed since EndpointUrl.fromString() is already cheaper than both URI.create() and SdkUri.
Testing
Updated codegen generation files - all existing tests pass (including endpoint resolution) - no new surface area to cover with these changes.
License