Commit ad40fc17 authored by Eduardo Bonet's avatar Eduardo Bonet

Cleaning up logs for flag jupyter_clean_diffs

parent dd2554bc
......@@ -126,13 +126,9 @@ class BlobPresenter < Gitlab::View::Presenter::Delegated
def transformed_blob_data
@transformed_blob ||= if blob.path.ends_with?('.ipynb')
new_blob = IpynbDiff.transform(blob.data,
raise_errors: true,
options: { include_metadata: false, cell_decorator: :percent })
Gitlab::AppLogger.info(new_blob ? 'IPYNBDIFF_BLOB_GENERATED' : 'IPYNBDIFF_BLOB_NIL')
new_blob
IpynbDiff.transform(blob.data,
raise_errors: true,
options: { include_metadata: false, cell_decorator: :percent })
end
@transformed_blob ||= blob.data
......
......@@ -463,9 +463,7 @@ module Gitlab
diff.diff = new_diff.scan(/.*\n/)[2..-1].join('') if new_diff
Gitlab::AppLogger.info({ message: new_diff ? 'IPYNB_DIFF_GENERATED' : 'IPYNB_DIFF_NIL',
from: from&.to_s, to: to&.to_s,
lib_version: Gem.loaded_specs["ipynbdiff"].version.version })
Gitlab::AppLogger.info({ message: new_diff ? 'IPYNB_DIFF_GENERATED' : 'IPYNB_DIFF_NIL' })
rescue IpynbDiff::InvalidNotebookError => e
Gitlab::ErrorTracking.track_exception(e, issue_url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/344676')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment