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
afaa42ac
Commit
afaa42ac
authored
Aug 26, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ee into ce_upstream
parents
dd962dd6
80cd8f3e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
5 deletions
+29
-5
CHANGELOG-EE
CHANGELOG-EE
+8
-2
app/services/merge_requests/rebase_service.rb
app/services/merge_requests/rebase_service.rb
+1
-1
bin/elastic_repo_indexer
bin/elastic_repo_indexer
+20
-2
No files found.
CHANGELOG-EE
View file @
afaa42ac
Please view this file on the master branch, on stable branches it's out of date.
Please view this file on the master branch, on stable branches it's out of date.
v 8.12.0 (Unreleased)
v 8.11.2 (Unreleased)
v 8.11.3 (Unreleased)
- [ES] Add logging to indexer
- Set the correct `GL_PROTOCOL` when rebasing !691
v 8.11.
1
v 8.11.
2
- Additional documentation on protected branches for EE
- Additional documentation on protected branches for EE
- Change slash commands docs location
- Change slash commands docs location
v 8.11.1
- Pulled due to packaging error.
v 8.11.0
v 8.11.0
- Allow projects to be moved between repository storages
- Allow projects to be moved between repository storages
- Add rake task to remove old repository copies from repositories moved to another storage
- Add rake task to remove old repository copies from repositories moved to another storage
...
...
app/services/merge_requests/rebase_service.rb
View file @
afaa42ac
...
@@ -107,7 +107,7 @@ module MergeRequests
...
@@ -107,7 +107,7 @@ module MergeRequests
end
end
def
git_env
def
git_env
{
'GL_ID'
=>
Gitlab
::
GlId
.
gl_id
(
current_user
)
}
{
'GL_ID'
=>
Gitlab
::
GlId
.
gl_id
(
current_user
)
,
'GL_PROTOCOL'
=>
'web'
}
end
end
end
end
end
end
bin/elastic_repo_indexer
View file @
afaa42ac
...
@@ -6,6 +6,10 @@ require 'json'
...
@@ -6,6 +6,10 @@ require 'json'
require
'elasticsearch/git'
require
'elasticsearch/git'
require
'active_support'
require
'active_support'
require
'active_support/core_ext'
require
'active_support/core_ext'
require
'benchmark'
path_to_log_file
=
File
.
expand_path
(
'../../log/es-indexer.log'
,
__FILE__
)
LOGGER
=
Logger
.
new
(
path_to_log_file
)
PROJECT_ID
=
ARGV
.
shift
PROJECT_ID
=
ARGV
.
shift
REPO_PATH
=
ARGV
.
shift
REPO_PATH
=
ARGV
.
shift
...
@@ -13,6 +17,8 @@ FROM_SHA = ENV['FROM_SHA']
...
@@ -13,6 +17,8 @@ FROM_SHA = ENV['FROM_SHA']
TO_SHA
=
ENV
[
'TO_SHA'
]
TO_SHA
=
ENV
[
'TO_SHA'
]
RAILS_ENV
=
ENV
[
'RAILS_ENV'
]
RAILS_ENV
=
ENV
[
'RAILS_ENV'
]
LOGGER
.
info
(
"[ES indexer]: Has been scheduled for project
#{
REPO_PATH
}
with SHA range
#{
FROM_SHA
}
:
#{
TO_SHA
}
"
)
elastic_connection_info
=
JSON
.
parse
ENV
[
'ELASTIC_CONNECTION_INFO'
]
elastic_connection_info
=
JSON
.
parse
ENV
[
'ELASTIC_CONNECTION_INFO'
]
ELASTIC_HOST
=
elastic_connection_info
[
'host'
]
ELASTIC_HOST
=
elastic_connection_info
[
'host'
]
ELASTIC_PORT
=
elastic_connection_info
[
'port'
]
ELASTIC_PORT
=
elastic_connection_info
[
'port'
]
...
@@ -45,9 +51,21 @@ repo = Repository.new
...
@@ -45,9 +51,21 @@ repo = Repository.new
params
=
{
from_rev:
FROM_SHA
,
to_rev:
TO_SHA
}.
compact
params
=
{
from_rev:
FROM_SHA
,
to_rev:
TO_SHA
}.
compact
print
"Indexing commits..."
print
"Indexing commits..."
repo
.
index_commits
(
params
)
timings
=
Benchmark
.
measure
do
repo
.
index_commits
(
params
)
end
puts
"Done"
puts
"Done"
LOGGER
.
info
(
"[ES indexer]: Commits for
#{
REPO_PATH
}
are indexed. Time elapsed:
#{
timings
.
real
}
"
)
print
"Indexing blobs..."
print
"Indexing blobs..."
repo
.
index_blobs
(
params
)
timings
=
Benchmark
.
measure
do
repo
.
index_blobs
(
params
)
end
puts
"Done"
puts
"Done"
LOGGER
.
info
(
"[ES indexer]: Blobs for
#{
REPO_PATH
}
are indexed. Time elapsed:
#{
timings
.
real
}
"
)
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