Check for default_max_patch_size changes
What does this MR do?
If the value is updated by an admin, we may want to display the highlighted lines on a page, but will be unable to deliver them as the cached version might have been set as empty ([]) when the file PREVIOUSLY was considered "too large". When one of these situations is detected - the file is unreadable from the cache, and would've violated the default value but NOT violate the current value, go ahead and manually update the cache with it.
We spotted this problem when increasing the diff_max_patch_bytes
(gitlab-com/gl-infra/production#2761 (closed)) from 100kb to 200kb. Any file that fell into the donut hole of > 100kb && < 200kb
would tell the front end that is was uncollapsed, but would NOT include any highlighted line data from the cache, since what was in the cache was simply and empty array ([]
)
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team