Support startFrom on List Blobs - #2688
Open
gaul wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for the startFrom query parameter (introduced in Blob service version 2026-02-06) to container blob listing so clients can begin listings at an arbitrary blob name (inclusive), composing correctly with marker (exclusive).
Changes:
- Accepts API version
2026-02-06and plumbsstartFromfrom the raw request query into list-blobs handlers. - Implements
startFromfiltering in both Loki and SQL blob metadata stores, composing with existingmarkerandprefixfiltering. - Adds a test that exercises
startFromfor flat listings by rewriting the request query on the wire.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/blob/apis/container.test.ts | Adds a new integration test for startFrom with listBlobsFlat via query rewriting. |
| src/blob/utils/constants.ts | Adds 2026-02-06 to the accepted Blob service API versions. |
| src/blob/persistence/SqlBlobMetadataStore.ts | Adds inclusive startFrom filtering using Op.gte, composing with marker and prefix. |
| src/blob/persistence/LokiBlobMetadataStore.ts | Adds inclusive startFrom filtering in the Loki query chain, composing with marker. |
| src/blob/persistence/IBlobMetadataStore.ts | Extends listBlobs interface to include an optional startFrom parameter. |
| src/blob/handlers/ContainerHandler.ts | Passes startFrom from the request query into both flat and hierarchical list-blobs flows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1746
to
+1749
| new QueryRequestPolicyFactory( | ||
| "restype=container", | ||
| `restype=container&startFrom=${startFrom}` | ||
| ) |
Comment on lines
786
to
792
| options.prefix, | ||
| options.maxresults, | ||
| marker, | ||
| includeSnapshots, | ||
| includeUncommittedBlobs | ||
| includeUncommittedBlobs, | ||
| request.getQuery("startFrom") | ||
| ); |
Service version 2026-02-06 adds a startFrom query parameter to List Blobs, which begins a listing at a given blob name. Azurite accepts that version but ignored the parameter, so a client asking to start partway through was handed the container from the beginning. Unlike marker, which is a name Azurite has already returned and which it treats as exclusive, startFrom names any blob and includes it. The two compose rather than conflict: paging a listing that began at startFrom carries a marker past it, so both filters can apply and neither has to exclude the other. Both metadata stores learn the parameter, and the handlers read it off the request rather than the generated operation parameters, since the swagger this repository generates from predates it. The tests drive the parameter by rewriting the query of a SAS-authenticated request, the same way the include= tests do, because the JavaScript SDK this repository depends on has no startFrom yet. A blob name is arbitrary text, so the value is encoded as a client would have to encode it, and one of the names carries an ampersand: unencoded it would end the parameter early and leave a startFrom that admits a blob too many. The hierarchical listing takes the parameter too, so it is covered as well. A delimiter squashes blobs into prefixes after startFrom has selected them, so a prefix survives exactly while one of its blobs does.
gaul
force-pushed
the
list-blobs-start-from
branch
from
July 31, 2026 23:26
d915511 to
f12ab95
Compare
This was referenced Jul 31, 2026
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.
Service version 2026-02-06 adds a startFrom query parameter to List
Blobs, which begins a listing at a given blob name. Azurite accepts that
version but ignored the parameter, so a client asking to start partway
through was handed the container from the beginning.
Unlike marker, which is a name Azurite has already returned and which it
treats as exclusive, startFrom names any blob and includes it. The two
compose rather than conflict: paging a listing that began at startFrom
carries a marker past it, so both filters can apply and neither has to
exclude the other.
Both metadata stores learn the parameter, and the handlers read it off
the request rather than the generated operation parameters, since the
swagger this repository generates from predates it.
The tests drive the parameter by rewriting the query of a
SAS-authenticated request, the same way the include= tests do, because
the JavaScript SDK this repository depends on has no startFrom yet. A
blob name is arbitrary text, so the value is encoded as a client would
have to encode it, and one of the names carries an ampersand: unencoded
it would end the parameter early and leave a startFrom that admits a blob
too many.
The hierarchical listing takes the parameter too, so it is covered as
well. A delimiter squashes blobs into prefixes after startFrom has
selected them, so a prefix survives exactly while one of its blobs does.