Refactor ClientMethod to Support Immutable Builders and Enhance Polling & Paging Metadata - #7015
Merged
Anu Thomas (anuchandy) merged 44 commits intoMay 9, 2025
Conversation
Contributor
|
No changes needing a change description found. |
Collaborator
|
You can try these changes here
|
Anu Thomas (anuchandy)
force-pushed
the
immutable-client-method
branch
15 times, most recently
from
April 25, 2025 06:35
8ad1ea7 to
79c3e7f
Compare
Anu Thomas (anuchandy)
force-pushed
the
immutable-client-method
branch
from
April 27, 2025 19:44
c33c769 to
8019291
Compare
Anu Thomas (anuchandy)
marked this pull request as ready for review
April 28, 2025 02:01
Member
Author
There was a problem hiding this comment.
This pull request may need to wait for Srikanta (@srnagar) pull request if it is expected to be ready soon. Alternatively, the new structure of ClientMethodMapper could be beneficial in terms of simplfying the ClientCoreClientMethodMapper in his pr (if it is in initial scope). I'll let Srikanta decide which option works best based on his plan for that PR.
…tadata for pagable oepration
…thod creator functions
…ds(..) and use it
…o a seperate function
…ther similar methods)
…work to extract fluent out of common client-method-mapper
…g pattern as ClientMethodMapper, naming consistency for all create-client-methods functions
…-client-method functions
…ncClientMethods, JavaDoc, var-names)
Anu Thomas (anuchandy)
force-pushed
the
immutable-client-method
branch
from
May 7, 2025 19:28
fd97b9c to
afc912c
Compare
Xiaofei Cao (XiaofeiCao)
approved these changes
May 8, 2025
Weidong Xu (weidongxu-microsoft)
approved these changes
May 8, 2025
github-merge-queue Bot
pushed a commit
that referenced
this pull request
May 20, 2025
…g parameter should-hide-check (#7337) This PR has the following changes - 1. Taking advantages of refactoring done in [#7015](#7015) for `ClientMethodMapper` there by deleting the additional code we no longer needed. 2. Centralizing the derivation and lookup of paging parameters to `PagingMetadata` and `MethodPageDetails `. 3. Removing relaxed paging parameter lookup instead using common strict lookup in all places (azure, client-core etc..). The AutoRest CI run is [green](https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4878954&view=results) with this PR's last commit [80bf3a9].
Dapeng Zhang (ArcturusZhang)
pushed a commit
to ArcturusZhang/typespec
that referenced
this pull request
May 21, 2025
…g parameter should-hide-check (microsoft#7337) This PR has the following changes - 1. Taking advantages of refactoring done in [microsoft#7015](microsoft#7015) for `ClientMethodMapper` there by deleting the additional code we no longer needed. 2. Centralizing the derivation and lookup of paging parameters to `PagingMetadata` and `MethodPageDetails `. 3. Removing relaxed paging parameter lookup instead using common strict lookup in all places (azure, client-core etc..). The AutoRest CI run is [green](https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4878954&view=results) with this PR's last commit [80bf3a9].
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.
The PR introduces structural changes to the
ClientMethodMapper- focusing on immutability, separation of concerns and consistency.ClientMethodMappernow avoids passing mutable builders, reducing potential for dev errors and improving clarity by eliminating the need to save and restore builder states.JavaSettings::PollingDetailshas been replaced withPollingSettings, which includes updated JavaDoc and improved readability.PagingMetadata) and long-running operations (PollingMetadata).PollingMetadataprocessesPollingSettingsand TypeSpec LRO-Metadata and exposes an immutableMethodPollingDetailsview on demand. Similarly,PagingMetadataprocesses TypeSpec paging information and presents an immutable MethodPagingDetails.PollingSettings,PollingMetadata, andMethodPollingDetailshave been renamed to use consistent names.ClientMethodsReturnDescriptionproperties.