-
Notifications
You must be signed in to change notification settings - Fork 915
add "increase_websocket_message_size" compat flag to InspectorProxyWorker
#6424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 413ec16 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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 |
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/10368770809/npm-package-wrangler-6424 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6424/npm-package-wrangler-6424 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368770809/npm-package-wrangler-6424 dev path/to/script.js Additional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368770809/npm-package-create-cloudflare-6424 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368770809/npm-package-cloudflare-kv-asset-handler-6424 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368770809/npm-package-miniflare-6424 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368770809/npm-package-cloudflare-pages-shared-6424 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368770809/npm-package-cloudflare-vitest-pool-workers-6424 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368770809/npm-package-cloudflare-workers-editor-shared-6424 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368770809/npm-package-cloudflare-workers-shared-6424 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
6674357
to
1d94722
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. A few minor comments, but otherwise nice work 👍
vi.spyOn(console, "info").mockImplementation(mockConsoleLogImpl); | ||
vi.spyOn(console, "log").mockImplementation(mockConsoleLogImpl); | ||
|
||
const LARGE_STRING = "This is a large string" + "z".repeat(2 ** 20); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I would probably be more explicit here: 1_000_001
, or something like that. I had to log out 2^20 to see what it came to, so this is more cognitive overhead than just writing out the number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though the limit is explained as "1MB" it is actually 2 ** 20. I was getting unreliable results with 1_000_000
(probably because the rest of the json message sometimes pushed it over the threshold) – it wasn't enough to ensure the message size was over the limit 100% of the time. I will add a comment in a follow-up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh got it, np 👍
|
||
await vi.waitFor( | ||
async () => { | ||
await expect(consoleApiMessages).toMatchObject([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the await necessary here? I think this call is synchronous, so you may be able to do-away with the inner async/await.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Will fix in a follow-up PR.
35cdd44
to
25ae2ec
Compare
What this PR solves / how to test
Fixes #5297
TODO:
Regression test can be seen failing here https://github.com/cloudflare/workers-sdk/actions/runs/10324844174/job/28585175390?pr=6424#step:6:322
You can see the test failing and then passing in this screencast:
https://github.com/user-attachments/assets/e718a39c-b506-43d9-9c57-e23aa7cfcab3
Author has addressed the following