Repository navigation
[miniflare] Honor start_after when listing R2 objects in Local Explorer - #17119
Conversation
The Local Explorer R2 list objects endpoint dropped the start_after query parameter, so resuming a listing from a saved key returned that key again. Declare the parameter in the OpenAPI filter config, regenerate the Local Explorer types, and forward it to the R2 simulator. Fixes cloudflare#17039
🦋 Changeset detectedLatest commit: 44e1c69 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Hi @tw4. Thanks for taking the time to contribute to Workers SDK. This PR has been automatically closed because you are not currently a registered (vouched) collaborator for this repository. AI tools now let our team generate proposed code changes quickly. Reviewing changes, checking that they solve the right problem, and maintaining code quality over time still take substantial care and effort. We therefore limit PRs to registered collaborators so we can focus that effort where it is most useful. For the majority of external contributors, the most effective way to help is through issues: describing a problem or use case, providing a minimal reproduction, investigating its cause, or helping us verify a fix. Those contributions help us understand what needs to change and are very welcome. We will take an initial look at this PR and decide whether it is something we want to invest time in reviewing and maintaining. We may reopen it if we decide to proceed, but we cannot guarantee that it will be reopened or receive a full review. |
|
Codeowners approval required for this PR:
Show detailed file reviewers |
The R2 simulator picked the later of cursor and startAfter with a UTF-16 string comparison, while the list queries order keys by UTF-8 bytes. With keys such as fullwidth letters followed by emoji, pagination kept returning the same page.
|
This pull request's reviews are posted as pull request reviews: see the review of |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/codemods
@cloudflare/config
@cloudflare/containers-shared
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/runtime-types
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-plugin
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
|
clanker review |
There was a problem hiding this comment.
✅ Approved — No issues found. The start_after fix and the UTF-8 key comparison are correct, small and tested.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
No issues found.
📖 AGENTS.md: ✅ LGTM
No issues found.
📋 Code Quality: ✅ LGTM
No issues found.
⚡ Performance: ✅ LGTM
No issues found.
📝 Documentation: ✅ LGTM
No issues found.
Reviewed commit: 44e1c69b
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
Fixes #17039.
Listing R2 objects through the Local Explorer ignored
start_after, so resuming a listing from a saved key (e.g.cf r2 objects list --local --start-after first) returned that key again.The param wasn't declared on the local-only
/r2/buckets/{bucket_name}/objectspath inscripts/openapi-filter-config.ts, so it got stripped during query validation andlistR2Objectsnever saw it. I added it to the filter config, regeneratedopenapi.local.jsonand the generated types withgenerate:api, and now pass it to the R2 simulator asstartAfter. The simulator already handles it together withcursor, using whichever key sorts later.