-
Notifications
You must be signed in to change notification settings - Fork 709
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: init from dash using explicit usage model for standard accounts #4521
Conversation
🦋 Changeset detectedLatest commit: 444a667 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
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/7061322025/npm-package-wrangler-4521 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7061322025/npm-package-wrangler-4521 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7061322025/npm-package-wrangler-4521 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7061322025/npm-package-miniflare-4521 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7061322025/npm-package-cloudflare-pages-shared-4521 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7061322025/npm-package-create-cloudflare-4521 Note that these links will no longer work once the GitHub Actions artifact expires.
| Please ensure constraints are pinned, and |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4521 +/- ##
==========================================
+ Coverage 75.44% 75.45% +0.01%
==========================================
Files 240 240
Lines 12851 12854 +3
Branches 3309 3312 +3
==========================================
+ Hits 9695 9699 +4
+ Misses 3156 3155 -1
|
Hey! 👋 Thanks for opening this PR! I see you noticed there's already an in-flight PR that fixes this behaviour in a slightly different way. Could we close this PR and discuss which solution to use on #4470 instead, or does this need to go in sooner? |
We were going to initially do that, but with Samuel being OOO we wanted to ensure that this'd be in the next release. I'm open to using that PR if we can be sure it'll go out in the next release, but product decided we should play it safe with a smaller bugfix PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. Considering Samuel's out this week, let's go with this PR. Added a couple comments, but looks good. 👍
3881974
to
444a667
Compare
* Don't offer to use typescript or deploy when using --from-dash * Remove fail-fast from init --from-dash. If a user has multiple accounts, this check meant they'd be prompted to pick the account they wanted to use _twice_ (once by Wrangler and once by C3). The additional latency is minimal, and it's a less confusing DX. * Only JS + hide usage_model = standard + cleanup * Include custom domains + workers dev & format routes correctly * Use implementation from #4521
What this PR solves / how to test:
Fixes a bug where users with the standard usage model would have an explicit usage model defined in their
wrangler.toml
when they initialized a Worker from dash. Testing can be done by building and then runningwrangler init --from-dash [worker] -y --no-delegate-c3
on an account that has opted into the new standard pricing and ensuring there is no usage model defined in the config.Author has addressed the following:
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.