Add extension on top of workflow binding#10919
Conversation
🦋 Changeset detectedLatest commit: 9380a3f 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 |
06d541a to
9e575e4
Compare
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: |
91e4a59 to
99af763
Compare
aeee441 to
06cad01
Compare
f335e1d to
f6fcbf7
Compare
19bddc3 to
de46599
Compare
|
You'll need to update the Workflows tests for the Vite plugin here. These are currently failing for this PR. It would also be good to understand why the changes in this PR change the outcome of the tests? Thanks. |
de46599 to
dbda86f
Compare
dbda86f to
07e4e45
Compare
I think that the architectural changes made here have consequences in the timing and execution model of workflows. They are still executed asynchronously (e.g.: some test workflows are still expecting to be returned on a In other words, calling |
537d54f to
7cff267
Compare
7cff267 to
e22e2e2
Compare
packages/vite-plugin-cloudflare/playground/external-workflows/__tests__/workflows.spec.ts
Show resolved
Hide resolved
packages/miniflare/src/workers/workflows/wrapped-binding.worker.ts
Outdated
Show resolved
Hide resolved
a5f74e4 to
be7012a
Compare
|
Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the Depending on your changes, running Notes:
|
be7012a to
8866754
Compare
8866754 to
9380a3f
Compare
Fixes WOR-926.
This PR migrates the workflow binding to use a wrapped binding that sits on top of the service binding. The goal is to avoid local dev errors due to engines not being disposed correctly.
Furthermore, this also mitigates the issue of Python Workflows not working correctly with default entrypoint classes. This happens because the runtime attempts to type translate the binding to a Python type - and fails because it doesn't really work properly when the JS object has RPC properties. Therefore, this is a backwards compatible way of fixing it.