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
22aeff30
Commit
22aeff30
authored
Feb 14, 2018
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-02-14
parents
1b02dec0
91002b12
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
67 additions
and
85 deletions
+67
-85
app/assets/javascripts/profile/profile.js
app/assets/javascripts/profile/profile.js
+0
-18
app/assets/javascripts/settings_panels.js
app/assets/javascripts/settings_panels.js
+1
-1
app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue
...avascripts/sidebar/components/lock/lock_issue_sidebar.vue
+1
-1
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+9
-2
app/models/network/graph.rb
app/models/network/graph.rb
+2
-5
app/services/delete_merged_branches_service.rb
app/services/delete_merged_branches_service.rb
+7
-11
changelogs/unreleased/43198-fix-settings-panel-expanding-when-fragment-hash-linked.yml
...ix-settings-panel-expanding-when-fragment-hash-linked.yml
+5
-0
changelogs/unreleased/remove_ldap_person_validation.yml
changelogs/unreleased/remove_ldap_person_validation.yml
+5
-0
doc/development/query_count_limits.md
doc/development/query_count_limits.md
+2
-3
doc/development/sidekiq_style_guide.md
doc/development/sidekiq_style_guide.md
+3
-0
lib/gitlab/ldap/person.rb
lib/gitlab/ldap/person.rb
+0
-15
lib/gitlab/query_limiting/transaction.rb
lib/gitlab/query_limiting/transaction.rb
+1
-7
spec/javascripts/settings_panels_spec.js
spec/javascripts/settings_panels_spec.js
+29
-0
spec/lib/gitlab/ldap/person_spec.rb
spec/lib/gitlab/ldap/person_spec.rb
+0
-9
spec/lib/gitlab/query_limiting/transaction_spec.rb
spec/lib/gitlab/query_limiting/transaction_spec.rb
+0
-12
vendor/ingress/values.yaml
vendor/ingress/values.yaml
+2
-1
No files found.
app/assets/javascripts/profile/profile.js
View file @
22aeff30
...
@@ -33,9 +33,6 @@ import flash from '../flash';
...
@@ -33,9 +33,6 @@ import flash from '../flash';
$
(
'
input[name="user[multi_file]"]
'
).
on
(
'
change
'
,
this
.
setNewRepoCookie
);
$
(
'
input[name="user[multi_file]"]
'
).
on
(
'
change
'
,
this
.
setNewRepoCookie
);
$
(
'
#user_notification_email
'
).
on
(
'
change
'
,
this
.
submitForm
);
$
(
'
#user_notification_email
'
).
on
(
'
change
'
,
this
.
submitForm
);
$
(
'
#user_notified_of_own_activity
'
).
on
(
'
change
'
,
this
.
submitForm
);
$
(
'
#user_notified_of_own_activity
'
).
on
(
'
change
'
,
this
.
submitForm
);
$
(
'
.update-username
'
).
on
(
'
ajax:before
'
,
this
.
beforeUpdateUsername
);
$
(
'
.update-username
'
).
on
(
'
ajax:complete
'
,
this
.
afterUpdateUsername
);
$
(
'
.update-notifications
'
).
on
(
'
ajax:success
'
,
this
.
onUpdateNotifs
);
this
.
form
.
on
(
'
submit
'
,
this
.
onSubmitForm
);
this
.
form
.
on
(
'
submit
'
,
this
.
onSubmitForm
);
}
}
...
@@ -48,21 +45,6 @@ import flash from '../flash';
...
@@ -48,21 +45,6 @@ import flash from '../flash';
return
this
.
saveForm
();
return
this
.
saveForm
();
}
}
beforeUpdateUsername
()
{
$
(
'
.loading-username
'
,
this
).
removeClass
(
'
hidden
'
);
}
afterUpdateUsername
()
{
$
(
'
.loading-username
'
,
this
).
addClass
(
'
hidden
'
);
$
(
'
button[type=submit]
'
,
this
).
enable
();
}
onUpdateNotifs
(
e
,
data
)
{
return
data
.
saved
?
flash
(
__
(
'
Notification settings saved
'
),
'
notice
'
)
:
flash
(
__
(
'
Failed to save new settings
'
));
}
saveForm
()
{
saveForm
()
{
const
self
=
this
;
const
self
=
this
;
const
formData
=
new
FormData
(
this
.
form
[
0
]);
const
formData
=
new
FormData
(
this
.
form
[
0
]);
...
...
app/assets/javascripts/settings_panels.js
View file @
22aeff30
...
@@ -42,7 +42,7 @@ export default function initSettingsPanels() {
...
@@ -42,7 +42,7 @@ export default function initSettingsPanels() {
if
(
location
.
hash
)
{
if
(
location
.
hash
)
{
const
$target
=
$
(
location
.
hash
);
const
$target
=
$
(
location
.
hash
);
if
(
$target
.
length
&&
$target
.
hasClass
(
'
.
settings
'
))
{
if
(
$target
.
length
&&
$target
.
hasClass
(
'
settings
'
))
{
expandSection
(
$target
);
expandSection
(
$target
);
}
}
}
}
...
...
app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue
View file @
22aeff30
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
{{
sprintf
(
__
(
'
Lock %{issuableDisplayName
}
'
),
{
issuableDisplayName
:
issuableDisplayName
}
)
}}
{{
sprintf
(
__
(
'
Lock %{issuableDisplayName
}
'
),
{
issuableDisplayName
:
issuableDisplayName
}
)
}}
<
button
<
button
v
-
if
=
"
isEditable
"
v
-
if
=
"
isEditable
"
class
=
"
pull-right lock-edit
btn btn-blank
"
class
=
"
pull-right lock-edit
"
type
=
"
button
"
type
=
"
button
"
@
click
.
prevent
=
"
toggleForm
"
@
click
.
prevent
=
"
toggleForm
"
>
>
...
...
app/assets/stylesheets/pages/issuable.scss
View file @
22aeff30
...
@@ -197,11 +197,18 @@
...
@@ -197,11 +197,18 @@
margin-left
:
0
;
margin-left
:
0
;
}
}
a
.edit-link
:not
([
href
])
:hover
{
color
:
rgba
(
$avatar-border
,
.2
);
}
.lock-edit
,
//
uses
same
style
,
different
js
behaviour
.edit-link
{
.edit-link
{
@extend
.btn-blank
;
color
:
$gl-text-color
;
color
:
$gl-text-color
;
&
:not
([
href
])
:hover
{
&
:hover
{
color
:
rgba
(
$avatar-border
,
.2
);
text-decoration
:
underline
;
color
:
$md-link-color
;
}
}
}
}
}
}
...
...
app/models/network/graph.rb
View file @
22aeff30
...
@@ -61,11 +61,8 @@ module Network
...
@@ -61,11 +61,8 @@ module Network
@reserved
[
i
]
=
[]
@reserved
[
i
]
=
[]
end
end
# n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/37436
commits_sort_by_ref
.
each
do
|
commit
|
Gitlab
::
GitalyClient
.
allow_n_plus_1_calls
do
place_chain
(
commit
)
commits_sort_by_ref
.
each
do
|
commit
|
place_chain
(
commit
)
end
end
end
# find parent spaces for not overlap lines
# find parent spaces for not overlap lines
...
...
app/services/delete_merged_branches_service.rb
View file @
22aeff30
...
@@ -6,18 +6,14 @@ class DeleteMergedBranchesService < BaseService
...
@@ -6,18 +6,14 @@ class DeleteMergedBranchesService < BaseService
def
execute
def
execute
raise
Gitlab
::
Access
::
AccessDeniedError
unless
can?
(
current_user
,
:push_code
,
project
)
raise
Gitlab
::
Access
::
AccessDeniedError
unless
can?
(
current_user
,
:push_code
,
project
)
# n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/37438
branches
=
project
.
repository
.
merged_branch_names
Gitlab
::
GitalyClient
.
allow_n_plus_1_calls
do
# Prevent deletion of branches relevant to open merge requests
branches
=
project
.
repository
.
branch_names
branches
-=
merge_request_branch_names
branches
=
branches
.
select
{
|
branch
|
project
.
repository
.
merged_to_root_ref?
(
branch
)
}
# Prevent deletion of protected branches
# Prevent deletion of branches relevant to open merge requests
branches
=
branches
.
reject
{
|
branch
|
ProtectedBranch
.
protected?
(
project
,
branch
)
}
branches
-=
merge_request_branch_names
# Prevent deletion of protected branches
branches
=
branches
.
reject
{
|
branch
|
ProtectedBranch
.
protected?
(
project
,
branch
)
}
branches
.
each
do
|
branch
|
branches
.
each
do
|
branch
|
DeleteBranchService
.
new
(
project
,
current_user
).
execute
(
branch
)
DeleteBranchService
.
new
(
project
,
current_user
).
execute
(
branch
)
end
end
end
end
end
...
...
changelogs/unreleased/43198-fix-settings-panel-expanding-when-fragment-hash-linked.yml
0 → 100644
View file @
22aeff30
---
title
:
Fix settings panels not expanding when fragment hash linked
merge_request
:
17074
author
:
type
:
fixed
changelogs/unreleased/remove_ldap_person_validation.yml
0 → 100644
View file @
22aeff30
---
title
:
LDAP Person no longer throws exception on invalid entry
merge_request
:
author
:
type
:
fixed
doc/development/query_count_limits.md
View file @
22aeff30
# Query Count Limits
# Query Count Limits
Each controller or API endpoint is allowed to execute up to 100 SQL queries. In
Each controller or API endpoint is allowed to execute up to 100 SQL queries and
a production environment we'll only log an error in case this threshold is
in test environments we'll raise an error when this threshold is exceeded.
exceeded, but in a test environment we'll raise an error instead.
## Solving Failing Tests
## Solving Failing Tests
...
...
doc/development/sidekiq_style_guide.md
View file @
22aeff30
...
@@ -17,6 +17,9 @@ would be `process_something`. If you're not sure what queue a worker uses,
...
@@ -17,6 +17,9 @@ would be `process_something`. If you're not sure what queue a worker uses,
you can find it using
`SomeWorker.queue`
. There is almost never a reason to
you can find it using
`SomeWorker.queue`
. There is almost never a reason to
manually override the queue name using
`sidekiq_options queue: :some_queue`
.
manually override the queue name using
`sidekiq_options queue: :some_queue`
.
You must always add any new queues to
`app/workers/all_queues.yml`
otherwise
your worker will not run.
## Queue Namespaces
## Queue Namespaces
While different workers cannot share a queue, they can share a queue namespace.
While different workers cannot share a queue, they can share a queue namespace.
...
...
lib/gitlab/ldap/person.rb
View file @
22aeff30
...
@@ -67,8 +67,6 @@ module Gitlab
...
@@ -67,8 +67,6 @@ module Gitlab
Rails
.
logger
.
debug
{
"Instantiating
#{
self
.
class
.
name
}
with LDIF:
\n
#{
entry
.
to_ldif
}
"
}
Rails
.
logger
.
debug
{
"Instantiating
#{
self
.
class
.
name
}
with LDIF:
\n
#{
entry
.
to_ldif
}
"
}
@entry
=
entry
@entry
=
entry
@provider
=
provider
@provider
=
provider
validate_entry
end
end
def
name
def
name
...
@@ -121,19 +119,6 @@ module Gitlab
...
@@ -121,19 +119,6 @@ module Gitlab
entry
.
public_send
(
selected_attr
)
# rubocop:disable GitlabSecurity/PublicSend
entry
.
public_send
(
selected_attr
)
# rubocop:disable GitlabSecurity/PublicSend
end
end
def
validate_entry
allowed_attrs
=
self
.
class
.
ldap_attributes
(
config
).
map
(
&
:downcase
)
# Net::LDAP::Entry transforms keys to symbols. Change to strings to compare.
entry_attrs
=
entry
.
attribute_names
.
map
{
|
n
|
n
.
to_s
.
downcase
}
invalid_attrs
=
entry_attrs
-
allowed_attrs
if
invalid_attrs
.
any?
raise
InvalidEntryError
,
"
#{
self
.
class
.
name
}
initialized with Net::LDAP::Entry containing invalid attributes(s):
#{
invalid_attrs
}
"
end
end
end
end
end
end
end
end
lib/gitlab/query_limiting/transaction.rb
View file @
22aeff30
...
@@ -51,13 +51,7 @@ module Gitlab
...
@@ -51,13 +51,7 @@ module Gitlab
error
=
ThresholdExceededError
.
new
(
error_message
)
error
=
ThresholdExceededError
.
new
(
error_message
)
if
raise_error?
raise
(
error
)
if
raise_error?
raise
(
error
)
else
# Raven automatically logs to the Rails log if disabled, thus we don't
# need to manually log anything in case Sentry support is not enabled.
Raven
.
capture_exception
(
error
)
end
end
end
def
increment
def
increment
...
...
spec/javascripts/settings_panels_spec.js
0 → 100644
View file @
22aeff30
import
initSettingsPanels
from
'
~/settings_panels
'
;
describe
(
'
Settings Panels
'
,
()
=>
{
preloadFixtures
(
'
projects/ci_cd_settings.html.raw
'
);
beforeEach
(()
=>
{
loadFixtures
(
'
projects/ci_cd_settings.html.raw
'
);
});
describe
(
'
initSettingsPane
'
,
()
=>
{
afterEach
(()
=>
{
location
.
hash
=
''
;
});
it
(
'
should expand linked hash fragment panel
'
,
()
=>
{
location
.
hash
=
'
#js-general-pipeline-settings
'
;
const
pipelineSettingsPanel
=
document
.
querySelector
(
'
#js-general-pipeline-settings
'
);
// Our test environment automatically expands everything so we need to clear that out first
pipelineSettingsPanel
.
classList
.
remove
(
'
expanded
'
);
expect
(
pipelineSettingsPanel
.
classList
.
contains
(
'
expanded
'
)).
toBe
(
false
);
initSettingsPanels
();
expect
(
pipelineSettingsPanel
.
classList
.
contains
(
'
expanded
'
)).
toBe
(
true
);
});
});
});
spec/lib/gitlab/ldap/person_spec.rb
View file @
22aeff30
...
@@ -66,15 +66,6 @@ describe Gitlab::LDAP::Person do
...
@@ -66,15 +66,6 @@ describe Gitlab::LDAP::Person do
end
end
end
end
describe
'.validate_entry'
do
it
'raises InvalidEntryError'
do
entry
[
'foo'
]
=
'bar'
expect
{
described_class
.
new
(
entry
,
'ldapmain'
)
}
.
to
raise_error
(
Gitlab
::
LDAP
::
Person
::
InvalidEntryError
)
end
end
describe
'#name'
do
describe
'#name'
do
it
'uses the configured name attribute and handles values as an array'
do
it
'uses the configured name attribute and handles values as an array'
do
name
=
'John Doe'
name
=
'John Doe'
...
...
spec/lib/gitlab/query_limiting/transaction_spec.rb
View file @
22aeff30
...
@@ -59,18 +59,6 @@ describe Gitlab::QueryLimiting::Transaction do
...
@@ -59,18 +59,6 @@ describe Gitlab::QueryLimiting::Transaction do
expect
{
transaction
.
act_upon_results
}
expect
{
transaction
.
act_upon_results
}
.
to
raise_error
(
described_class
::
ThresholdExceededError
)
.
to
raise_error
(
described_class
::
ThresholdExceededError
)
end
end
it
'reports the error in Sentry if raising an error is disabled'
do
expect
(
transaction
)
.
to
receive
(
:raise_error?
)
.
and_return
(
false
)
expect
(
Raven
)
.
to
receive
(
:capture_exception
)
.
with
(
an_instance_of
(
described_class
::
ThresholdExceededError
))
transaction
.
act_upon_results
end
end
end
end
end
...
...
vendor/ingress/values.yaml
View file @
22aeff30
...
@@ -2,7 +2,8 @@ controller:
...
@@ -2,7 +2,8 @@ controller:
image
:
image
:
tag
:
"
0.10.2"
tag
:
"
0.10.2"
repository
:
"
quay.io/kubernetes-ingress-controller/nginx-ingress-controller"
repository
:
"
quay.io/kubernetes-ingress-controller/nginx-ingress-controller"
stats.enabled
:
true
stats
:
enabled
:
true
podAnnotations
:
podAnnotations
:
prometheus.io/scrape
:
"
true"
prometheus.io/scrape
:
"
true"
prometheus.io/port
:
"
10254"
prometheus.io/port
:
"
10254"
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