Block the `Remote` removal if it is referred by a `Distribution`
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 62/100
调研方向
检查 pulpcore/app/models/publication.py 第 659 行附近定义 Distribution 与 Remote 关系的位置,并审查 Django 的 models.PROTECT 行为。确认相关 Remote 和 Distribution 模型的行为,然后验证被 Distribution 引用的 Remote 无法删除,而未被引用的 remotes 仍然可以删除。
由索引模型根据 Issue 内容生成。
描述
Is your feature request related to a problem? Please describe.
If we remove a remote that is linked to a distribution, trying to pull non-synced content may fail.
Describe the solution you'd like
We could define the on_delete of Distribution remote attribute as models.Protect
https://github.com/pulp/pulpcore/blob/1672b3f405170d0a45de9c4b8cc2b059a066a162/pulpcore/app/models/publication.py#L659
as a safeguard to ensure that there is no associated Distribution before removing the Remote.
Additional context
This is related to https://github.com/pulp/pulp_container/issues/1729
- 主要语言
- Python
- 星标
- 606
- 派生
- 174
- 平均合并
- 16 小时 44 分钟
- 30 天内合并 PR
- 107
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pulp/pulpcore 的其他 Issue
-
Issue
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Content app answers 404 instead of 502 when the remote of on-demand content is unavailable可能已有人在做 @gigi206 于 1 天前认领。 未关闭
难度 3/5 半天 新手友好度 66/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 28/100
维护者通常 1 天内回复
-
Performance Task Triage-Needed
难度 5/5 一周以上 新手友好度 25/100
pulp/pulpcore#8206 · 3 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
Issue Triage-Needed
难度 3/5 1-2 天 新手友好度 35/100
维护者通常 1 天内回复
相似的 Issue
-
Agentic
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
Imbad0202/academic-research-skills#979 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
reflex-dev/reflex#7561 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 62/100
prometheus-community/ansible#906 · 2 条评论 ·