Skip to content

Check changes for files over a limit

Jerry Seto requested to merge 393535-integrate-new-strategy into master

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:

  1. Create a new project
  2. Enable the global_file_size_check feature flag
  3. Push a file that's over 2 MB (head -c 2097153 /dev/urandom > 2_MB_plus_1_byte)
  4. Settings -> Repository -> Expand Push rules -> Set Maximum file size (MB) to 2 MB
  5. 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)
  6. 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.

Related to #393535 (closed)

Edited by Jerry Seto

Merge request reports

Loading