Skip to content

[EndpointUri PR 3/4] Update codegen to use the EndpointUrl#7160

Merged
alextwoods merged 2 commits into
feature/master/endpoint-remove-urifrom
alexwoo/endpoint-remove-uri-pr3
Jul 20, 2026
Merged

[EndpointUri PR 3/4] Update codegen to use the EndpointUrl#7160
alextwoods merged 2 commits into
feature/master/endpoint-remove-urifrom
alexwoo/endpoint-remove-uri-pr3

Conversation

@alextwoods

Copy link
Copy Markdown
Contributor

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

  • I confirm that this pull request can be released under the Apache 2 license

…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.
@alextwoods
alextwoods requested a review from a team as a code owner July 17, 2026 20:56

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.

IfendpointCaching is no longer needed, should we remove it?

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.

Good call - removed!

@alextwoods
alextwoods merged commit 77f5539 into feature/master/endpoint-remove-uri Jul 20, 2026
3 of 4 checks passed
@github-actions

Copy link
Copy Markdown

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.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 20, 2026
@alextwoods
alextwoods deleted the alexwoo/endpoint-remove-uri-pr3 branch July 20, 2026 16:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants