Extract blob size checking logic from push rule
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
- Create a new project
- Settings -> Repository -> Expand
Push rules
-> SetMaximum file size (MB)
to 1 MB - 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
) - 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #393535 (closed)
Edited by Jerry Seto