[wrangler] Disable flagship OAuth scopes not yet valid in backend#13453
[wrangler] Disable flagship OAuth scopes not yet valid in backend#13453jamesopstad merged 2 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 52bd1e5 The changes in this PR will be included in the next version bump. 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 |
|
Codeowners approval required for this PR:
Show detailed file reviewers |
|
there will be test snapshots to update though i think |
|
✅ All changesets look good |
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
There was a problem hiding this comment.
The scopes are correctly removed from DefaultScopes, but the inline test snapshots in three test files still reference flagship:read and flagship:write. These tests will fail because the generated OAuth URL will no longer contain those scopes.
Affected files:
packages/wrangler/src/__tests__/user.test.ts— 6 snapshot URLs containingflagship%3Aread%20flagship%3Awritepackages/wrangler/src/__tests__/whoami.test.ts— 6 scope list entries containingflagship:read/flagship:writepackages/wrangler/src/__tests__/deploy/core.test.ts— 2 snapshot URLs containingflagship%3Aread%20flagship%3Awrite
You'll need to update these inline snapshots (easiest via pnpm --filter wrangler test:ci -u or by manually removing the flagship scope fragments).
| "flagship:read": "See Flagship feature flags and apps", | ||
| "flagship:write": "See and change Flagship feature flags and apps", | ||
| // "flagship:read": "See Flagship feature flags and apps", | ||
| // "flagship:write": "See and change Flagship feature flags and apps", |
There was a problem hiding this comment.
Commenting these out is fine as a quick disable, but the inline snapshots in user.test.ts (6 occurrences), whoami.test.ts (6 occurrences), and deploy/core.test.ts (2 occurrences) all still contain flagship:read / flagship:write in their expected output. This will cause test failures.
Please update the snapshots to remove the flagship scope references (e.g. run pnpm --filter wrangler test:ci -u).
|
I'm Bonk, and I've done a quick review of your PR. This PR comments out the Issue found:
I've posted the review with details on PR #13453. |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
The
flagship:readandflagship:writeOAuth scopes are not yet recognized by the Cloudflare backend. This temporarily comments them out from the default scopes requested duringwrangler loginto prevent issues.They can be re-enabled once the backend supports them.
Tests
Public documentation