ProjectTech4DevAI / ProjectTech4DevAI/kaapi-backend

Idempotency key for expensive POST requests

オープン
#618 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

主要言語
Python
スター
18
フォーク
10
平均マージ
2日 20時間
マージ済み PR(30日)
14

説明

Is your feature request related to a problem? Please describe.
Clients retrying POST actions is bad especially when it's expensive like in documents.

Describe the solution you'd like
To overcome processing expensive duplicate requests, we can introduce an idempotency_key in requests which clients can use to retry. This idempotency_key needs to be stored against the relevant entity, so when users/clients retries creating the same entity, entity creation can be skipped and the API can just return the already existing entity.

Additional context
See Stripe's API docs - https://docs.stripe.com/api/idempotent_requests

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

この issue ではファイル、テスト、エントリーポイントが指定されていません。まず、対象エンティティの POST ハンドラーと永続化モデルを特定し、次に Stripe の冪等リクエストに関するドキュメントを読んでください。同じキーを使った重複リトライでエンティティの作成をスキップし、既存のエンティティを返せば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
api, backend, databases
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

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

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