A failed project or group create leaves a deleted row behind
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
Start in core/project/service.go at the rollback around line 83 and trace how project.Service.Create handles failures linking the project to its org or adding the owner policy. Compare the soft-delete behavior introduced by #2007 with the two proposed fixes: purging the row or putting the insert and membership step in one transaction. Done means a failed create leaves no deleted project row; check how the chosen approach affects the audit records.
索引モデルが issue の本文から書いたものです。
説明
When project.Service.Create fails after the row is inserted, because linking the project to its org or adding the owner policy fails, it rolls back with the repository Delete (core/project/service.go:83). Since #2007 that delete is soft, so the rollback leaves a row with deleted_at set instead of removing it.
Groups have the same leftover once #2016 is merged. When group.Service.Create fails after the row is inserted, because linking the group to its org or making the creator its owner fails, it rolls back with the repository Delete (core/group/service.go:80), which #2016 makes soft.
The project.created and project.deleted audit records were already both written for such a create before #2007.
It only happens when the SpiceDB link or the owner policy fails, so it is rare.
Possible fixes:
- Purge the row on rollback. This removes the leftover row.
- Run the insert and the membership step in one transaction. This also drops the audit pair.
- 主要言語
- Go
- スター
- 344
- フォーク
- 48
- 平均マージ
- 2日 10時間
- マージ済み PR(30日)
- 60
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
raystack/frontier のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
raystack/frontier の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
JakeChampion/lang#13132 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] deploy.restart_policy without condition drops the restart policy対応中かも @akshat-lakhera が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
docker/compose#14383 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
Azure/azure-storage-fuse#2429 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
AvengeMedia/dank-greeter#39 · コメント 1 件 ·
-
bug: dataplane client ignores SERVER_BASEPATH, so create/delete topic miss the subpath対応中かも @bhataprameya が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
redpanda-data/console#2693 ·
メンテナーはふだん 2 日以内に返信