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
82d4eee1
Commit
82d4eee1
authored
Jul 30, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
6f471c29
ee5c4229
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
28 deletions
+9
-28
app/views/projects/ci/builds/_build.html.haml
app/views/projects/ci/builds/_build.html.haml
+7
-7
app/views/projects/jobs/_table.html.haml
app/views/projects/jobs/_table.html.haml
+1
-1
config/feature_flags/development/one_megabyte_file_size_limit.yml
...eature_flags/development/one_megabyte_file_size_limit.yml
+0
-8
lib/gitlab/highlight.rb
lib/gitlab/highlight.rb
+1
-5
spec/lib/gitlab/highlight_spec.rb
spec/lib/gitlab/highlight_spec.rb
+0
-7
No files found.
app/views/projects/ci/builds/_build.html.haml
View file @
82d4eee1
...
...
@@ -12,12 +12,15 @@
%td
.status
=
render
"ci/status/badge"
,
status:
job
.
detailed_status
(
current_user
),
title:
job
.
status_title
%td
.branch-commit.cgray
%td
-
if
can?
(
current_user
,
:read_build
,
job
)
=
link_to
project_job_path
(
job
.
project
,
job
)
do
%span
.build-link
##{job.id}
=
link_to
job
.
name
,
project_job_path
(
job
.
project
,
job
),
class:
'gl-text-blue-600!'
-
else
%span
.build-link
##{job.id}
%span
.gl-text-blue-600
!
=
job
.
name
%td
.branch-commit.gl-text-gray-900
%span
.build-link
##{job.id}
-
if
ref
-
if
job
.
ref
...
...
@@ -78,9 +81,6 @@
%td
=
job
.
stage
%td
=
job
.
name
%td
-
if
job
.
duration
%p
.duration
...
...
app/views/projects/jobs/_table.html.haml
View file @
82d4eee1
...
...
@@ -21,13 +21,13 @@
%thead
%tr
%th
Status
%th
Name
%th
Job
%th
Pipeline
-
if
admin
%th
Project
%th
Runner
%th
Stage
%th
Name
%th
Duration
%th
Coverage
%th
...
...
config/feature_flags/development/one_megabyte_file_size_limit.yml
deleted
100644 → 0
View file @
6f471c29
---
name
:
one_megabyte_file_size_limit
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/65167
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/334916
milestone
:
'
14.1'
type
:
development
group
:
group::code review
default_enabled
:
false
lib/gitlab/highlight.rb
View file @
82d4eee1
...
...
@@ -50,11 +50,7 @@ module Gitlab
attr_reader
:context
def
self
.
file_size_limit
if
Feature
.
enabled?
(
:one_megabyte_file_size_limit
)
1024
.
kilobytes
else
Gitlab
.
config
.
extra
[
'maximum_text_highlight_size_kilobytes'
]
end
Gitlab
.
config
.
extra
[
'maximum_text_highlight_size_kilobytes'
]
end
private_class_method
:file_size_limit
...
...
spec/lib/gitlab/highlight_spec.rb
View file @
82d4eee1
...
...
@@ -50,16 +50,9 @@ RSpec.describe Gitlab::Highlight do
let
(
:result
)
{
described_class
.
highlight
(
file_name
,
content
)
}
# content is 44 bytes
before
do
stub_feature_flags
(
one_megabyte_file_size_limit:
false
)
stub_config
(
extra:
{
'maximum_text_highlight_size_kilobytes'
=>
0.0001
}
)
# 1.024 bytes
end
it
'confirm file size is 1MB when `one_megabyte_file_size_limit` is enabled'
do
stub_feature_flags
(
one_megabyte_file_size_limit:
true
)
expect
(
described_class
.
too_large?
(
1024
.
kilobytes
)).
to
eq
(
false
)
expect
(
described_class
.
too_large?
(
1025
.
kilobytes
)).
to
eq
(
true
)
end
it
'increments the metric for oversized files'
do
expect
{
result
}.
to
change
{
over_highlight_size_limit
(
'file size: 0.0001'
)
}.
by
(
1
)
end
...
...
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