Skip to content

Conversation

@dario-piotrowicz
Copy link
Member

Fixes the regression introduced in #11389 present in the latest version of wrangler that causes wrangler deploy run on never deployed worker failing if they have any environment variables or bindings in their configuration.


  • Tests
    • Tests included/updated
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: bugfix
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: fix to a v4-only feature

@dario-piotrowicz dario-piotrowicz requested a review from a team as a code owner December 2, 2025 18:46
@changeset-bot
Copy link

changeset-bot bot commented Dec 2, 2025

🦋 Changeset detected

Latest commit: 87bb3d0

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

url
);
).catch((e) => {
if (e instanceof APIError && e.code === 10007) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This seems sensible to me, but I am happy to broaden this that's preferred 🙂

Copy link
Contributor

Choose a reason for hiding this comment

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

Are we confident the error code will always be 10007 for this scenario?

Copy link
Contributor

Choose a reason for hiding this comment

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

Happy with this from the backend side of house 👍

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the v3-maintenance branch with your changes. Thank you for helping us keep Wrangler v3 supported!

Depending on your changes, running git rebase --onto v3-maintenance main dario/fix-wrangler-deploy-fetch-secrets-on-new-workers might be a good starting point.

Notes:

  • your PR branch should be named v3-backport-11504
  • add the skip-v3-pr label to the current PR to stop this workflow from failing

@dario-piotrowicz dario-piotrowicz added the skip-v3-pr Skip validation of presence of a v3 backport PR label Dec 2, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 2, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

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

commit: 87bb3d0

@dario-piotrowicz
Copy link
Member Author

PS: I can see a few places where we check for code 10007 errors, I will open a followup PR to consolidate those, but for this PR, in order to safely fix the latest release, I'd avoid the extra unnecessary risk and just proceed with this the bugfix

@jamesopstad
Copy link
Contributor

PS: I can see a few places where we check for code 10007 errors, I will open a followup PR to consolidate those, but for this PR, in order to safely fix the latest release, I'd avoid the extra unnecessary risk and just proceed with this the bugfix

Agree it's not for this PR but we should really get rid of all these magic numbers and have an object with the error codes that we can import from.

Copy link
Contributor

@jamesopstad jamesopstad left a comment

Choose a reason for hiding this comment

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

Thanks Dario.

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Dec 3, 2025
@jamesopstad jamesopstad merged commit 7e80340 into main Dec 3, 2025
27 checks passed
@jamesopstad jamesopstad deleted the dario/fix-wrangler-deploy-fetch-secrets-on-new-workers branch December 3, 2025 12:59
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-v3-pr Skip validation of presence of a v3 backport PR

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants