Bug: using incorrect error message for project repo limits
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 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
- Create a group
- Create a project in that group and add some files to it, lets call it Project A
- Create another project, lets say Project B
- 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.
Example Project
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