Bug: Failed to delete project due to foreign key constraint plan_webhook_delivery_plan_id_fkey
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
首先追踪用于删除计划的项目清理路径,然后检查 plan_webhook_delivery 记录相对于计划记录是如何处理的。使用包含计划和已触发 webhook 投递的项目重现删除操作;当项目及其依赖记录能够在不出现 PostgreSQL 外键错误的情况下被删除时,即可认为该问题已完成。
由索引模型根据 Issue 内容生成。
描述
Provide the Bytebase version you are using
3.15.1
Describe the bug
When attempting to delete a project, the deletion process fails with an internal error (Code 13). It appears that the system fails to purge the project because it tries to delete records in the plan table without first removing the dependent records in the plan_webhook_delivery table, resulting in a PostgreSQL foreign key constraint violation.
Steps to reproduce
- Navigate to the project list in the Bytebase console.
- Select a project (e.g., "kyrie") that has associated plans and triggered webhook deliveries.
- Click on the option to Delete the project.
- An error prompt appears, and the project is not deleted.
Expected behavior
The project, along with all its cascading dependencies (including plans and their associated webhook deliveries), should be successfully deleted without throwing foreign key constraint errors.
Provide the database you are using
pgsql 17.6
Additional context
Code 13: Internal
[internal] failed to purge project: failed to delete plans for project kyrie: ERROR: update or delete on table "plan" violates foreign key constraint "plan_webhook_delivery_plan_id_fkey" on table "plan_webhook_delivery" (SQLSTATE 23503)
- 主要语言
- TypeScript
- 星标
- 14.8k
- 派生
- 1k
- 平均合并
- 6 小时 56 分钟
- 30 天内合并 PR
- 518
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bytebase/bytebase 的其他 Issue
-
BigQuery schema sync fails when ORDINAL_POSITION is NULL可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
bytebase/bytebase#21217 · 6 条评论 ·
维护者通常 1 天内回复
-
Feature Github
难度 5/5 一周以上 新手友好度 25/100
维护者通常 1 天内回复
-
[MariaDB] View SELECT fails with masking resource-not-found error after initially succeeding可能已有人在做 @rebelice 于 2 天前认领。 未关闭Bug Github
难度 4/5 3-5 天 新手友好度 22/100
bytebase/bytebase#22249 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Oracle dump and migration omit identity clauses and index visibility可能已有人在做 @d-bytebase 于 9 天前认领。 未关闭Bug Github
难度 4/5 3-5 天 新手友好度 48/100
bytebase/bytebase#22119 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Feature Github
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
查看 bytebase/bytebase 的全部 Issue
相似的 Issue
-
Flaky test: selecting a portion just after inserting it can also match its Change and Delete buttons未关闭ready-for-agent
难度 2/5 1-3 小时 新手友好度 84/100
linagora/dcs-onlyoffice#172 ·
-
bug follow-up
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
nightly-tests
难度 2/5 1-3 小时 新手友好度 68/100
BlackBeltTechnology/pi-agent-dashboard#1226 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
danielmiessler/LifeOS#3028 ·
维护者通常 5 天内回复
-
execute_sql cannot create a SQLite trigger or a PostgreSQL BEGIN ATOMIC function: the statement is cut at the semicolons inside its body可能已有人在做 @goranai 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复