Skip to content
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

Revert "startDevWorker - Milestone 1" #4171

Merged
merged 4 commits into from
Oct 12, 2023

Conversation

penalosa
Copy link
Contributor

Reverts #3960 in preparation for a patch release

@penalosa penalosa requested a review from a team as a code owner October 12, 2023 20:23
@changeset-bot
Copy link

changeset-bot bot commented Oct 12, 2023

🦋 Changeset detected

Latest commit: 83616de

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

This PR includes changesets to release 1 package
Name Type
wrangler 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
Contributor

github-actions bot commented Oct 12, 2023

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/6500745024/npm-package-wrangler-4171

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6500745024/npm-package-wrangler-4171 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6500745024/npm-package-cloudflare-pages-shared-4171

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


wrangler@3.13.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare 3.20231010.0 3.20231010.0
workerd 1.20231010.0 1.20231010.0
workerd --version 1.20231010.0 2023-10-10

|

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

@github-actions
Copy link
Contributor

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/6500554927/npm-package-wrangler-4171

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6500554927/npm-package-wrangler-4171 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6500554927/npm-package-cloudflare-pages-shared-4171

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


wrangler@3.13.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare 3.20231010.0 3.20231010.0
workerd 1.20231010.0 1.20231010.0
workerd --version 1.20231010.0 2023-10-10

|

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

@codecov
Copy link

codecov bot commented Oct 12, 2023

Codecov Report

Merging #4171 (3de4eff) into main (0f043a1) will decrease coverage by 0.17%.
Report is 1 commits behind head on main.
The diff coverage is 14.40%.

❗ Current head 3de4eff differs from pull request most recent head 83616de. Consider uploading reports for the commit 83616de to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4171      +/-   ##
==========================================
- Coverage   75.57%   75.41%   -0.17%     
==========================================
  Files         237      223      -14     
  Lines       12493    12217     -276     
  Branches     3196     3159      -37     
==========================================
- Hits         9442     9213     -229     
+ Misses       3051     3004      -47     
Files Coverage Δ
packages/wrangler/src/api/index.ts 100.00% <ø> (ø)
packages/wrangler/src/dev.tsx 83.53% <ø> (ø)
packages/wrangler/src/dev/miniflare.ts 65.21% <100.00%> (-1.65%) ⬇️
packages/wrangler/src/dev/start-server.ts 79.27% <100.00%> (+2.24%) ⬆️
packages/wrangler/src/https-options.ts 100.00% <100.00%> (ø)
packages/wrangler/src/api/dev.ts 82.60% <75.00%> (ø)
packages/wrangler/src/dev/remote.tsx 8.24% <15.38%> (+0.28%) ⬆️
packages/wrangler/src/dev/local.tsx 22.91% <13.04%> (-3.34%) ⬇️
packages/wrangler/src/dev/inspect.ts 5.27% <5.69%> (-1.15%) ⬇️

... and 3 files with indirect coverage changes

.changeset/dry-peas-beg.md Outdated Show resolved Hide resolved
Co-authored-by: Cina Saffary <cina@cloudflare.com>
@penalosa penalosa requested a review from 1000hz October 12, 2023 20:39
@penalosa penalosa merged commit 88f15f6 into main Oct 12, 2023
18 checks passed
@penalosa penalosa deleted the revert-3960-startDevWorker-milestone-1 branch October 12, 2023 21:57
RamIdeas added a commit that referenced this pull request Oct 13, 2023
RamIdeas added a commit that referenced this pull request Oct 17, 2023
mrbbot pushed a commit that referenced this pull request Oct 18, 2023
RamIdeas added a commit that referenced this pull request Oct 18, 2023
RamIdeas added a commit that referenced this pull request Oct 25, 2023
RamIdeas added a commit that referenced this pull request Oct 25, 2023
RamIdeas added a commit that referenced this pull request Oct 30, 2023
RamIdeas added a commit that referenced this pull request Nov 3, 2023
RamIdeas added a commit that referenced this pull request Nov 8, 2023
RamIdeas added a commit that referenced this pull request Nov 14, 2023
RamIdeas added a commit that referenced this pull request Nov 14, 2023
RamIdeas added a commit that referenced this pull request Nov 20, 2023
RamIdeas added a commit that referenced this pull request Nov 20, 2023
RamIdeas added a commit that referenced this pull request Nov 21, 2023
RamIdeas added a commit that referenced this pull request Nov 21, 2023
RamIdeas added a commit that referenced this pull request Nov 21, 2023
RamIdeas added a commit that referenced this pull request Nov 21, 2023
RamIdeas added a commit that referenced this pull request Nov 22, 2023
RamIdeas added a commit that referenced this pull request Nov 22, 2023
RamIdeas added a commit that referenced this pull request Nov 23, 2023
* Revert "Revert "startDevWorker - Milestone 1" (#4171)"

This reverts commit 88f15f6.

* fix: don't show logs to ProxyWorker(s)
unless log level is debug

