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

Feature: dispatch-namespace option in wrangler deploy #5093

Merged
merged 2 commits into from
Mar 14, 2024

Conversation

benycodes
Copy link
Contributor

@benycodes benycodes commented Feb 25, 2024

What this PR solves / how to test:
Ability to deploy workers to dispatch namespaces (Workers for Platforms product).

Usage: wrangler deploy --dispatch-namespace <namespace>

This is an improvement to PR #2746 because:

  • Correct terminology of 'dispatch namespace' used instead of 'platform namespace'.
  • Excludes tasks related to routes. custom domains. cron/schedules, and queue consumers when dispatch-namespace option used (these features aren't supported in Workers for Platforms)
  • Allows for any name to be used for the script when dispatch-namespace option used, because Workers for Platforms doesn't check script names

Author has addressed the following

@benycodes benycodes requested a review from a team as a code owner February 25, 2024 18:37
Copy link

changeset-bot bot commented Feb 25, 2024

🦋 Changeset detected

Latest commit: 97210b9

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

This PR includes changesets to release 2 packages
Name Type
wrangler Minor
@cloudflare/vitest-pool-workers 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

@WalshyDev WalshyDev self-assigned this Feb 29, 2024
Copy link
Contributor

github-actions bot commented Mar 7, 2024

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/8283476292/npm-package-wrangler-5093

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8283476292/npm-package-wrangler-5093 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8283476292/npm-package-create-cloudflare-5093 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8283476292/npm-package-cloudflare-kv-asset-handler-5093
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8283476292/npm-package-miniflare-5093
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8283476292/npm-package-cloudflare-pages-shared-5093
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8283476292/npm-package-cloudflare-vitest-pool-workers-5093

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


wrangler@3.34.2 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240304.2
workerd 1.20240304.0 1.20240304.0
workerd --version 1.20240304.0 2024-03-04

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

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 95.23810% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 71.50%. Comparing base (cab7e1c) to head (97210b9).
Report is 84 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5093      +/-   ##
==========================================
+ Coverage   70.33%   71.50%   +1.16%     
==========================================
  Files         298      309      +11     
  Lines       15515    16097     +582     
  Branches     3987     4111     +124     
==========================================
+ Hits        10913    11510     +597     
+ Misses       4602     4587      -15     
Files Coverage Δ
...angler/src/__tests__/helpers/mock-upload-worker.ts 100.00% <100.00%> (ø)
packages/wrangler/src/config/validation.ts 89.73% <100.00%> (+0.03%) ⬆️
packages/wrangler/src/deploy/deploy.ts 89.95% <100.00%> (+0.20%) ⬆️
packages/wrangler/src/deploy/index.ts 95.74% <50.00%> (-1.03%) ⬇️

... and 43 files with indirect coverage changes

@WalshyDev
Copy link
Member

Thanks for the PR @benycodes
I've pushed some changes to simplify along with adding a changeset and tests. From my side, this is good to go now :)

Appreciate it!

@WalshyDev WalshyDev force-pushed the dispatch-namespace branch 2 times, most recently from 3b95f3e to cfaa472 Compare March 14, 2024 12:45
@CarmenPopoviciu
Copy link
Contributor

thank you so much to both of you for taking this PR across the finish line <3

@WalshyDev WalshyDev merged commit a676f55 into cloudflare:main Mar 14, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants