[go: up one dir, main page]

Skip to content

Optimize push rule file size check using quarantine dir

What does this MR do and why?

Related to: Improve performance for maximum file size push ... (#505364 - closed)

This MR optimizes the file size limit check process for push rules by using the quarantine directory.

The previous implementation required a full graph traversal, which was inefficient. Checking only the quarantine directory significantly improves performance while maintaining accuracy. Since this is an EE-only feature, a new class EE::Gitlab::Checks::PushRules::FileSizeCheck has been introduced to retrieve the push rule file size limit.

The existing approach should be removed when cleaning up the push_rule_file_size_limit feature flag.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Local test with the FF on
with_FF_on

How to set up and validate locally

1.Set a push rule file size limit in the project settings. (settings -> Repository -> Push rules)

2.Try pushing a file larger than the limit – it should be rejected.

3.Try pushing a file within the limit – it should succeed.

Edited by Emma Park

Merge request reports

Loading