Skip to content

[wrangler] Prioritize CLOUDFLARE_ACCOUNT_ID over cached account id for Pages commands#13628

Merged
petebacondarwin merged 2 commits intomainfrom
devin/1776785594-pages-env-account-id
Apr 25, 2026
Merged

[wrangler] Prioritize CLOUDFLARE_ACCOUNT_ID over cached account id for Pages commands#13628
petebacondarwin merged 2 commits intomainfrom
devin/1776785594-pages-env-account-id

Conversation

@emily-shen
Copy link
Copy Markdown
Contributor

@emily-shen emily-shen commented Apr 21, 2026

Fixes #13590.

Most pages commands previously read the account id from their cached pages.json before checking the CLOUDFLARE_ACCOUNT_ID environment variable.

This is inconsistent with other commands, including the pages project list/create/delete commands which already do prioritise CLOUDFLARE_ACCOUNT_ID.

This PR applies the same pattern to the remaining Pages commands:

  • wrangler pages deploy

  • wrangler pages deployment list / deployment delete

  • wrangler pages deployment tail

  • wrangler pages download config

  • wrangler pages secret (put/bulk/delete/list)

  • Tests

    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation

    • Cloudflare docs PR(s):
    • Documentation not necessary because: bugfix

Devin PR requested by @emily-shen (eshen@cloudflare.com)

Link to Devin session: https://app.devin.ai/sessions/c2f96415cbf44d12a22dec27fad422b4

@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 21, 2026

🦋 Changeset detected

Latest commit: 875f5a2

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

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 21, 2026

UnknownError: ProviderInitError

github run

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 21, 2026

@emily-shen Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 21, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@13628

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@13628

miniflare

npm i https://pkg.pr.new/miniflare@13628

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@13628

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@13628

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@13628

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@13628

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@13628

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@13628

wrangler

npm i https://pkg.pr.new/wrangler@13628

commit: 875f5a2

@emily-shen emily-shen force-pushed the devin/1776785594-pages-env-account-id branch from fbd1308 to cf6d9ab Compare April 24, 2026 12:13
@emily-shen emily-shen marked this pull request as ready for review April 24, 2026 12:14
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

Changeset Review

Reviewed Changesets

.changeset/pages-deploy-env-account-id.md

Package: wrangler
Version Type: patch

Validation Results:

Criteria Status Notes
Version Type patch is appropriate for this bug fix
Changelog Quality Clear description of the fix, affected commands listed, previous behavior explained
Markdown Headers No h1/h2/h3 headers found
Analytics N/A - no analytics collection
Dependabot N/A - not a dependency update
Experimental Features N/A - bug fix for existing functionality

Summary:
This changeset correctly describes a bug fix where the CLOUDFLARE_ACCOUNT_ID environment variable was not being prioritized over cached account IDs in certain Pages commands. The description clearly lists the affected commands and notes that pages project commands were already working correctly. Good level of detail for users to understand what was fixed.


Overall Result

✅ All changesets look good

@workers-devprod workers-devprod requested review from a team and ascorbic and removed request for a team April 24, 2026 12:14
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Apr 24, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

Copy link
Copy Markdown
Contributor

@workers-devprod workers-devprod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Apr 24, 2026
@petebacondarwin petebacondarwin force-pushed the devin/1776785594-pages-env-account-id branch from cf6d9ab to 875f5a2 Compare April 25, 2026 13:18
@petebacondarwin petebacondarwin merged commit e6c437a into main Apr 25, 2026
52 checks passed
@petebacondarwin petebacondarwin deleted the devin/1776785594-pages-env-account-id branch April 25, 2026 14:04
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Apr 25, 2026
vaishnav-mk pushed a commit to vaishnav-mk/workers-sdk that referenced this pull request Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Issue with "wrangler pages deploy" for new token formats

3 participants