KEMBAR78
write to output file on command failure by nikitassharma · Pull Request #10997 · cloudflare/workers-sdk · GitHub
Skip to content

Conversation

nikitassharma
Copy link
Member

Fixes #10965

When either WRANGLER_OUTPUT_FILE_PATH or WRANGLER_OUTPUT_FILE_DIRECTORY are set
in the environment, then command failures will append a line to the output file
encoding the error code and message, if present.

With issue #10965, a DO migration can be identified as follows

if [ "$(tail -1 ${WRANGLER_OUTPUT_FILE_PATH} | jq .code)" = "10211" ]; then
    # DO migration, handle as needed
fi
  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: not documented
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: not in v3

@nikitassharma nikitassharma requested a review from a team as a code owner October 16, 2025 19:43
@changeset-bot
Copy link

changeset-bot bot commented Oct 16, 2025

🦋 Changeset detected

Latest commit: 56ebd38

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

@nikitassharma nikitassharma force-pushed the nsharma/10965-error-output branch from 2046380 to f78c284 Compare October 16, 2025 19:44
@nikitassharma nikitassharma changed the title write to output file on command failute write to output file on command failure Oct 16, 2025
@github-actions
Copy link
Contributor

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 nsharma/10965-error-output might be a good starting point.

Notes:

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 16, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 56ebd38

@nikitassharma nikitassharma added the skip-v3-pr Skip validation of presence of a v3 backport PR label Oct 16, 2025
@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Oct 17, 2025
@nikitassharma nikitassharma merged commit 3bb034f into main Oct 17, 2025
30 checks passed
@nikitassharma nikitassharma deleted the nsharma/10965-error-output branch October 17, 2025 21:06
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Oct 17, 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.

Check if a version upload will fail due to a DO migration

2 participants