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
c7e385e2
Commit
c7e385e2
authored
Feb 19, 2020
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
cd3e2c7b
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
81 additions
and
24 deletions
+81
-24
.rubocop.yml
.rubocop.yml
+2
-0
app/assets/javascripts/blob/balsamiq/balsamiq_viewer.js
app/assets/javascripts/blob/balsamiq/balsamiq_viewer.js
+1
-1
app/assets/javascripts/pages/projects/registry/repositories/index.js
...javascripts/pages/projects/registry/repositories/index.js
+7
-3
app/models/snippet.rb
app/models/snippet.rb
+0
-1
app/views/groups/registry/repositories/index.html.haml
app/views/groups/registry/repositories/index.html.haml
+1
-1
app/views/projects/registry/repositories/index.html.haml
app/views/projects/registry/repositories/index.html.haml
+1
-1
changelogs/unreleased/lodash_blob.yml
changelogs/unreleased/lodash_blob.yml
+5
-0
config/initializers/lograge.rb
config/initializers/lograge.rb
+1
-1
doc/development/integrations/jira_connect.md
doc/development/integrations/jira_connect.md
+0
-2
lib/gitlab/ci/config/entry/job.rb
lib/gitlab/ci/config/entry/job.rb
+2
-1
lib/gitlab/grape_logging/formatters/lograge_with_timestamp.rb
...gitlab/grape_logging/formatters/lograge_with_timestamp.rb
+2
-1
lib/gitlab/utils/log_limited_array.rb
lib/gitlab/utils/log_limited_array.rb
+4
-4
lib/tasks/gitlab/graphql.rake
lib/tasks/gitlab/graphql.rake
+12
-1
spec/initializers/lograge_spec.rb
spec/initializers/lograge_spec.rb
+1
-1
spec/lib/gitlab/ci/yaml_processor_spec.rb
spec/lib/gitlab/ci/yaml_processor_spec.rb
+22
-0
spec/lib/gitlab/utils/log_limited_array_spec.rb
spec/lib/gitlab/utils/log_limited_array_spec.rb
+18
-4
spec/requests/groups/milestones_controller_spec.rb
spec/requests/groups/milestones_controller_spec.rb
+1
-1
spec/requests/groups/registry/repositories_controller_spec.rb
.../requests/groups/registry/repositories_controller_spec.rb
+1
-1
No files found.
.rubocop.yml
View file @
c7e385e2
...
...
@@ -345,6 +345,8 @@ RSpec/HaveGitlabHttpStatus:
-
'
ee/spec/controllers/**/*'
-
'
spec/requests/*.rb'
-
'
ee/spec/requests/*.rb'
-
'
spec/requests/{groups,projects,repositories}/**/*'
-
'
ee/spec/requests/{groups,projects,repositories}/**/*'
-
'
spec/requests/api/*/**/*.rb'
-
'
ee/spec/requests/api/*/**/*.rb'
...
...
app/assets/javascripts/blob/balsamiq/balsamiq_viewer.js
View file @
c7e385e2
import
sqljs
from
'
sql.js
'
;
import
{
template
as
_template
}
from
'
underscore
'
;
import
{
template
as
_template
}
from
'
lodash
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
{
successCodes
}
from
'
~/lib/utils/http_status
'
;
...
...
app/assets/javascripts/pages/projects/registry/repositories/index.js
View file @
c7e385e2
...
...
@@ -3,7 +3,11 @@ import registryExplorer from '~/registry/explorer/index';
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
initRegistryImages
();
const
{
attachMainComponent
,
attachBreadcrumb
}
=
registryExplorer
();
attachBreadcrumb
();
attachMainComponent
();
const
explorer
=
registryExplorer
();
if
(
explorer
)
{
explorer
.
attachBreadcrumb
();
explorer
.
attachMainComponent
();
}
});
app/models/snippet.rb
View file @
c7e385e2
...
...
@@ -17,7 +17,6 @@ class Snippet < ApplicationRecord
include
HasRepository
extend
::
Gitlab
::
Utils
::
Override
ignore_column
:storage_version
,
remove_with:
'12.9'
,
remove_after:
'2020-03-22'
ignore_column
:repository_storage
,
remove_with:
'12.10'
,
remove_after:
'2020-04-22'
cache_markdown_field
:title
,
pipeline: :single_line
...
...
app/views/groups/registry/repositories/index.html.haml
View file @
c7e385e2
...
...
@@ -4,7 +4,7 @@
%section
.row.registry-placeholder.prepend-bottom-10
.col-12
-
if
Feature
.
enabled?
(
:vue_container_registry_explorer
)
-
if
Feature
.
enabled?
(
:vue_container_registry_explorer
,
@group
)
#js-container-registry
{
data:
{
endpoint:
group_container_registries_path
(
@group
),
"help_page_path"
=>
help_page_path
(
'user/packages/container_registry/index'
),
"two_factor_auth_help_link"
=>
help_page_path
(
'user/profile/account/two_factor_authentication'
),
...
...
app/views/projects/registry/repositories/index.html.haml
View file @
c7e385e2
...
...
@@ -4,7 +4,7 @@
%section
.row.registry-placeholder.prepend-bottom-10
.col-12
-
if
Feature
.
enabled?
(
:vue_container_registry_explorer
)
-
if
Feature
.
enabled?
(
:vue_container_registry_explorer
,
@project
)
#js-container-registry
{
data:
{
endpoint:
project_container_registry_index_path
(
@project
),
project_path:
@project
.
full_path
,
"help_page_path"
=>
help_page_path
(
'user/packages/container_registry/index'
),
...
...
changelogs/unreleased/lodash_blob.yml
0 → 100644
View file @
c7e385e2
---
title
:
Replace underscore with lodash in /app/assets/javascripts/blob/
merge_request
:
25113
author
:
rkpattnaik780
type
:
changed
config/initializers/lograge.rb
View file @
c7e385e2
...
...
@@ -28,7 +28,7 @@ unless Gitlab::Runtime.sidekiq?
payload
=
{
time:
Time
.
now
.
utc
.
iso8601
(
3
),
params:
Gitlab
::
Utils
::
LogLimitedArray
.
log_limited_array
(
params
),
params:
Gitlab
::
Utils
::
LogLimitedArray
.
log_limited_array
(
params
,
sentinel:
{
key:
'truncated'
,
value:
'...'
}
),
remote_ip:
event
.
payload
[
:remote_ip
],
user_id:
event
.
payload
[
:user_id
],
username:
event
.
payload
[
:username
],
...
...
doc/development/integrations/jira_connect.md
View file @
c7e385e2
...
...
@@ -15,8 +15,6 @@ The following are required to install and test the app:
or
[
ngrok
](
https://ngrok.com
)
. These also take care of SSL for you because Jira
requires all connections to the app host to be over SSL.
> This feature is currently behind the `:jira_connect_app` feature flag
## Installing the app in Jira
1.
Enable Jira development mode to install apps that are not from the Atlassian Marketplace
...
...
lib/gitlab/ci/config/entry/job.rb
View file @
c7e385e2
...
...
@@ -165,7 +165,7 @@ module Gitlab
helpers
:before_script
,
:script
,
:stage
,
:type
,
:after_script
,
:cache
,
:image
,
:services
,
:only
,
:except
,
:variables
,
:artifacts
,
:environment
,
:coverage
,
:retry
,
:rules
,
:parallel
,
:needs
,
:interruptible
,
:release
:parallel
,
:needs
,
:interruptible
,
:release
,
:tags
attributes
:script
,
:tags
,
:allow_failure
,
:when
,
:dependencies
,
:needs
,
:retry
,
:parallel
,
:extends
,
:start_in
,
:rules
,
...
...
@@ -242,6 +242,7 @@ module Gitlab
services:
services_value
,
stage:
stage_value
,
cache:
cache_value
,
tags:
tags_value
,
only:
only_value
,
except:
except_value
,
rules:
has_rules?
?
rules_value
:
nil
,
...
...
lib/gitlab/grape_logging/formatters/lograge_with_timestamp.rb
View file @
c7e385e2
...
...
@@ -30,7 +30,8 @@ module Gitlab
.
each_pair
.
map
{
|
k
,
v
|
{
key:
k
,
value:
utf8_encode_values
(
v
)
}
}
Gitlab
::
Utils
::
LogLimitedArray
.
log_limited_array
(
params_array
)
Gitlab
::
Utils
::
LogLimitedArray
.
log_limited_array
(
params_array
,
sentinel:
{
key:
'truncated'
,
value:
'...'
})
end
def
utf8_encode_values
(
data
)
...
...
lib/gitlab/utils/log_limited_array.rb
View file @
c7e385e2
...
...
@@ -6,9 +6,9 @@ module Gitlab
MAXIMUM_ARRAY_LENGTH
=
10
.
kilobytes
# Prepare an array for logging by limiting its JSON representation
# to around 10 kilobytes. Once we hit the limit, add
"..." as the
# last item in the returned array.
def
self
.
log_limited_array
(
array
)
# to around 10 kilobytes. Once we hit the limit, add
the sentinel
#
value as the
last item in the returned array.
def
self
.
log_limited_array
(
array
,
sentinel:
'...'
)
return
[]
unless
array
.
is_a?
(
Array
)
total_length
=
0
...
...
@@ -18,7 +18,7 @@ module Gitlab
total_length
<=
MAXIMUM_ARRAY_LENGTH
end
limited_array
.
push
(
'...'
)
if
total_length
>
MAXIMUM_ARRAY_LENGTH
limited_array
.
push
(
sentinel
)
if
total_length
>
MAXIMUM_ARRAY_LENGTH
limited_array
end
...
...
lib/tasks/gitlab/graphql.rake
View file @
c7e385e2
...
...
@@ -8,13 +8,24 @@ namespace :gitlab do
OUTPUT_DIR
=
Rails
.
root
.
join
(
"doc/api/graphql/reference"
)
TEMPLATES_DIR
=
'lib/gitlab/graphql/docs/templates/'
# Consider all feature flags disabled
# to avoid pipeline failures in case developer
# dumps schema with flags enabled locally before pushing
task
disable_feature_flags: :environment
do
class
Feature
def
self
.
enabled?
(
*
args
)
false
end
end
end
# Defines tasks for dumping the GraphQL schema:
# - gitlab:graphql:schema:dump
# - gitlab:graphql:schema:idl
# - gitlab:graphql:schema:json
GraphQL
::
RakeTask
.
new
(
schema_name:
'GitlabSchema'
,
dependencies:
[
:environment
],
dependencies:
[
:environment
,
:disable_feature_flags
],
directory:
OUTPUT_DIR
,
idl_outfile:
"gitlab_schema.graphql"
,
json_outfile:
"gitlab_schema.json"
...
...
spec/initializers/lograge_spec.rb
View file @
c7e385e2
...
...
@@ -17,7 +17,7 @@ describe 'lograge', type: :request do
end
let
(
:limited_params
)
do
large_params
.
slice
(
:a
,
:b
).
map
{
|
k
,
v
|
{
key:
k
.
to_s
,
value:
v
}
}
+
[
'...'
]
large_params
.
slice
(
:a
,
:b
).
map
{
|
k
,
v
|
{
key:
k
.
to_s
,
value:
v
}
}
+
[
{
key:
'truncated'
,
value:
'...'
}
]
end
context
'for API requests'
do
...
...
spec/lib/gitlab/ci/yaml_processor_spec.rb
View file @
c7e385e2
...
...
@@ -87,6 +87,28 @@ module Gitlab
end
end
describe
'tags entry with default values'
do
it
'applies default values'
do
config
=
YAML
.
dump
({
default:
{
tags:
%w[A B]
},
rspec:
{
script:
"rspec"
}
})
config_processor
=
Gitlab
::
Ci
::
YamlProcessor
.
new
(
config
)
expect
(
config_processor
.
stage_builds_attributes
(
"test"
).
size
).
to
eq
(
1
)
expect
(
config_processor
.
stage_builds_attributes
(
"test"
).
first
).
to
eq
({
stage:
"test"
,
stage_idx:
2
,
name:
"rspec"
,
only:
{
refs:
%w[branches tags]
},
options:
{
script:
[
"rspec"
]
},
tag_list:
%w[A B]
,
allow_failure:
false
,
when:
"on_success"
,
yaml_variables:
[]
})
end
end
describe
'interruptible entry'
do
describe
'interruptible job'
do
let
(
:config
)
do
...
...
spec/lib/gitlab/utils/log_limited_array_spec.rb
View file @
c7e385e2
...
...
@@ -18,12 +18,26 @@ describe Gitlab::Utils::LogLimitedArray do
end
context
'when the array exceeds the limit'
do
it
'replaces arguments after the limit with an ellipsis string'
do
let
(
:long_array
)
do
half_limit
=
described_class
::
MAXIMUM_ARRAY_LENGTH
/
2
long_array
=
[
'a'
*
half_limit
,
'b'
*
half_limit
,
'c'
]
expect
(
described_class
.
log_limited_array
(
long_array
))
.
to
eq
(
long_array
.
take
(
1
)
+
[
'...'
])
[
'a'
*
half_limit
,
'b'
*
half_limit
,
'c'
]
end
context
'when no sentinel value is passed'
do
it
'replaces arguments after the limit with an ellipsis string'
do
expect
(
described_class
.
log_limited_array
(
long_array
))
.
to
eq
(
long_array
.
take
(
1
)
+
[
'...'
])
end
end
context
'when a sentinel value is passed'
do
it
'replaces arguments after the limit with the sentinel'
do
sentinel
=
{
truncated:
true
}
expect
(
described_class
.
log_limited_array
(
long_array
,
sentinel:
sentinel
))
.
to
eq
(
long_array
.
take
(
1
)
+
[
sentinel
])
end
end
end
...
...
spec/requests/groups/milestones_controller_spec.rb
View file @
c7e385e2
...
...
@@ -24,7 +24,7 @@ describe Groups::MilestonesController do
end
expect
{
get
"/groups/
#{
public_group
.
to_param
}
/-/milestones.json"
}.
not_to
exceed_all_query_limit
(
control_count
)
expect
(
response
).
to
have_
http_status
(
200
)
expect
(
response
).
to
have_
gitlab_http_status
(
:ok
)
milestones
=
json_response
expect
(
milestones
.
count
).
to
eq
(
3
)
...
...
spec/requests/groups/registry/repositories_controller_spec.rb
View file @
c7e385e2
...
...
@@ -28,7 +28,7 @@ describe Groups::Registry::RepositoriesController do
expect
{
get
(
endpoint
)
}.
not_to
exceed_all_query_limit
(
control_count
)
# sanity check that response is 200
expect
(
response
).
to
have_
http_status
(
200
)
expect
(
response
).
to
have_
gitlab_http_status
(
:ok
)
repositories
=
json_response
expect
(
repositories
.
count
).
to
eq
(
5
)
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