Check changes for files over a limit
What does this MR do and why?
Check changes for files over a limit
Log when changes would exceed a global limit.
In a future MR we will add a non-hardcoded limit (based on plan tier or something other configuration) that will prevent pushes that contain files over the limit.
Contributes to: #393535 (closed)
How to setup and validate locally
Try some variations of things like:
- Create a new project
- Enable the global_file_size_check feature flag
- Push a file that's over 2 MB (
head -c 2097153 /dev/urandom > 2_MB_plus_1_byte
) - Settings -> Repository -> Expand
Push rules
-> SetMaximum file size (MB)
to 2 MB - Try to push a file that is larger than 2 MB see that oversize file is logged. (e.g
head -c 2097153 /dev/urandom > new_2_MB_plus_1_byte
) - Try appending to to the first file (
echo 'changes' >> 2_MB_plus_1_byte
) and see that there's no log for the oversize file
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