Skip to content

fix(msfs): prepend backend prefix to startAfter in GCS/AIStore listOb…#116

Open
joshuarobinson wants to merge 1 commit into
mainfrom
fix/mr927-liststartafter-backend-prefix
Open

fix(msfs): prepend backend prefix to startAfter in GCS/AIStore listOb…#116
joshuarobinson wants to merge 1 commit into
mainfrom
fix/mr927-liststartafter-backend-prefix

Conversation

@joshuarobinson

@joshuarobinson joshuarobinson commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

…jects

The GCS and AIStore listObjects implementations set the paging start-bound (StartOffset / StartAfter) to the raw prefix-relative startAfter key, while the query Prefix is prefixed with backend.prefix and returned object paths are stripped of backend.prefix. When a backend prefix is configured, the start bound was therefore compared against full (prefixed) object names using a prefix-relative key, so the filter was effectively ignored and pagination/resume was broken. This matches the S3 backend, which correctly uses backend.prefix + startAfter.

Found in merged MR !927.

Checklist

  • Development PR
    • .release_notes/.unreleased.md
      • Notable changes to the client (i.e. not related to tooling, CI/CD, etc.) from this PR have been added.
  • Release PR
    • CI/CD
      • The default branch pipelines are passing in both GitHub + GitLab (latter for SwiftStack E2E tests).
    • multi-storage-client/pyproject.toml
      • The package version has been bumped.
    • .release_notes/.unreleased.md
      • This file's contents have been moved into a .release_notes/{bumped package version}.md file.

Summary by CodeRabbit

  • Bug Fixes
    • Corrected paginated object listings for AIStore and GCS-backed storage.
    • Listings now continue from the correct position when a storage path uses a configured prefix.

…jects

The GCS and AIStore listObjects implementations set the paging
start-bound (StartOffset / StartAfter) to the raw prefix-relative
startAfter key, while the query Prefix is prefixed with backend.prefix
and returned object paths are stripped of backend.prefix. When a backend
prefix is configured, the start bound was therefore compared against
full (prefixed) object names using a prefix-relative key, so the filter
was effectively ignored and pagination/resume was broken. This matches
the S3 backend, which correctly uses backend.prefix + startAfter.

Found in merged MR !927.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@joshuarobinson
joshuarobinson requested a review from a team July 19, 2026 16:11
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 53649979-f50f-4a02-a017-42f3dd945c29

📥 Commits

Reviewing files that changed from the base of the PR and between b77536f and fbfe7f4.

📒 Files selected for processing (2)
  • multi-storage-file-system/backend_aistore.go
  • multi-storage-file-system/backend_gcs.go

📝 Walkthrough

Walkthrough

AIStore and GCS object listing cursors now prepend each backend’s configured prefix to the provided startAfter value.

Changes

Prefix-aware object listing

Layer / File(s) Summary
Backend listing cursor updates
multi-storage-file-system/backend_aistore.go, multi-storage-file-system/backend_gcs.go
AIStore StartAfter and GCS StartOffset now combine the configured backend prefix with the supplied pagination cursor.

Estimated code review effort: 2 (Simple) | ~5 minutes

Suggested reviewers: ankitmaster08

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change to prepend the backend prefix for listObjects pagination.
Description check ✅ Passed The description explains the change and includes the required checklist sections; only the task-ID line is omitted.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/mr927-liststartafter-backend-prefix

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies"


Comment @coderabbitai help to get the list of available commands.

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.

1 participant