STG 103 File List Ranges Continuation Token#39232
Open
aanubhav-msft wants to merge 9 commits into
Open
Conversation
… getRangeList/getRangeListDiff
…tion params from updatedOptions
…ariant assertions, and update recordings
… and fix module layering
Contributor
There was a problem hiding this comment.
Pull request overview
Adds paginated file-range listing with continuation-token support to @azure/storage-file-share.
Changes:
- Adds
listRanges()andlistRangesDiff()paged APIs. - Updates generated code to Storage API
2026-10-06. - Adds range-merging logic, tests, recordings, and API documentation.
Reviewed changes
Copilot reviewed 11 out of 27 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tsp-location.yaml |
Updates the TypeSpec source commit. |
test/utils.spec.ts |
Tests range merging. |
test/fileclient.spec.ts |
Tests new range-listing APIs. |
src/utils/utils.common.ts |
Merges populated and cleared ranges. |
src/generatedModels.ts |
Adds the public range item model. |
src/generated/static-helpers/serialization/get-binary-stream-response.ts |
Adds Node stream handling. |
src/generated/static-helpers/serialization/get-binary-stream-response-react-native.mts |
Adds React Native mapping. |
src/generated/static-helpers/serialization/get-binary-stream-response-browser.mts |
Adds browser stream handling. |
src/generated/static-helpers/platform-types.ts |
Defines the Node stream type. |
src/generated/static-helpers/platform-types-react-native.mts |
Defines the React Native variant. |
src/generated/static-helpers/platform-types-browser.mts |
Defines the browser variant. |
src/generated/models/models.ts |
Adds paginated response models and API version. |
src/generated/models/index.ts |
Exports the paginated model. |
src/generated/index.ts |
Exports generated range APIs. |
src/generated/classic/file/index.ts |
Exposes listAllRanges. |
src/generated/api/share/operations.ts |
Updates share operations’ API version. |
src/generated/api/service/operations.ts |
Updates service operations’ API version. |
src/generated/api/file/options.ts |
Adds pagination protocol options. |
src/generated/api/file/operations.ts |
Implements the protocol operation. |
src/generated/api/file/index.ts |
Exports the protocol operation. |
src/generated/api/directory/operations.ts |
Updates directory operations’ API version. |
src/Clients.ts |
Implements the public paginated iterators. |
review/storage-file-share-node.api.md |
Records the Node API surface. |
review/storage-file-share-browser.api.diff.md |
Updates browser API differences. |
metadata.json |
Records API version and definitions. |
CHANGELOG.md |
Announces the new APIs and deprecations. |
assets.json |
Updates test-recording assets. |
…es snippets/README and diff pagination test, and link changelog entries
…o feature/storage/STG103_PaginateFileGetRanges
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.
Packages impacted by this PR
@azure/storage-file-shareIssues associated with this PR
Describe the problem that is addressed by this PR
The existing
ShareFileClient.getRangeList()andShareFileClient.getRangeListDiff()methods return the complete list of file ranges in a single, non-paginated response. For files with a very large number of ranges, this can be inefficient and does not allow callers to consume results page-by-page or resume via a continuation token.This PR adds paginated variants that list file ranges as a
PagedAsyncIterableIteratorwith continuation-token support, backed by the new2026-10-06service API version (listAllRangesREST operation,comp=rangelistwithmarker/maxresults).What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?
Are there test cases added in this PR? (If not, why?)
Yes.
test/fileclient.spec.ts: end-to-end tests forlistRanges,listRangeswith a share snapshot,listRangesby page,listRangeswith a continuation token,listRangesDiff, listing ranges on an empty file, and interleaving of cleared/populated diff ranges.test/utils.spec.ts: unit tests forextractShareFileRangeItemscovering equal-start ordering, interleaving, leftover ranges from either side, and empty inputs.assets.jsontag bump).Provide a list of related PRs (if any)
Command used to generate this PR:**(Applicable only to SDK release request PRs)
Checklists