Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

A failed project or group create leaves a deleted row behind

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

メンテナーはふだん 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 ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

raystack/frontier のほかの issue

raystack/frontier の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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