* fix: show console.log's in remote mode
remote inspector websocket upgrade request required auth headers
so use `fetch` with `Upgrade: websocket` header instead of `new WebSocket`

* use miniflare verbose mode only if debug log level

* use single Miniflare instance
for (Inspector)ProxyWorker

* port: clear remote runtime logs
upon UserWorker restarts

* default unstable_dev inspectorPort to 0

* parallelise cleanup to minimise chance of hanging
previously, sequential cleanups fail to fully cleanup if earlier steps in the sequence fail

* ensure InspectorProxyWorker unsafeDirectPort is set

* don't use file-system for (Inspector)ProxyWorker DOs

* prevent eviction of the Durable Objects
with (Inspector)ProxyWorker

* remove miniflare workaround for parallel requests

* considerations for race between control messages and user fetches

* use port: undefined vs 0 for UserWorker
to force different port across reloads to workaround workerd bug on Windows

* Don't try to parse `node-internal:* import specifiers

* improve InspectorProxyWorker debug logs

* only proxy consoleAPICalled events in remote mode

* enable consoleAPICalled events proxying if local mode AND service-worker format

* fix userWorkerInnerUrlOverrides host/hostname/port
mainly, base innerUrl off of request.url not userWorkerUrl

* use ProxyWorker ip/port for DEV_SERVER_READY event
instead of UserWorker ip/port

* always disable the UserWorker miniflare pretty error
using the MF-Disable-Pretty-Error header on the UserWorker request

the ProxyWorker will still interpret the json error response
depending on its own MF-Disable-Pretty-Error header

* recover from 'address in use' errors
by trying to start on a random port

* run unit tests in parallel again
by removing --runInBand flag for jest

* add handleRuntimeStdio option to ProxyWorker miniflare instance

* expand containsHexStack check for windows

* logger.debug runtime websocket errors from InspectorProxyWorker
+ remove miniflare log.error overrides no longer needed

* log workerd warnings with logger.warn
not logger.error/info

* enable Cloudflare Access auth for remote previews

* only send Runtime.discardConsoleEntries if currently connected to runtime

---------

Co-authored-by: Samuel Macleod <smacleod@cloudflare.com>
Co-authored-by: MrBBot <bcoll@cloudflare.com>
RamIdeas added a commit that referenced this pull request Nov 23, 2023
RamIdeas added a commit that referenced this pull request Nov 23, 2023
* Revert "Revert "startDevWorker - Milestone 1" (#4171)"

This reverts commit 88f15f6.

* fix: don't show logs to ProxyWorker(s)
unless log level is debug

* fix: show console.log's in remote mode
remote inspector websocket upgrade request required auth headers
so use `fetch` with `Upgrade: websocket` header instead of `new WebSocket`

* use miniflare verbose mode only if debug log level

* use single Miniflare instance
for (Inspector)ProxyWorker

* port: clear remote runtime logs
upon UserWorker restarts

* default unstable_dev inspectorPort to 0

* parallelise cleanup to minimise chance of hanging
previously, sequential cleanups fail to fully cleanup if earlier steps in the sequence fail

* ensure InspectorProxyWorker unsafeDirectPort is set

* don't use file-system for (Inspector)ProxyWorker DOs

* prevent eviction of the Durable Objects
with (Inspector)ProxyWorker

* remove miniflare workaround for parallel requests

* considerations for race between control messages and user fetches

* use port: undefined vs 0 for UserWorker
to force different port across reloads to workaround workerd bug on Windows

* Don't try to parse `node-internal:* import specifiers

* improve InspectorProxyWorker debug logs

* only proxy consoleAPICalled events in remote mode

* enable consoleAPICalled events proxying if local mode AND service-worker format

* fix userWorkerInnerUrlOverrides host/hostname/port
mainly, base innerUrl off of request.url not userWorkerUrl

* use ProxyWorker ip/port for DEV_SERVER_READY event
instead of UserWorker ip/port

* always disable the UserWorker miniflare pretty error
using the MF-Disable-Pretty-Error header on the UserWorker request

the ProxyWorker will still interpret the json error response
depending on its own MF-Disable-Pretty-Error header

* recover from 'address in use' errors
by trying to start on a random port

* run unit tests in parallel again
by removing --runInBand flag for jest

* add handleRuntimeStdio option to ProxyWorker miniflare instance

* expand containsHexStack check for windows

* logger.debug runtime websocket errors from InspectorProxyWorker
+ remove miniflare log.error overrides no longer needed

* log workerd warnings with logger.warn
not logger.error/info

* enable Cloudflare Access auth for remote previews

* only send Runtime.discardConsoleEntries if currently connected to runtime

---------

Co-authored-by: Samuel Macleod <smacleod@cloudflare.com>
Co-authored-by: MrBBot <bcoll@cloudflare.com>
RamIdeas added a commit that referenced this pull request Nov 23, 2023
* Revert "Revert "startDevWorker - Milestone 1" (#4171)"

