Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ad40fc17
Commit
ad40fc17
authored
Nov 09, 2021
by
Eduardo Bonet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning up logs for flag jupyter_clean_diffs
parent
dd2554bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
10 deletions
+4
-10
app/presenters/blob_presenter.rb
app/presenters/blob_presenter.rb
+3
-7
lib/gitlab/diff/file.rb
lib/gitlab/diff/file.rb
+1
-3
No files found.
app/presenters/blob_presenter.rb
View file @
ad40fc17
...
...
@@ -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
...
...
lib/gitlab/diff/file.rb
View file @
ad40fc17
...
...
@@ -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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment