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
Hide 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
def
find_by_path
(
query
)
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
...
...
spec/frontend/clusters/components/knative_domain_editor_spec.js
View file @
4247e67b
...
...
@@ -79,7 +79,9 @@ describe('KnativeDomainEditor', () => {
it
(
'
triggers save event and pass current knative hostname
'
,
()
=>
{
wrapper
.
find
(
LoadingButton
).
vm
.
$emit
(
'
click
'
);
expect
(
wrapper
.
emitted
(
'
save
'
)[
0
]).
toEqual
([
knative
.
hostname
]);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
(
'
save
'
)[
0
]).
toEqual
([
knative
.
hostname
]);
});
});
});
...
...
spec/frontend/clusters/components/uninstall_application_confirmation_modal_spec.js
View file @
4247e67b
...
...
@@ -35,9 +35,10 @@ describe('UninstallApplicationConfirmationModal', () => {
wrapper
.
find
(
GlModal
).
vm
.
$emit
(
'
ok
'
);
});
it
(
'
emits confirm event
'
,
()
=>
{
expect
(
wrapper
.
emitted
(
'
confirm
'
)).
toBeTruthy
();
});
it
(
'
emits confirm event
'
,
()
=>
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
(
'
confirm
'
)).
toBeTruthy
();
}));
it
(
'
calls track uninstall button click mixin
'
,
()
=>
{
expect
(
wrapper
.
vm
.
trackUninstallButtonClick
).
toHaveBeenCalledWith
(
INGRESS
);
...
...
spec/frontend/clusters/services/crossplane_provider_stack_spec.js
View file @
4247e67b
...
...
@@ -70,7 +70,9 @@ describe('CrossplaneProviderStack component', () => {
};
createComponent
({
crossplane
});
findFirstDropdownElement
().
vm
.
$emit
(
'
click
'
);
expect
(
wrapper
.
emitted
().
set
[
0
][
0
].
code
).
toEqual
(
'
gcp
'
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
set
[
0
][
0
].
code
).
toEqual
(
'
gcp
'
);
});
});
it
(
'
renders the correct dropdown text when no stack is selected
'
,
()
=>
{
...
...
spec/frontend/diffs/components/diff_file_header_spec.js
View file @
4247e67b
...
...
@@ -126,7 +126,9 @@ describe('DiffFileHeader component', () => {
it
(
'
when collapseIcon is clicked emits toggleFile
'
,
()
=>
{
createComponent
({
collapsible
:
true
});
findCollapseIcon
().
vm
.
$emit
(
'
click
'
,
new
Event
(
'
click
'
));
expect
(
wrapper
.
emitted
().
toggleFile
).
toBeDefined
();
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
toggleFile
).
toBeDefined
();
});
});
it
(
'
when other element in header is clicked does not emits toggleFile
'
,
()
=>
{
...
...
@@ -200,7 +202,9 @@ describe('DiffFileHeader component', () => {
addMergeRequestButtons
:
true
,
});
wrapper
.
find
(
EditButton
).
vm
.
$emit
(
'
showForkMessage
'
);
expect
(
wrapper
.
emitted
().
showForkMessage
).
toBeDefined
();
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
showForkMessage
).
toBeDefined
();
});
});
it
(
'
for mode_changed file mode displays mode changes
'
,
()
=>
{
...
...
spec/frontend/ide/components/jobs/stage_spec.js
View file @
4247e67b
...
...
@@ -65,7 +65,9 @@ describe('IDE pipeline stage', () => {
.
findAll
(
Item
)
.
at
(
0
)
.
vm
.
$emit
(
'
clickViewLog
'
,
job
);
expect
(
wrapper
.
emitted
().
clickViewLog
[
0
][
0
]).
toBe
(
job
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
clickViewLog
[
0
][
0
]).
toBe
(
job
);
});
});
it
(
'
renders stage details & icon
'
,
()
=>
{
...
...
spec/frontend/notes/components/discussion_notes_spec.js
View file @
4247e67b
...
...
@@ -119,17 +119,26 @@ describe('DiscussionNotes', () => {
it
(
'
emits deleteNote when first note emits handleDeleteNote
'
,
()
=>
{
findNoteAtIndex
(
0
).
vm
.
$emit
(
'
handleDeleteNote
'
);
expect
(
wrapper
.
emitted
().
deleteNote
).
toBeTruthy
();
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
deleteNote
).
toBeTruthy
();
});
});
it
(
'
emits startReplying when first note emits startReplying
'
,
()
=>
{
findNoteAtIndex
(
0
).
vm
.
$emit
(
'
startReplying
'
);
expect
(
wrapper
.
emitted
().
startReplying
).
toBeTruthy
();
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
startReplying
).
toBeTruthy
();
});
});
it
(
'
emits deleteNote when second note emits handleDeleteNote
'
,
()
=>
{
findNoteAtIndex
(
1
).
vm
.
$emit
(
'
handleDeleteNote
'
);
expect
(
wrapper
.
emitted
().
deleteNote
).
toBeTruthy
();
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
deleteNote
).
toBeTruthy
();
});
});
});
...
...
@@ -142,7 +151,10 @@ describe('DiscussionNotes', () => {
it
(
'
emits deleteNote when first note emits handleDeleteNote
'
,
()
=>
{
note
.
vm
.
$emit
(
'
handleDeleteNote
'
);
expect
(
wrapper
.
emitted
().
deleteNote
).
toBeTruthy
();
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
emitted
().
deleteNote
).
toBeTruthy
();
});
});
});
});
...
...
spec/frontend/repository/components/last_commit_spec.js
View file @
4247e67b
...
...
@@ -118,8 +118,10 @@ describe('Repository last commit component', () => {
vm
.
find
(
'
.text-expander
'
).
vm
.
$emit
(
'
click
'
);
expect
(
vm
.
find
(
'
.commit-row-description
'
).
isVisible
()).
toBe
(
true
);
expect
(
vm
.
find
(
'
.text-expander
'
).
classes
(
'
open
'
)).
toBe
(
true
);
return
vm
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
vm
.
find
(
'
.commit-row-description
'
).
isVisible
()).
toBe
(
true
);
expect
(
vm
.
find
(
'
.text-expander
'
).
classes
(
'
open
'
)).
toBe
(
true
);
});
});
it
(
'
renders the signature HTML as returned by the backend
'
,
()
=>
{
...
...
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', () => {
it
(
'
should emit a commit title on selecting commit
'
,
()
=>
{
findFirstDropdownElement
().
vm
.
$emit
(
'
click
'
);
expect
(
wrapper
.
emitted
().
input
[
0
]).
toEqual
([
'
Update test.txt
'
]);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
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
expect
(
results
.
count
).
to
eq
(
1
)
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
spec/lib/gitlab/project_search_results_spec.rb
View file @
4247e67b
...
...
@@ -86,8 +86,7 @@ describe Gitlab::ProjectSearchResults do
it
"loads all blobs for path matches in single batch"
do
expect
(
Gitlab
::
Git
::
Blob
).
to
receive
(
:batch
).
once
.
and_call_original
expected
=
project
.
repository
.
search_files_by_name
(
query
,
'master'
)
expect
(
results
.
map
(
&
:path
)).
to
include
(
*
expected
)
results
.
map
(
&
:data
)
end
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