A failed project or group create leaves a deleted row behind
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- go
- Área
- authentication, backend, databases
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 344
- Forks
- 48
- Merge medio
- 2 d 10 h
- PR fusionados (30 d)
- 60
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de raystack/frontier
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
Todos los issues de raystack/frontier
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
prime-radiant-inc/evener#5028 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
[BUG] v4.2.9 PostgreSQL 启动迁移失败:DROP INDEX CURRENT_SCHEMA() 语法错误Posiblemente ocupada @renovate la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
OpenListTeam/OpenList#3267 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
'ignore' is called 'deny'Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
openpubkey/opkssh#670 ·
Los mantenedores suelen responder en 1 día