Skip to content

Support startFrom on List Blobs - #2688

Merged
Akanksha Jain (jainakanksha-msft) merged 1 commit into
Azure:mainfrom
gaul:list-blobs-start-from
Aug 24, 2026
Merged

Support startFrom on List Blobs#2688
Akanksha Jain (jainakanksha-msft) merged 1 commit into
Azure:mainfrom
gaul:list-blobs-start-from

Conversation

@gaul

@gaulAndrew Gaul (gaul) commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

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.

CopilotAI lite review requested due to automatic review settings July 31, 2026 23:14

CopilotAI left a comment

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.

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-06 and plumbs startFrom from the raw request query into list-blobs handlers.
  • Implements startFrom filtering in both Loki and SQL blob metadata stores, composing with existing marker and prefix filtering.
  • Adds a test that exercises startFrom for 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
FileDescription
tests/blob/apis/container.test.tsAdds a new integration test for startFrom with listBlobsFlat via query rewriting.
src/blob/utils/constants.tsAdds 2026-02-06 to the accepted Blob service API versions.
src/blob/persistence/SqlBlobMetadataStore.tsAdds inclusive startFrom filtering using Op.gte, composing with marker and prefix.
src/blob/persistence/LokiBlobMetadataStore.tsAdds inclusive startFrom filtering in the Loki query chain, composing with marker.
src/blob/persistence/IBlobMetadataStore.tsExtends listBlobs interface to include an optional startFrom parameter.
src/blob/handlers/ContainerHandler.tsPasses 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 threadtests/blob/apis/container.test.ts Outdated
Comment threadsrc/blob/handlers/ContainerHandler.ts
CopilotAI review requested due to automatic review settings July 31, 2026 23:26

CopilotAI left a comment

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.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

CopilotAI left a comment

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.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

CopilotAI left a comment

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.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@jainakanksha-msft

Copy link
Copy Markdown
Member

Copilot, please update changelist file and readme with supported feature list

@jainakanksha-msft

Copy link
Copy Markdown
Member

Andrew Gaul (@gaul), could you please update changelist and readme accordingly for all of your PRs.

CopilotAI left a comment

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.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment threadtests/blob/apis/container.test.ts
CopilotAI review requested due to automatic review settings August 21, 2026 17:48

CopilotAI left a comment

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.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

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

Copy link
Copy Markdown
ContributorAuthor

Andrew Gaul (Andrew Gaul (@gaul)), could you please update changelist and readme accordingly for all of your PRs.

Done. This is the more meaningful PR for S3Proxy users if you can prioritize it over the other two for the 3.37.0 release.

@jainakanksha-msft
Akanksha Jain (jainakanksha-msft) merged commit 6f975ba into Azure:mainAug 24, 2026
45 checks passed
@gaul
Andrew Gaul (gaul) deleted the list-blobs-start-from branch August 25, 2026 15:21
Sign up for freeto 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.

Blob service only updated to the 2021-10-04 api version

3 participants

@gaul@jainakanksha-msft