Skip to content

WIP:Fix issues with size check for push changes

Rubén Dávila requested to merge rd-fix-size-limit-checks-on-push into master

What does this MR do?

It changes the strategy to calculate the size of the changes received in the push. Now we only take into account modified files when pushing new branches or tags.

It's important to mention that in the previous version we were not counting the total file size when the user renamed a file or did a small modification to a large file. After talking with @jacobvosmaer-gitlab he clarified that Git does not store diffs so we always should count the total size of the file even when the modification was of a single line.

With this fix we're also covering the scenario where a file was added in a first commit but the commit was reverted in a second commit. When those two commits are received in the push we should check the size of the file introduced in the first commit given that file is going to be stored in the repository too.

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

Some users were unable to push a new branch/tag or when they were pushing a branch with a single change we were counting the size of all the existing files in the repo.

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

  • Changelog entry added, if necessary
  • Documentation created/updated
  • API support added
  • Tests added for this feature/bug
  • Conform by the code review guidelines
    • Has been reviewed by a UX Designer
    • Has been reviewed by a Frontend maintainer
    • Has been reviewed by a Backend maintainer
    • Has been reviewed by a Database specialist
  • EE specific content should be in the top level /ee folder
  • Conform by the merge request performance guides
  • Conform by the style guides
  • Conform by the database guides
  • If you have multiple commits, please combine them into a few logically organized commits by squashing them
  • Internationalization required/considered
  • If paid feature, have we considered GitLab.com plan and how it works for groups and is there a design for promoting it to users who aren't on the correct plan
  • End-to-end tests pass (package-and-qa manual pipeline job)

What are the relevant issue numbers?

REF: #6780 (closed) REF: #6437 (closed) REF: #6459 (closed)

Edited by Rubén Dávila

Merge request reports