-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix wrangler deploy failing for new workers containing environment variables or bindings
#11504
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
Fix wrangler deploy failing for new workers containing environment variables or bindings
#11504
Conversation
…variables or bindings
🦋 Changeset detectedLatest 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) { |
There was a problem hiding this comment.
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 🙂
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 👍
|
Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the Depending on your changes, running Notes:
|
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
|
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. |
jamesopstad
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Dario.
Fixes the regression introduced in #11389 present in the latest version of wrangler that causes
wrangler deployrun on never deployed worker failing if they have any environment variables or bindings in their configuration.