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

オープン 初心者向け
#465 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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分
マージ済み PR(30日)
46

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

iterative/PyDrive2 のほかの issue

iterative/PyDrive2 の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。