[wrangler] make sure that the ready-on message is printed after the local runtime is ready - #9910
Conversation
🦋 Changeset detectedLatest commit: cb375fc502291edd3904e7acc20751c8d3f36377 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
9e7515d to
7d953c4
Compare
014ba3e to
810d429
Compare
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
f2f607d to
39e1408
Compare
534811f to
c9275b3
Compare
b4769ba to
5a2dd18
Compare
emily-shen
left a comment
There was a problem hiding this comment.
so if i understand correctly, now we wait for all runtime controllers to be ready or torn down before printing ready - this might be a proxy server, the one with the actual user worker, or remote. is that right?
| "--port=0", | ||
| "--inspector-port=0", | ||
| ]); | ||
| vi.waitFor( |
There was a problem hiding this comment.
why are there changes to a pages fixture?
There was a problem hiding this comment.
The test below does the following:
- clears the output (
clearOutput()) - renames a file
- makes sure that the output is (still) empty (
expect(getOutput()).toBe(""))
Before ready on was being printed basically at the earlier time (as soon as the proxy controller is initialized), before the output gets cleared, but now the log is being printed asynchronously when all runtimes are ready, which actually happens after the output gets cleared (making the toBe("") assertion fail).
That's why now we need to wait for the ready on message to be there first (so that we can be sure that that won't appear in the output)
If you'd prefer a different change here please let me know 🙂
Yes 🙂 |
d92420b to
cb375fc
Compare
…ppropriate runtime controller is ready
cb375fc to
764ec1e
Compare
penalosa
left a comment
There was a problem hiding this comment.
Looks great! Thanks for putting up with all my nitpicking here
No problem, thanks a lot for correcting all my silly mistakes! 🙏 |
Fixes https://jira.cfdata.org/browse/DEVX-1978