Bug: using incorrect error message for project repo limits
<!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "type::bug" label: - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=type::bug and verify the issue you're about to submit isn't a duplicate. ---> ### Summary In an internal slack thread it was highlighted that a customer was incorrectly seeing push rejection messages: - https://gitlab.slack.com/archives/C018C623KBJ/p1687980279292509 - https://gitlab.zendesk.com/agent/tickets/422494 We confirmed that the push was actually successful, but an error message relating to project repository limits was still being displayed. This is because the group had a project over the 10GiB limit (pending deletion, but I think not very relevant), and there is a bug in our post receive service that uses the wrong error message. We used to display [this message](https://gitlab.com/gitlab-org/gitlab/-/commit/f33f2e8af5f3b2b15c01b6598a27ee79eb41007e#1c574b1a5d3cc70909aa82441a8b2136664588cd_145_0) but it was incorrectly removed from CLI messaging (still present in in-app banners), so we should restore it so that users see a more relevant/appropriate message. ### Steps to reproduce 1. Create a group 2. Create a project in that group and add some files to it, lets call it Project A 3. Create another project, lets say Project B 4. Set a repository limit you can easily go over, `::Gitlab::CurrentSettings.update(repository_size_limit: 10) # 10 bytes` At this point, Project A should be locked/over the limit, but Project B is empty. Push some changes to Project B. The push is successful, but an error message will be displayed, e.g. ![Screenshot_2023-07-14_at_11.10.57](/uploads/8381acf84730e0fafdd82ed3f03fe6c9/Screenshot_2023-07-14_at_11.10.57.png) ### Example Project <!-- If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report. If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version. --> ### What is the current *bug* behavior? The bug is the "Your push has been rejected" message in the CLI. ### What is the expected *correct* behavior? The correct message as shown in the screenshot above ### Relevant logs and/or screenshots As above ### Output of checks This bug happens on GitLab.com <!-- If you can, link to the line of code that might be responsible for the problem. -->
issue