fix(wrangler): Show feedback on Pages Function upload failure#5819
fix(wrangler): Show feedback on Pages Function upload failure#5819CarmenPopoviciu merged 6 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 4cf2706 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
3b95a95 to
d27cbb3
Compare
GregBrimble
left a comment
There was a problem hiding this comment.
Thanks Carmen! Once you've got a sleep and cap added in to that loop, pretty much ready to merge, imo!
a6f2ebc to
85b2070
Compare
|
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9099454586/npm-package-wrangler-5819You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/5819/npm-package-wrangler-5819Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9099454586/npm-package-wrangler-5819 dev path/to/script.jsAdditional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9099454586/npm-package-create-cloudflare-5819 --no-auto-updatenpm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9099454586/npm-package-cloudflare-kv-asset-handler-5819npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9099454586/npm-package-miniflare-5819npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9099454586/npm-package-cloudflare-pages-shared-5819npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9099454586/npm-package-cloudflare-vitest-pool-workers-5819Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
04a3438 to
b82a877
Compare
There was a problem hiding this comment.
There are gonna be no logs here for DU users, they could see a green tick and red triangle but that's it. I probably wouldn't bother linking to dash
There was a problem hiding this comment.
true, but given that we couldn't tell whether the deployment was successful or failed from within wrangler, I think there might be some value in linking to Dash. I changed the wording to Check the deployment details on ...
Today, if uploading a Pages Function, or deploying a Pages project fails for whatever reason, there’s no feedback shown to the user. Worse yet, the shown message is misleading, saying the deployment was successful, when in fact it was not: ``` ✨ Deployment complete! ``` This commit ensures that we provide users with: - the correct feedback with respect to their Pages deployment - the appropriate messaging depending on the status of their project's deployment status - the appropriate logs in case of a deployment failure
c7d11cf to
4803c0c
Compare
4803c0c to
4cf2706
Compare
|
thanks everyone for reviewing this PR and providing valuable feedback 🙏 |
|
Bless you, finally I get a clear error message what's going wrong with my deploy 😌 |
|
whoohooo! much awesomeness! so so happy this PR helps! |
|
Shouldn't this provide a non-zero return code so ci/cd and other scripts would fail? npm run deploy && echo "Deployment was successful" || echo "Deployment failed"
> XXXX@0.1.0 deploy
> wrangler pages deploy ./build/client
▲ [WARNING] Warning: Your working directory is a git repo and has uncommitted changes
To silence this warning, pass in --commit-dirty=true
✨ Compiled Worker successfully
🌍 Uploading... (40/40)
✨ Success! Uploaded 0 files (40 already uploaded) (0.54 sec)
✨ Uploading Functions bundle
🌎 Deploying...
✘ [ERROR] Failed to publish your Function. Got error: Your R2 bucket does not exist (workers.api.error.bucket_not_found)
❌ Deployment failed!
🪵 Logs were written to "/Users/.../Library/Preferences/.wrangler/logs/wrangler-2024-05-17_15-15-33_047.log"
Deployment was successful |
|
ugh...not sure how I missed that 😅. Fix PR is here: #5862 Thx so much for catching that! |

What this PR solves / how to test
Today, if uploading a Pages Function, or deploying a Pages project fails for whatever reason, there’s no feedback shown to the user. Worse yet, the shown message is misleading, saying the deployment was successful, when in fact it was not:
This PR ensures that moving forward, we provide users with:
Fixes #3966 and WC-2090.
Before

After
debugAuthor has addressed the following