This reverts commit 88f15f6.

* fix: don't show logs to ProxyWorker(s)
unless log level is debug

* fix: show console.log's in remote mode
remote inspector websocket upgrade request required auth headers
so use `fetch` with `Upgrade: websocket` header instead of `new WebSocket`

* use miniflare verbose mode only if debug log level

* use single Miniflare instance
for (Inspector)ProxyWorker

* port: clear remote runtime logs
upon UserWorker restarts

* default unstable_dev inspectorPort to 0

* parallelise cleanup to minimise chance of hanging
previously, sequential cleanups fail to fully cleanup if earlier steps in the sequence fail

* ensure InspectorProxyWorker unsafeDirectPort is set

* don't use file-system for (Inspector)ProxyWorker DOs

* prevent eviction of the Durable Objects
with (Inspector)ProxyWorker

* remove miniflare workaround for parallel requests

* considerations for race between control messages and user fetches

* use port: undefined vs 0 for UserWorker
to force different port across reloads to workaround workerd bug on Windows

* Don't try to parse `node-internal:* import specifiers

* improve InspectorProxyWorker debug logs

* only proxy consoleAPICalled events in remote mode

* enable consoleAPICalled events proxying if local mode AND service-worker format

* fix userWorkerInnerUrlOverrides host/hostname/port
mainly, base innerUrl off of request.url not userWorkerUrl

* use ProxyWorker ip/port for DEV_SERVER_READY event
instead of UserWorker ip/port

* always disable the UserWorker miniflare pretty error
using the MF-Disable-Pretty-Error header on the UserWorker request

the ProxyWorker will still interpret the json error response
depending on its own MF-Disable-Pretty-Error header

* recover from 'address in use' errors
by trying to start on a random port

* run unit tests in parallel again
by removing --runInBand flag for jest

* add handleRuntimeStdio option to ProxyWorker miniflare instance

* expand containsHexStack check for windows

* logger.debug runtime websocket errors from InspectorProxyWorker
+ remove miniflare log.error overrides no longer needed

* log workerd warnings with logger.warn
not logger.error/info

* enable Cloudflare Access auth for remote previews

* only send Runtime.discardConsoleEntries if currently connected to runtime

---------

Co-authored-by: Samuel Macleod <smacleod@cloudflare.com>
Co-authored-by: MrBBot <bcoll@cloudflare.com>
penalosa pushed a commit that referenced this pull request Nov 23, 2023
penalosa added a commit that referenced this pull request Nov 23, 2023
* Revert "Revert "startDevWorker - Milestone 1" (#4171)"

This reverts commit 88f15f6.

* fix: don't show logs to ProxyWorker(s)
unless log level is debug

* fix: show console.log's in remote mode
remote inspector websocket upgrade request required auth headers
so use `fetch` with `Upgrade: websocket` header instead of `new WebSocket`

* use miniflare verbose mode only if debug log level

* use single Miniflare instance
for (Inspector)ProxyWorker

* port: clear remote runtime logs
upon UserWorker restarts

* default unstable_dev inspectorPort to 0

* parallelise cleanup to minimise chance of hanging
previously, sequential cleanups fail to fully cleanup if earlier steps in the sequence fail

* ensure InspectorProxyWorker unsafeDirectPort is set

* don't use file-system for (Inspector)ProxyWorker DOs

* prevent eviction of the Durable Objects
with (Inspector)ProxyWorker

* remove miniflare workaround for parallel requests

* considerations for race between control messages and user fetches

* use port: undefined vs 0 for UserWorker
to force different port across reloads to workaround workerd bug on Windows

* Don't try to parse `node-internal:* import specifiers

* improve InspectorProxyWorker debug logs

* only proxy consoleAPICalled events in remote mode

* enable consoleAPICalled events proxying if local mode AND service-worker format

* fix userWorkerInnerUrlOverrides host/hostname/port
mainly, base innerUrl off of request.url not userWorkerUrl

* use ProxyWorker ip/port for DEV_SERVER_READY event
instead of UserWorker ip/port

* always disable the UserWorker miniflare pretty error
using the MF-Disable-Pretty-Error header on the UserWorker request

the ProxyWorker will still interpret the json error response
depending on its own MF-Disable-Pretty-Error header

* recover from 'address in use' errors
by trying to start on a random port

* run unit tests in parallel again
by removing --runInBand flag for jest

* add handleRuntimeStdio option to ProxyWorker miniflare instance

* expand containsHexStack check for windows

* logger.debug runtime websocket errors from InspectorProxyWorker
+ remove miniflare log.error overrides no longer needed

* log workerd warnings with logger.warn
not logger.error/info

* enable Cloudflare Access auth for remote previews

* only send Runtime.discardConsoleEntries if currently connected to runtime

---------

Co-authored-by: Samuel Macleod <smacleod@cloudflare.com>
Co-authored-by: MrBBot <bcoll@cloudflare.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants