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
4247e67b
Commit
4247e67b
authored
Jan 03, 2020
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
c0d8f9f3
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
60 additions
and
45 deletions
+60
-45
changelogs/unreleased/118669-blob-preload.yml
changelogs/unreleased/118669-blob-preload.yml
+5
-0
changelogs/unreleased/remove-pg-limit-fix.yml
changelogs/unreleased/remove-pg-limit-fix.yml
+5
-0
config/initializers/postgresql_limit_fix.rb
config/initializers/postgresql_limit_fix.rb
+0
-27
lib/gitlab/file_finder.rb
lib/gitlab/file_finder.rb
+1
-1
spec/frontend/clusters/components/knative_domain_editor_spec.js
...rontend/clusters/components/knative_domain_editor_spec.js
+3
-1
spec/frontend/clusters/components/uninstall_application_confirmation_modal_spec.js
...mponents/uninstall_application_confirmation_modal_spec.js
+4
-3
spec/frontend/clusters/services/crossplane_provider_stack_spec.js
...ntend/clusters/services/crossplane_provider_stack_spec.js
+3
-1
spec/frontend/diffs/components/diff_file_header_spec.js
spec/frontend/diffs/components/diff_file_header_spec.js
+6
-2
spec/frontend/ide/components/jobs/stage_spec.js
spec/frontend/ide/components/jobs/stage_spec.js
+3
-1
spec/frontend/notes/components/discussion_notes_spec.js
spec/frontend/notes/components/discussion_notes_spec.js
+16
-4
spec/frontend/repository/components/last_commit_spec.js
spec/frontend/repository/components/last_commit_spec.js
+4
-2
spec/frontend/vue_mr_widget/components/states/mr_widget_commit_message_dropdown_spec.js
...mponents/states/mr_widget_commit_message_dropdown_spec.js
+3
-1
spec/lib/gitlab/file_finder_spec.rb
spec/lib/gitlab/file_finder_spec.rb
+6
-0
spec/lib/gitlab/project_search_results_spec.rb
spec/lib/gitlab/project_search_results_spec.rb
+1
-2
No files found.
changelogs/unreleased/118669-blob-preload.yml
0 → 100644
View file @
4247e67b
---
title
:
Fix slow query on blob search when doing path filtering
merge_request
:
21996
author
:
type
:
performance
changelogs/unreleased/remove-pg-limit-fix.yml
0 → 100644
View file @
4247e67b
---
title
:
Remove ActiveRecord patch to ignore limit on text columns
merge_request
:
22406
author
:
type
:
other
config/initializers/postgresql_limit_fix.rb
deleted
100644 → 0
View file @
c0d8f9f3
if
defined?
(
ActiveRecord
::
ConnectionAdapters
::
PostgreSQLAdapter
)
class
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
module
LimitFilter
def
add_column
(
table_name
,
column_name
,
type
,
options
=
{})
options
.
delete
(
:limit
)
if
type
==
:text
super
(
table_name
,
column_name
,
type
,
options
)
end
def
change_column
(
table_name
,
column_name
,
type
,
options
=
{})
options
.
delete
(
:limit
)
if
type
==
:text
super
(
table_name
,
column_name
,
type
,
options
)
end
end
prepend
ActiveRecord
::
ConnectionAdapters
::
PostgreSQLAdapter
::
LimitFilter
class
TableDefinition
def
text
(
*
args
)
options
=
args
.
extract_options!
options
.
delete
(
:limit
)
column_names
=
args
type
=
:text
column_names
.
each
{
|
name
|
column
(
name
,
type
,
options
)
}
end
end
end
end
lib/gitlab/file_finder.rb
View file @
4247e67b
...
@@ -37,7 +37,7 @@ module Gitlab
...
@@ -37,7 +37,7 @@ module Gitlab
def
find_by_path
(
query
)
def
find_by_path
(
query
)
search_paths
(
query
).
map
do
|
path
|
search_paths
(
query
).
map
do
|
path
|
Gitlab
::
Search
::
FoundBlob
.
new
(
blob_path:
path
,
project:
project
,
ref:
ref
,
repository:
repository
)
Gitlab
::
Search
::
FoundBlob
.
new
(
blob_path:
path
,
p
ath:
path
,
p
roject:
project
,
ref:
ref
,
repository:
repository
)
end
end
end
end
...
...
spec/frontend/clusters/components/knative_domain_editor_spec.js
View file @
4247e67b
...
@@ -79,9 +79,11 @@ describe('KnativeDomainEditor', () => {
...
@@ -79,9 +79,11 @@ describe('KnativeDomainEditor', () => {
it
(
'
triggers save event and pass current knative hostname
'
,
()
=>
{
it
(
'
triggers save event and pass current knative hostname
'
,
()
=>
{
wrapper
.
find
(
LoadingButton
).
vm
.
$emit
(
'
click
'
);
wrapper
.
find
(
LoadingButton
).
vm
.
$emit
(
'
click
'
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
(
'
save
'
)[
0
]).
toEqual
([
knative
.
hostname
]);
expect
(
wrapper
.
emitted
(
'
save
'
)[
0
]).
toEqual
([
knative
.
hostname
]);
});
});
});
});
});
describe
(
'
when knative domain name was saved successfully
'
,
()
=>
{
describe
(
'
when knative domain name was saved successfully
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
...
...
spec/frontend/clusters/components/uninstall_application_confirmation_modal_spec.js
View file @
4247e67b
...
@@ -35,9 +35,10 @@ describe('UninstallApplicationConfirmationModal', () => {
...
@@ -35,9 +35,10 @@ describe('UninstallApplicationConfirmationModal', () => {
wrapper
.
find
(
GlModal
).
vm
.
$emit
(
'
ok
'
);
wrapper
.
find
(
GlModal
).
vm
.
$emit
(
'
ok
'
);
});
});
it
(
'
emits confirm event
'
,
()
=>
{
it
(
'
emits confirm event
'
,
()
=>
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
(
'
confirm
'
)).
toBeTruthy
();
expect
(
wrapper
.
emitted
(
'
confirm
'
)).
toBeTruthy
();
}
);
})
);
it
(
'
calls track uninstall button click mixin
'
,
()
=>
{
it
(
'
calls track uninstall button click mixin
'
,
()
=>
{
expect
(
wrapper
.
vm
.
trackUninstallButtonClick
).
toHaveBeenCalledWith
(
INGRESS
);
expect
(
wrapper
.
vm
.
trackUninstallButtonClick
).
toHaveBeenCalledWith
(
INGRESS
);
...
...
spec/frontend/clusters/services/crossplane_provider_stack_spec.js
View file @
4247e67b
...
@@ -70,8 +70,10 @@ describe('CrossplaneProviderStack component', () => {
...
@@ -70,8 +70,10 @@ describe('CrossplaneProviderStack component', () => {
};
};
createComponent
({
crossplane
});
createComponent
({
crossplane
});
findFirstDropdownElement
().
vm
.
$emit
(
'
click
'
);
findFirstDropdownElement
().
vm
.
$emit
(
'
click
'
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
set
[
0
][
0
].
code
).
toEqual
(
'
gcp
'
);
expect
(
wrapper
.
emitted
().
set
[
0
][
0
].
code
).
toEqual
(
'
gcp
'
);
});
});
});
it
(
'
renders the correct dropdown text when no stack is selected
'
,
()
=>
{
it
(
'
renders the correct dropdown text when no stack is selected
'
,
()
=>
{
expect
(
wrapper
.
vm
.
dropdownText
).
toBe
(
'
Select Stack
'
);
expect
(
wrapper
.
vm
.
dropdownText
).
toBe
(
'
Select Stack
'
);
...
...
spec/frontend/diffs/components/diff_file_header_spec.js
View file @
4247e67b
...
@@ -126,8 +126,10 @@ describe('DiffFileHeader component', () => {
...
@@ -126,8 +126,10 @@ describe('DiffFileHeader component', () => {
it
(
'
when collapseIcon is clicked emits toggleFile
'
,
()
=>
{
it
(
'
when collapseIcon is clicked emits toggleFile
'
,
()
=>
{
createComponent
({
collapsible
:
true
});
createComponent
({
collapsible
:
true
});
findCollapseIcon
().
vm
.
$emit
(
'
click
'
,
new
Event
(
'
click
'
));
findCollapseIcon
().
vm
.
$emit
(
'
click
'
,
new
Event
(
'
click
'
));
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
toggleFile
).
toBeDefined
();
expect
(
wrapper
.
emitted
().
toggleFile
).
toBeDefined
();
});
});
});
it
(
'
when other element in header is clicked does not emits toggleFile
'
,
()
=>
{
it
(
'
when other element in header is clicked does not emits toggleFile
'
,
()
=>
{
createComponent
({
collapsible
:
true
});
createComponent
({
collapsible
:
true
});
...
@@ -200,8 +202,10 @@ describe('DiffFileHeader component', () => {
...
@@ -200,8 +202,10 @@ describe('DiffFileHeader component', () => {
addMergeRequestButtons
:
true
,
addMergeRequestButtons
:
true
,
});
});
wrapper
.
find
(
EditButton
).
vm
.
$emit
(
'
showForkMessage
'
);
wrapper
.
find
(
EditButton
).
vm
.
$emit
(
'
showForkMessage
'
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
showForkMessage
).
toBeDefined
();
expect
(
wrapper
.
emitted
().
showForkMessage
).
toBeDefined
();
});
});
});
it
(
'
for mode_changed file mode displays mode changes
'
,
()
=>
{
it
(
'
for mode_changed file mode displays mode changes
'
,
()
=>
{
createComponent
({
createComponent
({
...
...
spec/frontend/ide/components/jobs/stage_spec.js
View file @
4247e67b
...
@@ -65,8 +65,10 @@ describe('IDE pipeline stage', () => {
...
@@ -65,8 +65,10 @@ describe('IDE pipeline stage', () => {
.
findAll
(
Item
)
.
findAll
(
Item
)
.
at
(
0
)
.
at
(
0
)
.
vm
.
$emit
(
'
clickViewLog
'
,
job
);
.
vm
.
$emit
(
'
clickViewLog
'
,
job
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
clickViewLog
[
0
][
0
]).
toBe
(
job
);
expect
(
wrapper
.
emitted
().
clickViewLog
[
0
][
0
]).
toBe
(
job
);
});
});
});
it
(
'
renders stage details & icon
'
,
()
=>
{
it
(
'
renders stage details & icon
'
,
()
=>
{
createComponent
();
createComponent
();
...
...
spec/frontend/notes/components/discussion_notes_spec.js
View file @
4247e67b
...
@@ -119,19 +119,28 @@ describe('DiscussionNotes', () => {
...
@@ -119,19 +119,28 @@ describe('DiscussionNotes', () => {
it
(
'
emits deleteNote when first note emits handleDeleteNote
'
,
()
=>
{
it
(
'
emits deleteNote when first note emits handleDeleteNote
'
,
()
=>
{
findNoteAtIndex
(
0
).
vm
.
$emit
(
'
handleDeleteNote
'
);
findNoteAtIndex
(
0
).
vm
.
$emit
(
'
handleDeleteNote
'
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
deleteNote
).
toBeTruthy
();
expect
(
wrapper
.
emitted
().
deleteNote
).
toBeTruthy
();
});
});
});
it
(
'
emits startReplying when first note emits startReplying
'
,
()
=>
{
it
(
'
emits startReplying when first note emits startReplying
'
,
()
=>
{
findNoteAtIndex
(
0
).
vm
.
$emit
(
'
startReplying
'
);
findNoteAtIndex
(
0
).
vm
.
$emit
(
'
startReplying
'
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
startReplying
).
toBeTruthy
();
expect
(
wrapper
.
emitted
().
startReplying
).
toBeTruthy
();
});
});
});
it
(
'
emits deleteNote when second note emits handleDeleteNote
'
,
()
=>
{
it
(
'
emits deleteNote when second note emits handleDeleteNote
'
,
()
=>
{
findNoteAtIndex
(
1
).
vm
.
$emit
(
'
handleDeleteNote
'
);
findNoteAtIndex
(
1
).
vm
.
$emit
(
'
handleDeleteNote
'
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
deleteNote
).
toBeTruthy
();
expect
(
wrapper
.
emitted
().
deleteNote
).
toBeTruthy
();
});
});
});
});
});
describe
(
'
with ungroupped notes
'
,
()
=>
{
describe
(
'
with ungroupped notes
'
,
()
=>
{
let
note
;
let
note
;
...
@@ -142,10 +151,13 @@ describe('DiscussionNotes', () => {
...
@@ -142,10 +151,13 @@ describe('DiscussionNotes', () => {
it
(
'
emits deleteNote when first note emits handleDeleteNote
'
,
()
=>
{
it
(
'
emits deleteNote when first note emits handleDeleteNote
'
,
()
=>
{
note
.
vm
.
$emit
(
'
handleDeleteNote
'
);
note
.
vm
.
$emit
(
'
handleDeleteNote
'
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
deleteNote
).
toBeTruthy
();
expect
(
wrapper
.
emitted
().
deleteNote
).
toBeTruthy
();
});
});
});
});
});
});
});
describe
(
'
componentData
'
,
()
=>
{
describe
(
'
componentData
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
...
...
spec/frontend/repository/components/last_commit_spec.js
View file @
4247e67b
...
@@ -118,9 +118,11 @@ describe('Repository last commit component', () => {
...
@@ -118,9 +118,11 @@ describe('Repository last commit component', () => {
vm
.
find
(
'
.text-expander
'
).
vm
.
$emit
(
'
click
'
);
vm
.
find
(
'
.text-expander
'
).
vm
.
$emit
(
'
click
'
);
return
vm
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
vm
.
find
(
'
.commit-row-description
'
).
isVisible
()).
toBe
(
true
);
expect
(
vm
.
find
(
'
.commit-row-description
'
).
isVisible
()).
toBe
(
true
);
expect
(
vm
.
find
(
'
.text-expander
'
).
classes
(
'
open
'
)).
toBe
(
true
);
expect
(
vm
.
find
(
'
.text-expander
'
).
classes
(
'
open
'
)).
toBe
(
true
);
});
});
});
it
(
'
renders the signature HTML as returned by the backend
'
,
()
=>
{
it
(
'
renders the signature HTML as returned by the backend
'
,
()
=>
{
factory
(
createCommitData
({
signatureHtml
:
'
<button>Verified</button>
'
}));
factory
(
createCommitData
({
signatureHtml
:
'
<button>Verified</button>
'
}));
...
...
spec/frontend/vue_mr_widget/components/states/mr_widget_commit_message_dropdown_spec.js
View file @
4247e67b
...
@@ -56,6 +56,8 @@ describe('Commits message dropdown component', () => {
...
@@ -56,6 +56,8 @@ describe('Commits message dropdown component', () => {
it
(
'
should emit a commit title on selecting commit
'
,
()
=>
{
it
(
'
should emit a commit title on selecting commit
'
,
()
=>
{
findFirstDropdownElement
().
vm
.
$emit
(
'
click
'
);
findFirstDropdownElement
().
vm
.
$emit
(
'
click
'
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
input
[
0
]).
toEqual
([
'
Update test.txt
'
]);
expect
(
wrapper
.
emitted
().
input
[
0
]).
toEqual
([
'
Update test.txt
'
]);
});
});
});
});
});
spec/lib/gitlab/file_finder_spec.rb
View file @
4247e67b
...
@@ -30,5 +30,11 @@ describe Gitlab::FileFinder do
...
@@ -30,5 +30,11 @@ describe Gitlab::FileFinder do
expect
(
results
.
count
).
to
eq
(
1
)
expect
(
results
.
count
).
to
eq
(
1
)
end
end
it
'does not cause N+1 query'
do
expect
(
Gitlab
::
GitalyClient
).
to
receive
(
:call
).
at_most
(
10
).
times
.
and_call_original
subject
.
find
(
': filename:wm.svg'
)
end
end
end
end
end
spec/lib/gitlab/project_search_results_spec.rb
View file @
4247e67b
...
@@ -86,8 +86,7 @@ describe Gitlab::ProjectSearchResults do
...
@@ -86,8 +86,7 @@ describe Gitlab::ProjectSearchResults do
it
"loads all blobs for path matches in single batch"
do
it
"loads all blobs for path matches in single batch"
do
expect
(
Gitlab
::
Git
::
Blob
).
to
receive
(
:batch
).
once
.
and_call_original
expect
(
Gitlab
::
Git
::
Blob
).
to
receive
(
:batch
).
once
.
and_call_original
expected
=
project
.
repository
.
search_files_by_name
(
query
,
'master'
)
results
.
map
(
&
:data
)
expect
(
results
.
map
(
&
:path
)).
to
include
(
*
expected
)
end
end
it
'finds by content'
do
it
'finds by content'
do
...
...
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