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

feat(wrangler): Added bespoke Queues scope to the default scopes list/scope options. #5291

Merged

Conversation

pmiguel
Copy link
Contributor

@pmiguel pmiguel commented Mar 19, 2024

What this PR solves / how to test

Adds a Queues-specific OAuth scope (queues:write) for managing Queue producers and consumers.

We'll be decoupling the Queues permissions from the base roles such as workers_scripts:write, and this is prep work for a transition period.

Fixes # MQ-566 internally

Author has addressed the following

  • Tests
    • TODO (before merge)
    • Included - snapshots updated.
    • Not necessary because: part of the default scopes list
  • Changeset (Changeset guidelines)
    • TODO (before merge)
    • Included
    • Not necessary because:
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s): https://github.com/cloudflare/cloudflare-docs/pull/...
    • Not necessary because: new scope is a default scope, and listed in wrangler login --scopes-list, and currently it's permissions are redundant with worker_scripts:write

Copy link

changeset-bot bot commented Mar 19, 2024

🦋 Changeset detected

Latest commit: bf3976f

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

Copy link
Contributor

github-actions bot commented Mar 19, 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/8597915080/npm-package-wrangler-5291

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

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

Or you can use npx with this latest build directly:

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

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


wrangler@3.48.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240404.0
workerd 1.20240404.0 1.20240404.0
workerd --version 1.20240404.0 2024-04-04

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

@pmiguel pmiguel changed the title fear(wrangler): Added Queues-specific default scope to default scopes list feat(wrangler): Added Queues-specific default scope to default scopes list Mar 19, 2024
@pmiguel pmiguel force-pushed the pleal/queues-oauth-default-scope branch 7 times, most recently from b4ded2b to 5e66ed2 Compare March 22, 2024 18:05
Copy link

codecov bot commented Mar 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.24%. Comparing base (2789f26) to head (292cc46).

❗ Current head 292cc46 differs from pull request most recent head bf3976f. Consider uploading reports for the commit bf3976f to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5291      +/-   ##
==========================================
- Coverage   72.44%   72.24%   -0.21%     
==========================================
  Files         331      332       +1     
  Lines       17298    17249      -49     
  Branches     4422     4408      -14     
==========================================
- Hits        12532    12462      -70     
- Misses       4766     4787      +21     
Files Coverage Δ
packages/wrangler/src/user/user.ts 72.75% <ø> (ø)

... and 22 files with indirect coverage changes

@pmiguel pmiguel force-pushed the pleal/queues-oauth-default-scope branch from 5e66ed2 to baefb5a Compare March 25, 2024 11:38
@pmiguel pmiguel force-pushed the pleal/queues-oauth-default-scope branch 2 times, most recently from a771505 to 292cc46 Compare April 4, 2024 17:43
@pmiguel pmiguel marked this pull request as ready for review April 4, 2024 17:43
@pmiguel pmiguel requested a review from a team as a code owner April 4, 2024 17:43
@pmiguel pmiguel changed the title feat(wrangler): Added Queues-specific default scope to default scopes list feat(wrangler): Added bespoke Queues scope to the default scopes list/scope options. Apr 5, 2024
@pmiguel pmiguel force-pushed the pleal/queues-oauth-default-scope branch from 292cc46 to bf3976f Compare April 8, 2024 09:40
@CarmenPopoviciu CarmenPopoviciu merged commit ce00a44 into cloudflare:main Apr 11, 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

2 participants