fix(r2): local bulk delete reports absent keys as successful
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, typescript
- Ambito
- backend-api-design, cli
Direzione di ricerca
Start by comparing the cf r2 objects bulk-delete help output with the local bulk-delete behavior described in the reproduction. The issue points to Miniflare’s packages/miniflare/src/workers/local-explorer/resources/r2.ts implementation; read the linked section and trace how missing keys are handled. Verify the mixed-key case reports one failure while deleting the existing key, and that an existing key alone still succeeds.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
cf r2 objects bulk-delete --local reports an absent key in its success output and exits 0. This makes a mixed existing-and-missing deletion look fully successful in a local script, although the command help specifies a failure entry for each missing key.
Steps to reproduce
Use the CLI described under Runtime or environment. Run these commands in a new temporary directory. The created first key is disposable, and absent is never written.
cf r2 objects put first --body sample --bucket-name sample-bucket --local --persist-to state
cf r2 objects bulk-delete --body '["first","absent"]' --force --bucket-name sample-bucket --local --persist-to state
cf r2 objects list --bucket-name sample-bucket --local --persist-to state
Expected behavior
The operation deletes first and reports a partial failure with one error entry, as described by CLI help. If the simulator deliberately supports an idempotent operation instead, local mode states that missing keys will be reported as successful before callers rely on the result.
Actual behavior
Both CLI builds exited 0. Stdout was [{"key":"first"},{"key":"absent"}] with no missing-key report. Listing after deletion confirmed first had been removed.
Runtime or environment
- macOS 27.2 arm64, Node.js 26.13.1, npm 12.2.2.
- Published
cf1.0.0-rc.1 and the currentmainCI package, both with bundled Miniflare 5.20261117.0-beta. The CLI README at that revision includes array-body bulk deletion among supported local operations. - A direct Local Explorer request on Miniflare 5.20261118.0-beta returned status 200 with
success: trueand both keys while removingfirst.
Evidence
- Expected source:
cf r2 objects bulk-delete --helpdescribessuccess: false,result: nulland one error entry for each failed key, including a missing key. - Failure source: The mixed-key request above exits 0 and lists both keys without an error. The Local Explorer bulk-delete implementation acknowledges the supplied keys after deletion. The issue is the resulting difference from the CLI's advertised behavior.
- Evidence provenance: observed
- Local verification: reproduced
- Reproduction completeness: complete
Restoration check
Repeat the mixed-key case. first disappears from the bucket and the command surfaces one failure for the mixed-key request. If idempotent deletion is the supported local behavior, the CLI explains the local success semantics in its help and runtime output. A bulk delete containing only an existing key still succeeds.
References
- https://github.com/cloudflare/cf/issues/209 — That report concerns slash-containing keys whose objects remain after remote deletion. This local case uses plain keys and the existing object is deleted.
Triage assessment
- Impact level: P2
- Assessment status: supported
- Impact basis: Local tests can report a clean cleanup pass for a key that never existed and conceal how their script handles the documented partial-failure response.
- Workaround status: unverified
- Workaround basis: No local
cfbulk-delete option was found that reports missing keys distinctly.
- Lingua principale
- TypeScript
- Stelle
- 4.7k
- Fork
- 1.7k
- Merge medio
- 1g 22h
- PR unite (30g)
- 282
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cloudflare/workers-sdk
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
cloudflare/workers-sdk#17215 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
cloudflare/workers-sdk#17189 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cloudflare/workers-sdk#17187 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
cloudflare/workers-sdk#17175 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
cloudflare/workers-sdk#17174 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cloudflare/workers-sdk
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
earendil-works/pi#12615 ·
I maintainer di solito rispondono entro 1 giorno
-
My Caps shows "Shared" on private Caps that were never sharedForse già presa @AksharP5 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
CapSoftware/Cap#4569 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
OHDSI/Data2Evidence#3749 ·
I maintainer di solito rispondono entro 4 giorni
-
PWA: Unique Page TitlesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Flagsmith/flagsmith-nodejs-client#332 ·
I maintainer di solito rispondono entro 2 giorni