The retry of a failed PUT hides the first answer from the caller
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by tracing _post_put and how it handles failed PUT responses, then read the complete(handle_rrule=True) safe-mode path and the test added during review of PR #845. Compare the first and retry errors, including the vobject ParseError case; done means a failed save preserves enough of the first response for callers to handle possible storage correctly, with tests covering the reported cases.
索引モデルが issue の本文から書いたものです。
説明
Disclaimer: AI-generated text below the line, generated by Claude Opus 5.5, from the prompt:
Deal with PR #845 [https://github.com/python-caldav/caldav/pull/845; this issue came out of the review of that PR]
_post_put retries a failed PUT once when vobject is installed, a 5xx included. Only the error from the last attempt reaches the caller, so the caller cannot tell that the first attempt may have stored the object.
This matters for complete(handle_rrule=True) in the "safe" mode since https://github.com/python-caldav/caldav/pull/845. It keeps the completed copy after a 5xx on the recurring task, because the task may have been stored. But if the first PUT stores the task and answers 500, and the retry then gets a 412 (the old If-Match no longer matches) or a 403, the error looks like a refusal. The copy is deleted, the completion record is lost and the occurrence is skipped. This was reproduced with a fake client. It only happens with vobject installed, and vobject is only in the test extra.
Also, if the server refuses with e.g. a 403 and get_vobject_instance() then raises a vobject ParseError on data icalendar accepted, that ParseError replaces the server's error.
Possible fixes:
- Drop the retry on 5xx. The comment says accessing
vobject_instancemay "clean" the object (https://github.com/python-caldav/caldav/issues/43), butget_vobject_instance()now returns a copy, and the body of the retry was byte-identical in the runs made for the review. This affects every save, so it needs checking. - Or raise the error of the first attempt, or carry its status on the error raised.
- 主要言語
- Python
- スター
- 412
- フォーク
- 113
- 平均マージ
- 9時間 21分
- マージ済み PR(30日)
- 77
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python-caldav/caldav のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
python-caldav/caldav#844 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
python-caldav/caldav#792 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
python-caldav/caldav#788 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
python-caldav/caldav#687 ·
メンテナーはふだん 1 日以内に返信
-
Objects built from arguments have a TZID but no VTIMEZONE対応中かも @ivenos が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
python-caldav/caldav#849 · コメント 14 件 ·
メンテナーはふだん 1 日以内に返信
python-caldav/caldav の issue をすべて見る
似ている issue
-
community enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
NVIDIA/auto-ontology#463 ·
メンテナーはふだん 1 日以内に返信
-
Update Atari link on Gymnasium docs page対応中かも @qwist1233-cpu が今日担当しました。 オープンhelp wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Farama-Foundation/Gymnasium#1845 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 91/100
WingedGuardian/GENesis-AGI#4101 ·
メンテナーはふだん 1 日以内に返信