Skip to content

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:

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

  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

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

Edited by Vijay Hawoldar