[wrangler] add validation to actions that could affect r2 data catalog state with override option#12852
Merged
edmundhung merged 1 commit intocloudflare:mainfrom Mar 25, 2026
Conversation
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
🦋 Changeset detectedLatest commit: 3d1a391 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 |
edmundhung
reviewed
Mar 17, 2026
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
ea746f1 to
c38ca56
Compare
edmundhung
reviewed
Mar 19, 2026
ecd68e9 to
45113ee
Compare
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers |
d8edebf to
bdc00ae
Compare
edmundhung
reviewed
Mar 23, 2026
d3d9c11 to
8cfded6
Compare
edmundhung
approved these changes
Mar 25, 2026
Member
edmundhung
left a comment
There was a problem hiding this comment.
Looks great. Thanks for all the hard work!
ReppCodes
reviewed
Mar 25, 2026
ReppCodes
reviewed
Mar 25, 2026
8cfded6 to
d877e66
Compare
…g state with override option
d877e66 to
3d1a391
Compare
Contributor
|
LGTM! |
Merged
petebacondarwin
added a commit
that referenced
this pull request
Mar 25, 2026
Update the 'batch create objects' e2e test snapshot to include the new confirmation prompt added in #12852 for operations that could affect R2 data catalog state.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Data catalog errors are difficult to recover from, and users sometimes aren't aware that an action could delete or overwrite files from their buckets that could cause them. This change ensures R2 object and lifecycle commands now validate by default on actions that could leave data catalog-enabled buckets in an invalid state. By default, Wrangler will perform the catalog check with the header set, handle a 409 with an interactive prompt, and then if the user confirms, the request will be executed without the header/if user cancels, the request will be cancelled. Wrangler also has a
--forceflag to override any checks in interactive mode.A picture of a cute animal (not mandatory, but encouraged)