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
8ce236fc
Commit
8ce236fc
authored
Oct 22, 2020
by
Mike Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename Geo VerificationWorker
Since it is reusable on primaries and secondaries.
parent
20743441
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
14 deletions
+38
-14
db/post_migrate/20201029052241_migrate_geo_blob_verification_primary_worker_sidekiq_queue.rb
...ate_geo_blob_verification_primary_worker_sidekiq_queue.rb
+18
-0
db/schema_migrations/20201029052241
db/schema_migrations/20201029052241
+1
-0
ee/app/models/concerns/geo/blob_replicator_strategy.rb
ee/app/models/concerns/geo/blob_replicator_strategy.rb
+1
-1
ee/app/workers/all_queues.yml
ee/app/workers/all_queues.yml
+8
-8
ee/app/workers/geo/verification_worker.rb
ee/app/workers/geo/verification_worker.rb
+2
-2
ee/changelogs/unreleased/mk-rename-verification-worker.yml
ee/changelogs/unreleased/mk-rename-verification-worker.yml
+5
-0
ee/spec/models/packages/package_file_spec.rb
ee/spec/models/packages/package_file_spec.rb
+2
-2
ee/spec/workers/geo/verification_worker_spec.rb
ee/spec/workers/geo/verification_worker_spec.rb
+1
-1
No files found.
db/post_migrate/20201029052241_migrate_geo_blob_verification_primary_worker_sidekiq_queue.rb
0 → 100644
View file @
8ce236fc
# frozen_string_literal: true
# See https://docs.gitlab.com/ee/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
MigrateGeoBlobVerificationPrimaryWorkerSidekiqQueue
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
def
up
sidekiq_queue_migrate
'geo:geo_blob_verification_primary'
,
to:
'geo:geo_verification'
end
def
down
sidekiq_queue_migrate
'geo:geo_verification'
,
to:
'geo:geo_blob_verification_primary'
end
end
db/schema_migrations/20201029052241
0 → 100644
View file @
8ce236fc
87e330bc15accb10733825b079cf89e78d905a7c4080075489857085f014bfe7
\ No newline at end of file
ee/app/models/concerns/geo/blob_replicator_strategy.rb
View file @
8ce236fc
...
@@ -67,7 +67,7 @@ module Geo
...
@@ -67,7 +67,7 @@ module Geo
end
end
def
schedule_checksum_calculation
def
schedule_checksum_calculation
Geo
::
BlobVerificationPrimary
Worker
.
perform_async
(
replicable_name
,
model_record
.
id
)
Geo
::
Verification
Worker
.
perform_async
(
replicable_name
,
model_record
.
id
)
end
end
end
end
end
end
ee/app/workers/all_queues.yml
View file @
8ce236fc
...
@@ -323,14 +323,6 @@
...
@@ -323,14 +323,6 @@
:weight:
1
:weight:
1
:idempotent:
:idempotent:
:tags: []
:tags: []
-
:name: geo:geo_blob_verification_primary
:feature_category: :geo_replication
:has_external_dependencies:
:urgency: :low
:resource_boundary: :unknown
:weight:
1
:idempotent:
true
:tags: []
-
:name: geo:geo_container_repository_sync
-
:name: geo:geo_container_repository_sync
:feature_category: :geo_replication
:feature_category: :geo_replication
:has_external_dependencies:
:has_external_dependencies:
...
@@ -499,6 +491,14 @@
...
@@ -499,6 +491,14 @@
:weight:
1
:weight:
1
:idempotent:
:idempotent:
:tags: []
:tags: []
-
:name: geo:geo_verification
:feature_category: :geo_replication
:has_external_dependencies:
:urgency: :low
:resource_boundary: :unknown
:weight:
1
:idempotent:
true
:tags: []
-
:name: personal_access_tokens:personal_access_tokens_groups_policy
-
:name: personal_access_tokens:personal_access_tokens_groups_policy
:feature_category: :authentication_and_authorization
:feature_category: :authentication_and_authorization
:has_external_dependencies:
:has_external_dependencies:
...
...
ee/app/workers/geo/
blob_verification_primary
_worker.rb
→
ee/app/workers/geo/
verification
_worker.rb
View file @
8ce236fc
# frozen_string_literal: true
# frozen_string_literal: true
module
Geo
module
Geo
class
BlobVerificationPrimary
Worker
class
Verification
Worker
include
ApplicationWorker
include
ApplicationWorker
include
GeoQueue
include
GeoQueue
include
::
Gitlab
::
Geo
::
LogHelpers
include
::
Gitlab
::
Geo
::
LogHelpers
...
@@ -16,7 +16,7 @@ module Geo
...
@@ -16,7 +16,7 @@ module Geo
replicator
.
calculate_checksum!
replicator
.
calculate_checksum!
rescue
ActiveRecord
::
RecordNotFound
rescue
ActiveRecord
::
RecordNotFound
log_error
(
"Couldn't find the
blob
, skipping"
,
replicable_name:
replicable_name
,
replicable_id:
replicable_id
)
log_error
(
"Couldn't find the
record
, skipping"
,
replicable_name:
replicable_name
,
replicable_id:
replicable_id
)
end
end
end
end
end
end
ee/changelogs/unreleased/mk-rename-verification-worker.yml
0 → 100644
View file @
8ce236fc
---
title
:
Migrate renamed Sidekiq queue
merge_request
:
45964
author
:
type
:
changed
ee/spec/models/packages/package_file_spec.rb
View file @
8ce236fc
...
@@ -28,11 +28,11 @@ RSpec.describe Packages::PackageFile, type: :model do
...
@@ -28,11 +28,11 @@ RSpec.describe Packages::PackageFile, type: :model do
context
'new file'
do
context
'new file'
do
it
'calls checksum worker'
do
it
'calls checksum worker'
do
allow
(
Gitlab
::
Geo
).
to
receive
(
:enabled?
).
and_return
(
true
)
allow
(
Gitlab
::
Geo
).
to
receive
(
:enabled?
).
and_return
(
true
)
allow
(
Geo
::
BlobVerificationPrimary
Worker
).
to
receive
(
:perform_async
)
allow
(
Geo
::
Verification
Worker
).
to
receive
(
:perform_async
)
package_file
=
create
(
:conan_package_file
,
:conan_recipe_file
)
package_file
=
create
(
:conan_package_file
,
:conan_recipe_file
)
expect
(
Geo
::
BlobVerificationPrimary
Worker
).
to
have_received
(
:perform_async
).
with
(
'package_file'
,
package_file
.
id
)
expect
(
Geo
::
Verification
Worker
).
to
have_received
(
:perform_async
).
with
(
'package_file'
,
package_file
.
id
)
end
end
end
end
...
...
ee/spec/workers/geo/
blob_verification_primary
_worker_spec.rb
→
ee/spec/workers/geo/
verification
_worker_spec.rb
View file @
8ce236fc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
require
'spec_helper'
require
'spec_helper'
RSpec
.
describe
Geo
::
BlobVerificationPrimary
Worker
,
:geo
do
RSpec
.
describe
Geo
::
Verification
Worker
,
:geo
do
let
(
:package_file
)
{
create
(
:conan_package_file
,
:conan_recipe_file
)
}
let
(
:package_file
)
{
create
(
:conan_package_file
,
:conan_recipe_file
)
}
describe
'#perform'
do
describe
'#perform'
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