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
83504469
Commit
83504469
authored
Jan 09, 2020
by
Michael Kozono
Committed by
Imre Farkas
Jan 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove backward compatibility code
And the corresponding tests.
parent
a79cad41
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
37 deletions
+0
-37
ee/app/workers/geo/batch/project_registry_scheduler_worker.rb
...pp/workers/geo/batch/project_registry_scheduler_worker.rb
+0
-7
ee/app/workers/geo/batch/project_registry_worker.rb
ee/app/workers/geo/batch/project_registry_worker.rb
+0
-7
ee/spec/workers/geo/batch/project_registry_scheduler_worker_spec.rb
...rkers/geo/batch/project_registry_scheduler_worker_spec.rb
+0
-11
ee/spec/workers/geo/batch/project_registry_worker_spec.rb
ee/spec/workers/geo/batch/project_registry_worker_spec.rb
+0
-12
No files found.
ee/app/workers/geo/batch/project_registry_scheduler_worker.rb
View file @
83504469
...
@@ -19,13 +19,6 @@ module Geo
...
@@ -19,13 +19,6 @@ module Geo
DELAY_INTERVAL
=
10
.
seconds
.
to_i
# base delay for scheduling batch execution
DELAY_INTERVAL
=
10
.
seconds
.
to_i
# base delay for scheduling batch execution
def
perform
(
operation
)
def
perform
(
operation
)
# TODO: This is a temporary workaround for backward compatibility
# to avoid jobs that have been already scheduled to fail.
# See https://gitlab.com/gitlab-org/gitlab/issues/13318
if
operation
.
to_sym
==
:recheck_repositories
operation
=
:reverify_repositories
end
return
fail_invalid_operation!
(
operation
)
unless
OPERATIONS
.
include?
(
operation
.
to_sym
)
return
fail_invalid_operation!
(
operation
)
unless
OPERATIONS
.
include?
(
operation
.
to_sym
)
try_obtain_lease
do
try_obtain_lease
do
...
...
ee/app/workers/geo/batch/project_registry_worker.rb
View file @
83504469
...
@@ -15,13 +15,6 @@ module Geo
...
@@ -15,13 +15,6 @@ module Geo
OPERATIONS
=
[
:resync_repositories
,
:reverify_repositories
].
freeze
OPERATIONS
=
[
:resync_repositories
,
:reverify_repositories
].
freeze
def
perform
(
operation
,
range
)
def
perform
(
operation
,
range
)
# TODO: This is a temporary workaround for backward compatibility
# to avoid jobs that have been already scheduled to fail.
# See https://gitlab.com/gitlab-org/gitlab/issues/13318
if
operation
.
to_sym
==
:recheck_repositories
operation
=
:reverify_repositories
end
case
operation
.
to_sym
case
operation
.
to_sym
when
:resync_repositories
when
:resync_repositories
resync_repositories
(
range
)
resync_repositories
(
range
)
...
...
ee/spec/workers/geo/batch/project_registry_scheduler_worker_spec.rb
View file @
83504469
...
@@ -16,17 +16,6 @@ RSpec.describe Geo::Batch::ProjectRegistrySchedulerWorker do
...
@@ -16,17 +16,6 @@ RSpec.describe Geo::Batch::ProjectRegistrySchedulerWorker do
end
end
describe
'#perform'
do
describe
'#perform'
do
context
'when operation is :recheck_repositories'
do
let!
(
:registry
)
{
create
(
:geo_project_registry
,
:repository_verified
)
}
it
'schedules batches of repositories for reverify'
do
Sidekiq
::
Testing
.
fake!
do
expect
{
subject
.
perform
(
:recheck_repositories
)
}.
to
change
(
Geo
::
Batch
::
ProjectRegistryWorker
.
jobs
,
:size
).
by
(
1
)
expect
(
Geo
::
Batch
::
ProjectRegistryWorker
.
jobs
.
last
[
'args'
]).
to
include
(
'reverify_repositories'
)
end
end
end
context
'when operation is :reverify_repositories'
do
context
'when operation is :reverify_repositories'
do
let!
(
:registry
)
{
create
(
:geo_project_registry
,
:repository_verified
)
}
let!
(
:registry
)
{
create
(
:geo_project_registry
,
:repository_verified
)
}
...
...
ee/spec/workers/geo/batch/project_registry_worker_spec.rb
View file @
83504469
...
@@ -14,18 +14,6 @@ RSpec.describe Geo::Batch::ProjectRegistryWorker do
...
@@ -14,18 +14,6 @@ RSpec.describe Geo::Batch::ProjectRegistryWorker do
describe
'#perform'
do
describe
'#perform'
do
let
(
:range
)
{
[
0
,
registry
.
id
]
}
let
(
:range
)
{
[
0
,
registry
.
id
]
}
context
'when operation is :recheck_repositories'
do
let!
(
:registry
)
{
create
(
:geo_project_registry
,
:repository_verified
)
}
it
'flags repositories for reverify'
do
Sidekiq
::
Testing
.
inline!
do
subject
.
perform
(
:recheck_repositories
,
range
)
end
expect
(
registry
.
reload
.
repository_verification_pending?
).
to
be_truthy
end
end
context
'when operation is :reverify_repositories'
do
context
'when operation is :reverify_repositories'
do
let!
(
:registry
)
{
create
(
:geo_project_registry
,
:repository_verified
)
}
let!
(
:registry
)
{
create
(
:geo_project_registry
,
:repository_verified
)
}
...
...
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