Skip to content

[wrangler] Notify user on local dev server reload#10750

Merged
petebacondarwin merged 1 commit intocloudflare:mainfrom
jacoblearned:jl/wrangler-dev-notify-reload
Dec 23, 2025
Merged

[wrangler] Notify user on local dev server reload#10750
petebacondarwin merged 1 commit intocloudflare:mainfrom
jacoblearned:jl/wrangler-dev-notify-reload

Conversation

@jacoblearned
Copy link
Contributor

@jacoblearned jacoblearned commented Sep 24, 2025

Overview

Currently, wrangler dev does not notify the user that reloads have completed for local servers. Users only see "Reloading local server...", which might cause confusion for users expecting a ready message.

 ⛅️ wrangler 4.39.0
───────────────────
⎔ Starting local server...
[wrangler:info] Ready on http://localhost:8787
[wrangler:info] GET / 200 OK (3ms)
⎔ Reloading local server...
[wrangler:info] GET / 200 OK (2ms)
⎔ Shutting down local server...

This change adds a log message to inform users the local server is ready after reload.

 ⛅️ wrangler 4.39.1
───────────────────
⎔ Starting local server...
[wrangler:info] Ready on http://localhost:8787
[wrangler:info] GET / 200 OK (3ms)
⎔ Reloading local server...
⎔ Local server updated and ready
[wrangler:info] GET / 200 OK (2ms)
⎔ Shutting down local server...

Implementation Details

Because we set logRequests: false in the miniflare options, miniflare's "Updated and ready" message is suppressed for all local server reloads.

This is done to avoid duplicate log entries from the proxy and user workers, so it seems simplest for wrangler to provide its own reload complete message after awaiting the miniflare options change.

This also changes the waitForReload e2e helper function to check for the reload success message rather than the
"Updating local server..." message for a stronger guarantee that reloads have completed.

To accommodate the stronger wait condition, we set the default timeout of waitForReload to 15 seconds to match the waitForReady timeout.


  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: Does not affect user-facing docs
  • Wrangler V3 Backport
    • Wrangler PR: TBD - I think this does need to be backported but we'll have to create it manually since the CI won't automatically for PRs from forks
    • Not necessary because:

@jacoblearned jacoblearned requested a review from a team as a code owner September 24, 2025 17:32
@changeset-bot
Copy link

changeset-bot bot commented Sep 24, 2025

🦋 Changeset detected

Latest commit: 9bf2824

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 24, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@10750

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@10750

miniflare

npm i https://pkg.pr.new/miniflare@10750

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@10750

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@10750

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@10750

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@10750

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@10750

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@10750

wrangler

npm i https://pkg.pr.new/wrangler@10750

commit: 9bf2824

@petebacondarwin petebacondarwin force-pushed the jl/wrangler-dev-notify-reload branch from 987f6b8 to 5d14966 Compare November 13, 2025 14:55
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if the CI agrees

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Nov 13, 2025
@petebacondarwin petebacondarwin force-pushed the jl/wrangler-dev-notify-reload branch from 5d14966 to ed593b6 Compare November 17, 2025 13:14
Because we set `logRequests: false` in the miniflare options,
miniflare's "Updated and ready" message is suppressed for all
local server reloads.

This change ensures users are notified when the local server is ready
after a reload event, instead of only seeing "Reloading local server..."
with no confirmation of success.

This also changes the `waitForReload` e2e helper function to check
for the reload success message rather than the
"Reloading local server..." message for a stronger guarantee that
reloads have completed.

To accommodate the stronger wait condition, we set the
default timeout of `waitForReload` to 15 seconds to
match the `waitForReady` timeout.
@petebacondarwin petebacondarwin force-pushed the jl/wrangler-dev-notify-reload branch from ed593b6 to 9bf2824 Compare December 23, 2025 12:17
@petebacondarwin petebacondarwin merged commit 4688f59 into cloudflare:main Dec 23, 2025
36 of 37 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Dec 23, 2025
AmirSa12 pushed a commit to AmirSa12/workers-sdk that referenced this pull request Jan 5, 2026
Because we set `logRequests: false` in the miniflare options,
miniflare's "Updated and ready" message is suppressed for all
local server reloads.

This change ensures users are notified when the local server is ready
after a reload event, instead of only seeing "Reloading local server..."
with no confirmation of success.

This also changes the `waitForReload` e2e helper function to check
for the reload success message rather than the
"Reloading local server..." message for a stronger guarantee that
reloads have completed.

To accommodate the stronger wait condition, we set the
default timeout of `waitForReload` to 15 seconds to
match the `waitForReady` timeout.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants