Skip to content

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

Open
alextwoods wants to merge 1 commit into
feature/master/endpoint-remove-urifrom
alexwoo/endpoint-remove-uri-pr3
Open

[EndpointUri PR 3/4] Update codegen to use the EndpointUrl#7160
alextwoods wants to merge 1 commit 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
private final SymbolTable symbolTable;
private final Map<String, KeyTypePair> knownEndpointAttributes;
private final Map<String, ComputeScopeTree.Scope> ruleIdToScope;
private final boolean endpointCaching;

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?

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.

3 participants