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

未關閉 適合新手
#465 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
76/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
python
領域
api, backend

研究方向

從檔案系統的 rm 實作開始,並將其刪除處理方式與 #461 中為測試新增的 pydrive_retry 輔助函式進行比較。僅在刪除時,為原因是 conflict 的 Drive 409 回應新增重試處理,同時保留現有將 404 視為成功的處理方式。檢查與刪除相關的測試,並確認首次嘗試後再次刪除能夠成功。

由索引模型根據 Issue 內容生成。

描述

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

主要語言
Python
星號
671
分支
76
平均合併
17 小時 55 分鐘
30 天內合併 PR
46

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

iterative/PyDrive2 的其他 Issue

查看 iterative/PyDrive2 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。