WOR-1263: migrate workflow wrapped binding into jsrpc#6819
Open
Caio-Nogueira wants to merge 1 commit into
Open
WOR-1263: migrate workflow wrapped binding into jsrpc#6819Caio-Nogueira wants to merge 1 commit into
Caio-Nogueira wants to merge 1 commit into
Conversation
Gates the JSRPC transport for the env.WORKFLOW binding while the RPC callee is rolled out. Experimental opt-in only (no enable date); the legacy HTTP transport remains the default. feat(workflows): route binding through JSRPC behind compat flag When workflows_bindings_rpc is enabled, WorkflowImpl and InstanceImpl dispatch their methods as JSRPC calls directly on the inner fetcher instead of issuing HTTP requests. The wrapper classes are preserved on both transports (results are always wrapped in InstanceImpl), so prototypes and instanceof stability are unchanged. The Fetcher interface now declares the RPC method surface the callee must implement. The legacy callFetcher HTTP path is retained for un-flagged workers. test(workflows): cover both binding transports end-to-end Upgrade the mock to a dual-transport WorkerEntrypoint (RPC methods + fetch handler) sharing one set of business-logic helpers so both transports behave identically, including an error-trigger id. The wd-test now runs the same suite against a flag-off (HTTP) service and a flag-on (RPC) service pointed at the WorkflowsMock entrypoint. Tests add instance-method, prototype-preservation, and error-propagation coverage.
Contributor
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gates the JSRPC transport for the env.WORKFLOW binding while the RPC callee is rolled out. Experimental opt-in only (no enable date); the legacy HTTP transport remains the default.
When workflows_bindings_rpc is enabled, WorkflowImpl and InstanceImpl dispatch their methods as JSRPC calls directly on the inner fetcher instead of issuing HTTP requests. The wrapper classes are preserved on both transports (results are always wrapped in InstanceImpl), so prototypes and instanceof stability are unchanged. The Fetcher interface now declares the RPC method surface the callee must implement. The legacy callFetcher HTTP path is retained for un-flagged workers.