Skip to content

thomasgauvin: add rename command to kv wrangler #9835

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

thomasgauvin
Copy link
Contributor

addresses #7765

Copy link

changeset-bot bot commented Jul 2, 2025

⚠️ No Changeset found

Latest commit: f7e19ce

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

pkg-pr-new bot commented Jul 2, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: f7e19ce

@thomasgauvin thomasgauvin marked this pull request as ready for review July 3, 2025 15:46
@thomasgauvin thomasgauvin requested review from a team as code owners July 3, 2025 15:46
throw new UserError("Unable to determine namespace ID");
}

if (!args.newName) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think this is necessary, yargs should already have errored

namespaceId = namespace.id;
}

if (!namespaceId) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont think this check is necessary? or at the least, it shouldn't be a user error - either it'll have been set by args or already errored out above.

if its a types issue, you should use assert to narrow the type.

Comment on lines 306 to 308
metrics.sendMetricsEvent("rename kv namespace", {
sendMetrics: config.send_metrics,
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is no longer necessary, all commands have metrics automatically added for start/complete/error.

Copy link
Contributor

@emily-shen emily-shen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you also add a changeset please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Untriaged
Development

Successfully merging this pull request may close these issues.

3 participants