Skip to content

Increase maximum diff size for notebook files on Commit Page

What does this MR do and why?

We introduce semantic diffs for jupyter notebooks, but a large portion of diffs cannot benefit from this since notebooks are large files that easily pass diff size limit. This MR adds a larger limit exclusively to notebooks, only on Commit page for now.

The option to increase size limit was added in gitaly!4703 (merged)

Changes are wrapped by :large_ipynb_diffs

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Get this commit gitlab-org/incubation-engineering/mlops/ipynb-test-projects/diff-sample@861652cb

  2. Without the feature flag on, it will display the the diff is too long

  3. Enable the feature flag

    Feature.enable(:large_ipynb_diffs)
  4. Reopen the commit. Now it is possible to click in 'expand' and see the whole diff rendered (loading takes a while)

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 #17698

Edited by Eduardo Bonet

Merge request reports