Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

A failed project or group create leaves a deleted row behind

Đang mở
#2,009 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Go
Star
344
Fork
48
Merge trung bình
2 ngày 10 giờ
Pull request đã merge (30 ngày)
60

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của raystack/frontier

Tất cả issue của raystack/frontier

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.