Skip to content

Extract blob size checking logic from push rule

Jerry Seto requested to merge 393535-extract-file-size-check into master

What does this MR do and why?

Extract blob size checking logic from push rule

This change is a refactor to prepare for the use of file size checks outside of push rules (upcoming changes: !125245 (merged))

Contributes to: #393535 (closed)

How to setup and validate locally

  1. Create a new project
  2. Settings -> Repository -> Expand Push rules -> Set Maximum file size (MB) to 1 MB
  3. Try to push a file that is smaller than 1 MB. See that the push is allowed. (e.g head -c 1048576 /dev/urandom > borderline)
  4. Try to push a file that is larger than 1 MB see that the push is not allowed. (e.g head -c 1048577 /dev/urandom > oversized)

MR acceptance checklist

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

Related to #393535 (closed)

Edited by Jerry Seto

Merge request reports