Skip to content

Override actual_size_limit of group and namespace

张泽华请求将add-repository-size-to-plan-limits合并到main-jh

What does this MR do and why?

With this issue https://jihulab.com/gitlab-cn/gitlab/-/issues/625

Follow this plan https://gitlab.com/gitlab-org/gitlab/-/merge_requests/83258#note_892237125, Override actual_size_limit method of namespace and group

Here are some introductions https://jihulab.com/gitlab-cn/gitlab/-/issues/625#note_496251

Upstream MR https://gitlab.com/gitlab-org/gitlab/-/merge_requests/83819

在 PlanLimits 表中添加 repository_size 字段用来表示每个 plan 的仓库大小限制,默认为 0,意为不启用,为 disabled 状态。然后覆写group 和 namespace 的 actual_size_limit 方法,如果是 JH 的 SAAS 环境,那么就直接读取该 namespace 或者 group 的plan 的 plan_limits 的 repository_size ,如果 repository_size 值为0, 则使用原本的方法,如果不为 0 ,使用 plan_limits 的repository_size

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Upstream related MR

Migration ( Add repository_size to plan_limits table ) https://gitlab.com/gitlab-org/gitlab/-/merge_requests/83819

Baodong 编辑于

合并请求报告

加载中