Resolve "ActionView::Template::Error: undefined method `gsub' for #<Array:0x00007f1af5351c88>"
requested to merge 356397-actionview-template-error-undefined-method-gsub-for-array-0x00007f1af5351c88 into master
Why
Notebooks can have an edgecases where png outputs are multiline. Upgrades ipynbdiff gem to 0.4.6
Diff for the update (note we can't use gitlab UI to display this diff because of the bug this MR fixes)
How to test
-
Create a repository and add the offending file:
mkdir error_notebook cd error_notebook curl https://gitlab.com/gitlab-org/gitlab/uploads/f1920fb37e2410ac2ef8b37718c14699/array-png.ipynb -o array-png.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
-
Enable the feature flags
Feature.enable(:ipynb_semantic_diff) Feature.enable(:rendered_diffs_viewer)
-
Restart GDK and open the commit
-
Without the changes, opening the commit will cause gitlab to 500
Edited by Eduardo Bonet