-
Notifications
You must be signed in to change notification settings - Fork 552
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
Catch erroneous use of deployments view [deployment-id] --experimental-versions
command
#5405
Conversation
…with deprecation notice
🦋 Changeset detectedLatest commit: d521a0a 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 |
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/8450548979/npm-package-wrangler-5405 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/5405/npm-package-wrangler-5405 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8450548979/npm-package-wrangler-5405 dev path/to/script.js Additional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8450548979/npm-package-create-cloudflare-5405 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8450548979/npm-package-cloudflare-kv-asset-handler-5405 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8450548979/npm-package-miniflare-5405 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8450548979/npm-package-cloudflare-pages-shared-5405 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8450548979/npm-package-cloudflare-vitest-pool-workers-5405 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5405 +/- ##
==========================================
+ Coverage 72.16% 72.26% +0.09%
==========================================
Files 321 322 +1
Lines 16651 16663 +12
Branches 4258 4260 +2
==========================================
+ Hits 12017 12042 +25
+ Misses 4634 4621 -13
|
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.
What is the aim of adding a "new" command that is already deprecated?
Is it to catch people who are used to running a view
command under a different sub-command?
Although running the "correct" command feels like it is helping users, I would say that in this case an error is better since it prevents users from starting down the wrong path at all, and in fact would allow this fake command to be removed in the future without a breaking change, since the only user facing change would be the replacement of the "helpful" error message with a more generic one.
I think one could actually go further and rather than call this "deprecated" you just say that we are providing a more helpful error message for an invalid command.
packages/wrangler/src/__tests__/versions/deployments/deployments.view.test.ts
Outdated
Show resolved
Hide resolved
packages/wrangler/src/__tests__/versions/deployments/deployments.view.test.ts
Outdated
Show resolved
Hide resolved
Yeah pretty much. You'll note this command is marked as 'hidden' too.
Thanks for confirming – I agree.
Yeah I like this. See my other comment for suggested change. |
a768294
to
d521a0a
Compare
deployments view [deployment-id] --experimental-versions
commanddeployments view [deployment-id] --experimental-versions
command
What this PR solves / how to test
Adds a
view
command to the newdeployments
subcommands opted-in via the--experimental-versions
flag which shows a deprecation message and points the user to either runwrangler deployments status --experimental-versions
orwrangler versions view <version-id> --experimental-versions
instead.Author has addressed the following