-
Notifications
You must be signed in to change notification settings - Fork 748
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): Show feedback on Pages Function upload failure #5819
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
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 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-5819 You 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-5819 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9099454586/npm-package-wrangler-5819 dev path/to/script.js Additional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9099454586/npm-package-create-cloudflare-5819 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9099454586/npm-package-cloudflare-kv-asset-handler-5819 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9099454586/npm-package-miniflare-5819 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9099454586/npm-package-cloudflare-pages-shared-5819 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9099454586/npm-package-cloudflare-vitest-pool-workers-5819 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
04a3438
to
b82a877
Compare
logger.log( | ||
`✨ Deployment complete! However, we couldn't ascertain the final status of your deployment.\n\n` + | ||
`⚡️ Visit your deployment at ${deploymentResponse.url}\n` + | ||
`⚡️ Check the deployment logs on the Cloudflare dashboard: https://dash.cloudflare.com/${accountId}/pages/view/${projectName}/${deploymentResponse.id}` |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"
> [email protected] 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
debug
Author has addressed the following