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
f50defb4
Commit
f50defb4
authored
May 23, 2019
by
Douglas Barbosa Alexandre
Committed by
Ash McKenzie
May 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Does not apply selective sync restrictions while counting job artifacts
parent
276b063d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
15 deletions
+15
-15
ee/app/finders/geo/attachment_registry_finder.rb
ee/app/finders/geo/attachment_registry_finder.rb
+1
-1
ee/app/finders/geo/job_artifact_registry_finder.rb
ee/app/finders/geo/job_artifact_registry_finder.rb
+1
-1
ee/app/finders/geo/lfs_object_registry_finder.rb
ee/app/finders/geo/lfs_object_registry_finder.rb
+1
-1
ee/spec/finders/geo/attachment_registry_finder_spec.rb
ee/spec/finders/geo/attachment_registry_finder_spec.rb
+4
-4
ee/spec/finders/geo/job_artifact_registry_finder_spec.rb
ee/spec/finders/geo/job_artifact_registry_finder_spec.rb
+4
-4
ee/spec/finders/geo/lfs_object_registry_finder_spec.rb
ee/spec/finders/geo/lfs_object_registry_finder_spec.rb
+4
-4
No files found.
ee/app/finders/geo/attachment_registry_finder.rb
View file @
f50defb4
...
...
@@ -19,7 +19,7 @@ module Geo
end
def
count_registry
registries_for_
attachments
.
count
Geo
::
FileRegistry
.
attachments
.
count
end
def
syncable
...
...
ee/app/finders/geo/job_artifact_registry_finder.rb
View file @
f50defb4
...
...
@@ -19,7 +19,7 @@ module Geo
end
def
count_registry
registries_for_job_artifacts
.
count
Geo
::
JobArtifactRegistry
.
count
end
def
syncable
...
...
ee/app/finders/geo/lfs_object_registry_finder.rb
View file @
f50defb4
...
...
@@ -19,7 +19,7 @@ module Geo
end
def
count_registry
registries_for_
lfs_objects
.
count
Geo
::
FileRegistry
.
lfs_objects
.
count
end
def
syncable
...
...
ee/spec/finders/geo/attachment_registry_finder_spec.rb
View file @
f50defb4
...
...
@@ -427,14 +427,14 @@ describe Geo::AttachmentRegistryFinder, :geo do
secondary
.
update!
(
selective_sync_type:
'namespaces'
,
namespaces:
[
synced_group
])
end
it
'
counts file registries for attachments
'
do
it
'
does not apply the selective sync restriction
'
do
create
(
:geo_file_registry
,
:attachment
,
:failed
,
file_id:
upload_1
.
id
,
missing_on_primary:
true
)
create
(
:geo_file_registry
,
:attachment
,
file_id:
upload_2
.
id
)
create
(
:geo_file_registry
,
:attachment
,
file_id:
upload_3
.
id
)
create
(
:geo_file_registry
,
:attachment
,
file_id:
upload_4
.
id
)
create
(
:geo_file_registry
,
:attachment
,
file_id:
upload_5
.
id
,
missing_on_primary:
true
)
expect
(
subject
.
count_registry
).
to
eq
3
expect
(
subject
.
count_registry
).
to
eq
5
end
end
...
...
@@ -443,14 +443,14 @@ describe Geo::AttachmentRegistryFinder, :geo do
secondary
.
update!
(
selective_sync_type:
'shards'
,
selective_sync_shards:
[
'broken'
])
end
it
'
counts file registries for attachments
'
do
it
'
does not apply the selective sync restriction
'
do
create
(
:geo_file_registry
,
:attachment
,
:failed
,
file_id:
upload_1
.
id
)
create
(
:geo_file_registry
,
:attachment
,
file_id:
upload_2
.
id
,
missing_on_primary:
true
)
create
(
:geo_file_registry
,
:attachment
,
file_id:
upload_3
.
id
)
create
(
:geo_file_registry
,
:attachment
,
file_id:
upload_4
.
id
)
create
(
:geo_file_registry
,
:attachment
,
file_id:
upload_5
.
id
)
expect
(
subject
.
count_registry
).
to
eq
3
expect
(
subject
.
count_registry
).
to
eq
5
end
end
end
...
...
ee/spec/finders/geo/job_artifact_registry_finder_spec.rb
View file @
f50defb4
...
...
@@ -382,8 +382,8 @@ describe Geo::JobArtifactRegistryFinder, :geo do
secondary
.
update!
(
selective_sync_type:
'namespaces'
,
namespaces:
[
synced_group
])
end
it
'
counts file registries for job artifacts
'
do
expect
(
subject
.
count_registry
).
to
eq
2
it
'
does not apply the selective sync restriction
'
do
expect
(
subject
.
count_registry
).
to
eq
4
end
end
...
...
@@ -392,8 +392,8 @@ describe Geo::JobArtifactRegistryFinder, :geo do
secondary
.
update!
(
selective_sync_type:
'shards'
,
selective_sync_shards:
[
'broken'
])
end
it
'
counts file registries for job artifacts
'
do
expect
(
subject
.
count_registry
).
to
eq
1
it
'
does not apply the selective sync restriction
'
do
expect
(
subject
.
count_registry
).
to
eq
4
end
end
end
...
...
ee/spec/finders/geo/lfs_object_registry_finder_spec.rb
View file @
f50defb4
...
...
@@ -107,13 +107,13 @@ describe Geo::LfsObjectRegistryFinder, :geo do
secondary
.
update!
(
selective_sync_type:
'namespaces'
,
namespaces:
[
synced_group
])
end
it
'
counts file registries for LFS objects
'
do
it
'
does not apply the selective sync restriction
'
do
create
(
:geo_file_registry
,
:lfs
,
file_id:
lfs_object_remote_1
.
id
)
create
(
:geo_file_registry
,
:lfs
,
file_id:
lfs_object_2
.
id
)
create
(
:geo_file_registry
,
:lfs
,
file_id:
lfs_object_3
.
id
)
create
(
:geo_file_registry
,
:avatar
)
expect
(
subject
.
count_registry
).
to
eq
1
expect
(
subject
.
count_registry
).
to
eq
3
end
end
...
...
@@ -130,13 +130,13 @@ describe Geo::LfsObjectRegistryFinder, :geo do
secondary
.
update!
(
selective_sync_type:
'shards'
,
selective_sync_shards:
[
'broken'
])
end
it
'
counts file registries for LFS objects
'
do
it
'
does not apply the selective sync restriction
'
do
create
(
:geo_file_registry
,
:lfs
,
file_id:
lfs_object_remote_1
.
id
)
create
(
:geo_file_registry
,
:lfs
,
file_id:
lfs_object_2
.
id
)
create
(
:geo_file_registry
,
:lfs
,
file_id:
lfs_object_4
.
id
)
create
(
:geo_file_registry
,
:avatar
)
expect
(
subject
.
count_registry
).
to
eq
2
expect
(
subject
.
count_registry
).
to
eq
3
end
end
end
...
...
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