Skip to content

Fix RPC method invocations showing up as unknown events#7811

Merged
penalosa merged 1 commit intomainfrom
joshthoward/wrangler-tail-rpc
Jan 23, 2025
Merged

Fix RPC method invocations showing up as unknown events#7811
penalosa merged 1 commit intomainfrom
joshthoward/wrangler-tail-rpc

Conversation

@joshthoward
Copy link
Copy Markdown
Contributor

@joshthoward joshthoward commented Jan 17, 2025

Fix RPC method invocations showing up as unknown events. Users will now see the following in the case of either a Service<MyWorkerEntrypoint> or a DurableObjectNamespace` when invoking either from a worker:

MyWorkerEntrypoint.add - Ok @ 1/17/2025, 4:14:15 PM
MyDurableObject.add - Ok @ 1/17/2025, 4:14:16 PM
  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because: No easy way to test this other than manually testing
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because: I don't think that e2e tests cover this.
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: This should have been expected to work previously.

@joshthoward joshthoward requested a review from a team as a code owner January 17, 2025 22:22
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 17, 2025

🦋 Changeset detected

Latest commit: 4ee4d28

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
wrangler Patch
@cloudflare/vitest-pool-workers Patch

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 17, 2025

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12897544650/npm-package-wrangler-7811

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7811/npm-package-wrangler-7811

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12897544650/npm-package-wrangler-7811 dev path/to/script.js
Additional artifacts:

cloudflare-workers-bindings-extension:

wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12897544650/npm-package-cloudflare-workers-bindings-extension-7811 -O ./cloudflare-workers-bindings-extension.0.0.0-vca57438cc.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-vca57438cc.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12897544650/npm-package-create-cloudflare-7811 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12897544650/npm-package-cloudflare-kv-asset-handler-7811

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12897544650/npm-package-miniflare-7811

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12897544650/npm-package-cloudflare-pages-shared-7811

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12897544650/npm-package-cloudflare-unenv-preset-7811

@cloudflare/vite-plugin:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12897544650/npm-package-cloudflare-vite-plugin-7811

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12897544650/npm-package-cloudflare-vitest-pool-workers-7811

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12897544650/npm-package-cloudflare-workers-editor-shared-7811

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12897544650/npm-package-cloudflare-workers-shared-7811

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12897544650/npm-package-cloudflare-workflows-shared-7811

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.103.2 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20241230.2
workerd 1.20241230.0 1.20241230.0
workerd --version 1.20241230.0 2024-12-30

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@joshthoward joshthoward force-pushed the joshthoward/wrangler-tail-rpc branch from c73330a to 3cf0223 Compare January 18, 2025 01:47
@joshthoward joshthoward requested a review from a team as a code owner January 18, 2025 01:47
@joshthoward joshthoward force-pushed the joshthoward/wrangler-tail-rpc branch from 3cf0223 to 119c9f6 Compare January 18, 2025 02:18
Comment thread packages/wrangler/src/tail/createTail.ts Outdated
@CarmenPopoviciu
Copy link
Copy Markdown
Contributor

CarmenPopoviciu commented Jan 20, 2025

@joshthoward LGTM overall 🚀

Regarding tests, I'm wondering if we can't test this use case in a similar way we do here or here or here, and mock the RPC events?

@joshthoward joshthoward force-pushed the joshthoward/wrangler-tail-rpc branch from 119c9f6 to 4ee4d28 Compare January 21, 2025 23:04
@joshthoward
Copy link
Copy Markdown
Contributor Author

@joshthoward LGTM overall 🚀

Regarding tests, I'm wondering if we can't test this use case in a similar way we do here or here or here, and mock the RPC events?

I didn't see that. These tests are added.

@penalosa penalosa merged commit 7d138d9 into main Jan 23, 2025
@penalosa penalosa deleted the joshthoward/wrangler-tail-rpc branch January 23, 2025 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants