-
Notifications
You must be signed in to change notification settings - Fork 562
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
fix: ensure tail exits when the WebSocket disconnects #5275
Conversation
🦋 Changeset detectedLatest commit: d20e096 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 |
d1ac3c8
to
dfa2f55
Compare
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/8330703210/npm-package-wrangler-5275 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/5275/npm-package-wrangler-5275 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8330703210/npm-package-wrangler-5275 dev path/to/script.js Additional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8330703210/npm-package-create-cloudflare-5275 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8330703210/npm-package-cloudflare-kv-asset-handler-5275 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8330703210/npm-package-miniflare-5275 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8330703210/npm-package-cloudflare-pages-shared-5275 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8330703210/npm-package-cloudflare-vitest-pool-workers-5275 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
dfa2f55
to
22417d7
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5275 +/- ##
==========================================
+ Coverage 71.46% 71.56% +0.09%
==========================================
Files 309 311 +2
Lines 16098 16195 +97
Branches 4111 4143 +32
==========================================
+ Hits 11505 11590 +85
- Misses 4593 4605 +12
|
Previously when the we tail WebSocket disconnected, e.g. because of an Internet failure, the `wrangler tail` command would just hang and neither exit nor any longer receive tail messages. Now the process exits with an exit code of 1, and outputs an error message. The error message is formatted appropriately, if the tail format is set to `json`. Fixes #3927
49741fe
to
c3cb875
Compare
c3cb875
to
d20e096
Compare
What this PR solves
Previously when the we tail WebSocket disconnected, e.g. because of an Internet failure,
the
wrangler tail
command would just hang and neither exit nor any longer receive tail messages.Now the process exits with an exit code of 1, and outputs an error message.
The error message is formatted appropriately, if the tail format is set to
json
.Fixes #3927
How to test
Automated tests have been added.
But you can test this manually by building Wrangler locally, tailing any Worker and then manually turning off the Internet connection. After 2 secs Wrangler should exit with a suitable error message.
Author has addressed the following