Filesystem doesn't retry Drive's 409 Conflict on delete

Aperta Adatta ai principianti
#465 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
api, backend

Direzione di ricerca

Inizia dall’implementazione di rm del filesystem e confronta la gestione dell’eliminazione con l’helper pydrive_retry aggiunto per i test in #461. Aggiungi la gestione dei tentativi per le risposte 409 di Drive con motivo conflict solo durante l’eliminazione, mantenendo il trattamento esistente di 404 come successo. Controlla i test relativi all’eliminazione e conferma che un nuovo tentativo di eliminazione riesce dopo il tentativo iniziale.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Right after a file changes, Drive sometimes answers a DELETE with 409 Conflict (reason conflict). Live CI hit this three times during test cleanup on the 2.0 fix PRs: twice right after a content update and once right after a conversion to a Google Doc. #461 makes the tests' retry helper (pydrive_retry) retry it. The filesystem's own rm doesn't retry it.

Neither rclone's Drive backend nor google-api-python-client retries a 409, so 2.0 leaves the filesystem as it is.

If a user reports fs.rm() failing with 409 right after a write, add the retry, for reason conflict on delete only. It's safe: if an earlier attempt went through, the repeated delete gets the 404 that the delete code already treats as done.

🤖 Generated with Claude Code

Lingua principale
Python
Stelle
671
Fork
76
Merge medio
17h 55m
PR unite (30g)
46

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di iterative/PyDrive2

Tutte le issue di iterative/PyDrive2

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.