Add timeout to Jupyter Diff rendering
requested to merge 354866-add-timeout-to-jupyter-diff-transformation-and-don-t-render-large-files into master
Why
Version 0.4.4 of rb-ipynbdiff introduced a few performance degradations that are causing issues to customers (gitlab-org/incubation-engineering/mlops/rb-ipynbdiff#9 (closed)), and we need to block these from happening in the future
What
Adds a timeout to semantic notebook diffs, defaulting to raw diffs instead.
How to test
-
Create a repository and add the offending file:
mkdir outage_notebook cd outage_notebook curl https://gitlab.com/gitlab-org/incubation-engineering/mlops/rb-ipynbdiff/uploads/9c1f006ed70185d2029bc3d00b03574f/iterate.ipynb -o iterate.ipynb git init -b main git add -A git commit -am "Adding offending notebook" git remote add origin <your local repository> git push --upstream origin main
-
Without the changes, opening the commit will cause gitlab to hang
-
For non-offending notebooks (http://gdk.test:3000/gitlab-org/gitlab-test/-/commit/5d6ed1503801ca9dc28e95eeb85a7cf863527aee), displays the semantic diff:
Related to #354866 (closed)
Edited by Eduardo Bonet