[vitest-pool-workers] fix: handle redirect responses in runInDurableObject#13077
[vitest-pool-workers] fix: handle redirect responses in runInDurableObject#13077
runInDurableObject#13077Conversation
🦋 Changeset detectedLatest commit: c485ee1 The changes in this PR will be included in the next version bump. 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 |
|
✅ All changesets look good |
|
The change is clean and well-reasoned. Let me verify the fix logic once more by re-reading the The flow is:
The bug: Without The fix is correct: The test changes are also sound:
LGTM |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
e86cda7 to
c485ee1
Compare
|
Codeowners approval required for this PR:
Show detailed file reviewers |
Fixes #9907.
runInDurableObject(andrunDurableObjectAlarm) would throwAssertionError: Expected callback for Xwhen the user's callback returned a redirect (3xx)Response. The internalstub.fetch()used the defaultredirect: "follow"mode, so the runtime would follow the redirect — preserving thecfaction ID — and re-entermaybeHandleRunRequestafter the callback slot had already been consumed. Addingredirect: "manual"lets the existingkUseResponsepath return the redirect as-is.