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

[miniflare] fix: reject Miniflare#ready promise if dispose()ed while waiting #4397

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

mrbbot
Copy link
Contributor

@mrbbot mrbbot commented Nov 8, 2023

Fixes #4363.

What this PR solves / how to test:

This PR ensures Miniflare#ready is rejected if Miniflare#dispose() is called while waiting on the ready promise.

Author has addressed the following:

  • Tests
    • Included
    • Not necessary because:
  • Changeset (Changeset guidelines)
    • Included
    • Not necessary because:
  • Associated docs
    • Issue(s)/PR(s):
    • Not necessary because:

Note for PR author:

We want to celebrate and highlight awesome PR review! If you think this PR received a particularly high-caliber review, please assign it the label highlight pr review so future reviewers can take inspiration and learn from it.

@mrbbot mrbbot requested a review from a team as a code owner November 8, 2023 10:57
Copy link

changeset-bot bot commented Nov 8, 2023

🦋 Changeset detected

Latest commit: 4e64a9a

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

This PR includes changesets to release 3 packages
Name Type
miniflare Patch
@cloudflare/pages-shared Patch
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

Copy link
Contributor

github-actions bot commented Nov 8, 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/6797238927/npm-package-wrangler-4397

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

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

Or you can use npx with this latest build directly:

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

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


wrangler@3.15.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20231025.1
workerd 1.20231030.0 1.20231030.0
workerd --version 1.20231030.0 2023-10-30

|

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

Copy link

codecov bot commented Nov 8, 2023

Codecov Report

Merging #4397 (4e64a9a) into main (35be459) will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4397      +/-   ##
==========================================
+ Coverage   75.28%   75.31%   +0.03%     
==========================================
  Files         223      223              
  Lines       12357    12357              
  Branches     3198     3198              
==========================================
+ Hits         9303     9307       +4     
+ Misses       3054     3050       -4     

see 3 files with indirect coverage changes

@mrbbot mrbbot changed the title fix: reject Miniflare#ready promise if dispose()ed while waiting [miniflare] fix: reject Miniflare#ready promise if dispose()ed while waiting Nov 8, 2023
@mrbbot mrbbot merged commit 4f8b342 into main Nov 8, 2023
@mrbbot mrbbot deleted the bcoll/miniflare-reject-ready-on-dispose branch November 8, 2023 14:51
@workers-devprod workers-devprod mentioned this pull request Nov 8, 2023
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.

[Miniflare] mf.dispose() should internally await mf.ready
2 participants