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
93e6c4d3
Commit
93e6c4d3
authored
Jul 30, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
23670b60
6154daf1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
6 deletions
+41
-6
GITALY_SERVER_VERSION
GITALY_SERVER_VERSION
+1
-1
lib/api/tags.rb
lib/api/tags.rb
+0
-2
lib/gitlab/github_import/importer/repository_importer.rb
lib/gitlab/github_import/importer/repository_importer.rb
+1
-1
lib/gitlab/sidekiq_cluster/cli.rb
lib/gitlab/sidekiq_cluster/cli.rb
+16
-0
spec/lib/gitlab/github_import/importer/repository_importer_spec.rb
...gitlab/github_import/importer/repository_importer_spec.rb
+1
-1
spec/lib/gitlab/sidekiq_cluster/cli_spec.rb
spec/lib/gitlab/sidekiq_cluster/cli_spec.rb
+22
-1
No files found.
GITALY_SERVER_VERSION
View file @
93e6c4d3
fb9de5f27b55e28a5d4737e0aa639a50ccc3dd7
5
a8520a1568f0c0515eef6931c01b3fa8e55e798
5
lib/api/tags.rb
View file @
93e6c4d3
...
...
@@ -59,8 +59,6 @@ module API
optional
:message
,
type:
String
,
desc:
'Specifying a message creates an annotated tag'
end
post
':id/repository/tags'
,
:release_orchestration
do
deprecate_release_notes
unless
params
[
:release_description
].
blank?
authorize_admin_tag
result
=
::
Tags
::
CreateService
.
new
(
user_project
,
current_user
)
...
...
lib/gitlab/github_import/importer/repository_importer.rb
View file @
93e6c4d3
...
...
@@ -50,7 +50,7 @@ module Gitlab
project
.
ensure_repository
refmap
=
Gitlab
::
GithubImport
.
refmap
project
.
repository
.
fetch_as_mirror
(
project
.
import_url
,
refmap:
refmap
,
forced:
true
,
remote_name:
'github'
)
project
.
repository
.
fetch_as_mirror
(
project
.
import_url
,
refmap:
refmap
,
forced:
true
)
project
.
change_head
(
default_branch
)
if
default_branch
...
...
lib/gitlab/sidekiq_cluster/cli.rb
View file @
93e6c4d3
...
...
@@ -37,6 +37,7 @@ module Gitlab
@logger
.
formatter
=
::
Gitlab
::
SidekiqLogging
::
JSONFormatter
.
new
@rails_path
=
Dir
.
pwd
@dryrun
=
false
@list_queues
=
false
end
def
run
(
argv
=
ARGV
)
...
...
@@ -47,6 +48,11 @@ module Gitlab
option_parser
.
parse!
(
argv
)
if
@dryrun
&&
@list_queues
raise
CommandError
,
'The --dryrun and --list-queues options are mutually exclusive'
end
worker_metadatas
=
SidekiqConfig
::
CliMethods
.
worker_metadatas
(
@rails_path
)
worker_queues
=
SidekiqConfig
::
CliMethods
.
worker_queues
(
@rails_path
)
...
...
@@ -73,6 +79,12 @@ module Gitlab
'No queues found, you must select at least one queue'
end
if
@list_queues
puts
queue_groups
.
map
(
&
:sort
)
# rubocop:disable Rails/Output
return
end
unless
@dryrun
@logger
.
info
(
"Starting cluster with
#{
queue_groups
.
length
}
processes"
)
end
...
...
@@ -202,6 +214,10 @@ module Gitlab
opt
.
on
(
'-d'
,
'--dryrun'
,
'Print commands that would be run without this flag, and quit'
)
do
|
int
|
@dryrun
=
true
end
opt
.
on
(
'--list-queues'
,
'List matching queues, and quit'
)
do
|
int
|
@list_queues
=
true
end
end
end
end
...
...
spec/lib/gitlab/github_import/importer/repository_importer_spec.rb
View file @
93e6c4d3
...
...
@@ -202,7 +202,7 @@ RSpec.describe Gitlab::GithubImport::Importer::RepositoryImporter do
expect
(
repository
)
.
to
receive
(
:fetch_as_mirror
)
.
with
(
project
.
import_url
,
refmap:
Gitlab
::
GithubImport
.
refmap
,
forced:
true
,
remote_name:
'github'
)
.
with
(
project
.
import_url
,
refmap:
Gitlab
::
GithubImport
.
refmap
,
forced:
true
)
service
=
double
expect
(
Repositories
::
HousekeepingService
)
...
...
spec/lib/gitlab/sidekiq_cluster/cli_spec.rb
View file @
93e6c4d3
...
...
@@ -81,7 +81,7 @@ RSpec.describe Gitlab::SidekiqCluster::CLI do
end
end
context
'-timeout flag'
do
context
'
with -
-timeout flag'
do
it
'when given'
,
'starts Sidekiq workers with given timeout'
do
expect
(
Gitlab
::
SidekiqCluster
).
to
receive
(
:start
)
.
with
([[
'foo'
]],
default_options
.
merge
(
timeout:
10
))
...
...
@@ -97,6 +97,27 @@ RSpec.describe Gitlab::SidekiqCluster::CLI do
end
end
context
'with --list-queues flag'
do
it
'errors when given --list-queues and --dryrun'
do
expect
{
cli
.
run
(
%w(foo --list-queues --dryrun)
)
}.
to
raise_error
(
described_class
::
CommandError
)
end
it
'prints out a list of queues in alphabetical order'
do
expected_queues
=
[
'epics:epics_update_epics_dates'
,
'epics_new_epic_issue'
,
'new_epic'
,
'todos_destroyer:todos_destroyer_confidential_epic'
]
allow
(
Gitlab
::
SidekiqConfig
::
CliMethods
).
to
receive
(
:query_queues
).
and_return
(
expected_queues
.
shuffle
)
expect
(
cli
).
to
receive
(
:puts
).
with
([
expected_queues
])
cli
.
run
(
%w(--queue-selector feature_category=epics --list-queues)
)
end
end
context
'queue namespace expansion'
do
it
'starts Sidekiq workers for all queues in all_queues.yml with a namespace in argv'
do
expect
(
Gitlab
::
SidekiqConfig
::
CliMethods
).
to
receive
(
:worker_queues
).
and_return
([
'cronjob:foo'
,
'cronjob:bar'
])
...
...
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