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
e7a362bd
Commit
e7a362bd
authored
Jan 09, 2020
by
Douglas Barbosa Alexandre
Committed by
Michael Kozono
Jan 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the "enable_geo_design_sync" feature flag
The design repositories synchronization is now GA.
parent
67e3add6
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
30 additions
and
89 deletions
+30
-89
doc/administration/geo/replication/datatypes.md
doc/administration/geo/replication/datatypes.md
+6
-12
ee/app/controllers/admin/geo/designs_controller.rb
ee/app/controllers/admin/geo/designs_controller.rb
+0
-4
ee/app/controllers/admin/geo/nodes_controller.rb
ee/app/controllers/admin/geo/nodes_controller.rb
+0
-3
ee/app/services/geo/design_repository_sync_service.rb
ee/app/services/geo/design_repository_sync_service.rb
+0
-2
ee/app/services/geo/repository_updated_service.rb
ee/app/services/geo/repository_updated_service.rb
+0
-1
ee/app/views/layouts/nav/ee/admin/_geo_sidebar.html.haml
ee/app/views/layouts/nav/ee/admin/_geo_sidebar.html.haml
+4
-5
ee/app/workers/geo/design_repository_sync_worker.rb
ee/app/workers/geo/design_repository_sync_worker.rb
+0
-3
ee/changelogs/unreleased/36096-geo-make-project-designs-repository-general-available.yml
...geo-make-project-designs-repository-general-available.yml
+5
-0
ee/lib/gitlab/geo/log_cursor/events/design_repository_updated_event.rb
.../geo/log_cursor/events/design_repository_updated_event.rb
+0
-4
ee/lib/tasks/geo.rake
ee/lib/tasks/geo.rake
+4
-6
ee/spec/lib/gitlab/geo/log_cursor/events/design_repository_updated_event_spec.rb
...log_cursor/events/design_repository_updated_event_spec.rb
+11
-33
ee/spec/services/geo/repository_updated_service_spec.rb
ee/spec/services/geo/repository_updated_service_spec.rb
+0
-6
ee/spec/workers/geo/design_repository_sync_worker_spec.rb
ee/spec/workers/geo/design_repository_sync_worker_spec.rb
+0
-10
No files found.
doc/administration/geo/replication/datatypes.md
View file @
e7a362bd
...
...
@@ -129,11 +129,11 @@ successfully, you must replicate their data using some other means.
| Application data in PostgreSQL |
**Yes**
|
**Yes**
| |
| Project repository |
**Yes**
|
**Yes**
| |
| Project wiki repository |
**Yes**
|
**Yes**
| |
| Project designs repository |
**Yes**
|
[
No
][
design-verification
]
|
Behind feature flag (
*1*
)
|
| Uploads |
**Yes**
|
[
No
][
upload-verification
]
| Verified only on transfer, or manually (
*
2
*
)|
| LFS objects |
**Yes**
|
[
No
][
lfs-verification
]
| Verified only on transfer, or manually (
*
2
*
)|
| CI job artifacts (other than traces) |
**Yes**
|
[
No
][
artifact-verification
]
| Verified only manually (
*
2
*
) |
| Archived traces |
**Yes**
|
[
No
][
artifact-verification
]
| Verified only on transfer, or manually (
*
2
*
)|
| Project designs repository |
**Yes**
|
[
No
][
design-verification
]
|
|
| Uploads |
**Yes**
|
[
No
][
upload-verification
]
| Verified only on transfer, or manually (
*
1
*
)|
| LFS objects |
**Yes**
|
[
No
][
lfs-verification
]
| Verified only on transfer, or manually (
*
1
*
)|
| CI job artifacts (other than traces) |
**Yes**
|
[
No
][
artifact-verification
]
| Verified only manually (
*
1
*
) |
| Archived traces |
**Yes**
|
[
No
][
artifact-verification
]
| Verified only on transfer, or manually (
*
1
*
)|
| Personal snippets |
**Yes**
|
**Yes**
| |
| Project snippets |
**Yes**
|
**Yes**
| |
| Object pools for forked project deduplication |
**Yes**
| No | |
...
...
@@ -147,13 +147,7 @@ successfully, you must replicate their data using some other means.
|
[
External merge request diffs
][
merge-request-diffs
]
|
[
No
][
diffs-replication
]
| No | |
| Content in object storage |
**Yes**
| No | |
-
(
*1*
): Enable the
`enable_geo_design_sync`
feature flag by running the following in a Rails console:
```
ruby
Feature
.
disable
(
:enable_geo_design_sync
)
```
-
(
*2*
): The integrity can be verified manually using
-
(
*1*
): The integrity can be verified manually using
[
Integrity Check Rake Task
](
../../raketasks/check.md
)
on both nodes and comparing the output between them.
[
design-replication
]:
https://gitlab.com/groups/gitlab-org/-/epics/1633
...
...
ee/app/controllers/admin/geo/designs_controller.rb
View file @
e7a362bd
...
...
@@ -3,10 +3,6 @@
class
Admin::Geo::DesignsController
<
Admin
::
Geo
::
ApplicationController
before_action
:check_license!
before_action
do
push_frontend_feature_flag
(
:enable_geo_design_sync
)
end
def
index
end
end
ee/app/controllers/admin/geo/nodes_controller.rb
View file @
e7a362bd
...
...
@@ -3,9 +3,6 @@
class
Admin::Geo::NodesController
<
Admin
::
Geo
::
ApplicationController
before_action
:check_license!
,
except: :index
before_action
:load_node
,
only:
[
:edit
,
:update
]
before_action
only:
[
:index
]
do
push_frontend_feature_flag
(
:enable_geo_design_sync
)
end
# rubocop: disable CodeReuse/ActiveRecord
def
index
...
...
ee/app/services/geo/design_repository_sync_service.rb
View file @
e7a362bd
...
...
@@ -7,8 +7,6 @@ module Geo
private
def
sync_repository
return
if
Feature
.
disabled?
(
:enable_geo_design_sync
)
start_registry_sync!
fetch_repository
mark_sync_as_successful
...
...
ee/app/services/geo/repository_updated_service.rb
View file @
e7a362bd
...
...
@@ -16,7 +16,6 @@ module Geo
def
execute
return
false
unless
Gitlab
::
Geo
.
primary?
return
false
if
design?
&&
Feature
.
disabled?
(
:enable_geo_design_sync
)
reset_repository_checksum!
create_repository_updated_event!
...
...
ee/app/views/layouts/nav/ee/admin/_geo_sidebar.html.haml
View file @
e7a362bd
...
...
@@ -22,11 +22,10 @@
=
link_to
admin_geo_projects_path
,
title:
'Projects'
do
%span
=
_
(
'Projects'
)
-
if
Feature
.
enabled?
(
:enable_geo_design_sync
)
=
nav_link
(
path:
'admin/geo/designs#index'
)
do
=
link_to
admin_geo_designs_path
,
title:
_
(
'Designs'
)
do
%span
=
_
(
'Designs'
)
=
nav_link
(
path:
'admin/geo/designs#index'
)
do
=
link_to
admin_geo_designs_path
,
title:
_
(
'Designs'
)
do
%span
=
_
(
'Designs'
)
=
nav_link
(
path:
'admin/geo/uploads#index'
)
do
=
link_to
admin_geo_uploads_path
,
title:
'Uploads'
do
%span
...
...
ee/app/workers/geo/design_repository_sync_worker.rb
View file @
e7a362bd
...
...
@@ -15,10 +15,7 @@ module Geo
end
def
perform
(
project_id
)
return
if
Feature
.
disabled?
(
:enable_geo_design_sync
)
registry
=
Geo
::
DesignRegistry
.
find_or_initialize_by
(
project_id:
project_id
)
# rubocop: disable CodeReuse/ActiveRecord
project
=
registry
.
project
if
project
.
nil?
...
...
ee/changelogs/unreleased/36096-geo-make-project-designs-repository-general-available.yml
0 → 100644
View file @
e7a362bd
---
title
:
Geo - Replicate project designs repositories
merge_request
:
22544
author
:
type
:
added
ee/lib/gitlab/geo/log_cursor/events/design_repository_updated_event.rb
View file @
e7a362bd
...
...
@@ -29,10 +29,6 @@ module Gitlab
end
end
def
skippable?
Feature
.
disabled?
(
:enable_geo_design_sync
)
end
def
log_event
(
job_id
)
logger
.
event_info
(
created_at
,
...
...
ee/lib/tasks/geo.rake
View file @
e7a362bd
...
...
@@ -339,12 +339,10 @@ namespace :geo do
puts
using_percentage
(
current_node_status
.
container_repositories_synced_in_percentage
)
end
if
Feature
.
enabled?
(
:enable_geo_design_sync
)
print
'Design repositories: '
.
rjust
(
GEO_STATUS_COLUMN_WIDTH
)
show_failed_value
(
current_node_status
.
design_repositories_failed_count
)
print
"
#{
current_node_status
.
design_repositories_synced_count
||
0
}
/
#{
current_node_status
.
design_repositories_count
||
0
}
"
puts
using_percentage
(
current_node_status
.
design_repositories_synced_in_percentage
)
end
print
'Design repositories: '
.
rjust
(
GEO_STATUS_COLUMN_WIDTH
)
show_failed_value
(
current_node_status
.
design_repositories_failed_count
)
print
"
#{
current_node_status
.
design_repositories_synced_count
||
0
}
/
#{
current_node_status
.
design_repositories_count
||
0
}
"
puts
using_percentage
(
current_node_status
.
design_repositories_synced_in_percentage
)
if
Gitlab
::
CurrentSettings
.
repository_checks_enabled
print
'Repositories Checked: '
.
rjust
(
GEO_STATUS_COLUMN_WIDTH
)
...
...
ee/spec/lib/gitlab/geo/log_cursor/events/design_repository_updated_event_spec.rb
View file @
e7a362bd
...
...
@@ -36,53 +36,31 @@ describe Gitlab::Geo::LogCursor::Events::DesignRepositoryUpdatedEvent, :clean_gi
end
describe
'#process'
do
context
'when the
feature flag is disabled
'
do
context
'when the
associated shard is healthy
'
do
before
do
stub_feature_flags
(
enable_geo_design_sync:
fals
e
)
allow
(
Gitlab
::
ShardHealthCache
).
to
receive
(
:healthy_shard?
).
with
(
'default'
).
and_return
(
tru
e
)
end
it
'does not create a design registry'
do
expect
{
subject
.
process
}.
not_to
change
(
Geo
::
DesignRegistry
,
:count
)
end
it_behaves_like
'DesignRepositoryUpdatedEvent'
it
'
does not schedule a Geo::DesignRepositorySyncWorker job
'
do
expect
(
Geo
::
DesignRepositorySyncWorker
).
not_to
receive
(
:perform_async
).
with
(
project
.
id
)
it
'
schedules a Geo::DesignRepositorySyncWorker
'
do
expect
(
Geo
::
DesignRepositorySyncWorker
).
to
receive
(
:perform_async
).
with
(
project
.
id
).
once
subject
.
process
end
end
context
'when
the feature flag is disabled
'
do
context
'when
associated shard is unhealthy
'
do
before
do
stub_feature_flags
(
enable_geo_design_sync:
true
)
end
context
'when the associated shard is healthy'
do
before
do
allow
(
Gitlab
::
ShardHealthCache
).
to
receive
(
:healthy_shard?
).
with
(
'default'
).
and_return
(
true
)
end
it_behaves_like
'DesignRepositoryUpdatedEvent'
it
'schedules a Geo::DesignRepositorySyncWorker'
do
expect
(
Geo
::
DesignRepositorySyncWorker
).
to
receive
(
:perform_async
).
with
(
project
.
id
).
once
subject
.
process
end
allow
(
Gitlab
::
ShardHealthCache
).
to
receive
(
:healthy_shard?
).
with
(
'default'
).
and_return
(
false
)
end
context
'when associated shard is unhealthy'
do
before
do
allow
(
Gitlab
::
ShardHealthCache
).
to
receive
(
:healthy_shard?
).
with
(
'default'
).
and_return
(
false
)
end
it_behaves_like
'DesignRepositoryUpdatedEvent'
it_behaves_like
'DesignRepositoryUpdatedEvent'
it
'does not schedule a Geo::DesignRepositorySyncWorker job'
do
expect
(
Geo
::
DesignRepositorySyncWorker
).
not_to
receive
(
:perform_async
).
with
(
project
.
id
)
it
'does not schedule a Geo::DesignRepositorySyncWorker job'
do
expect
(
Geo
::
DesignRepositorySyncWorker
).
not_to
receive
(
:perform_async
).
with
(
project
.
id
)
subject
.
process
end
subject
.
process
end
end
end
...
...
ee/spec/services/geo/repository_updated_service_spec.rb
View file @
e7a362bd
...
...
@@ -94,12 +94,6 @@ describe Geo::RepositoryUpdatedService do
it
'creates a design repository updated event'
do
expect
{
subject
.
execute
}.
to
change
(
Geo
::
RepositoryUpdatedEvent
,
:count
).
by
(
1
)
end
it
'does not create a design repository updated event when feature is disabled'
do
stub_feature_flags
(
enable_geo_design_sync:
false
)
expect
{
subject
.
execute
}.
not_to
change
(
Geo
::
RepositoryUpdatedEvent
,
:count
)
end
end
end
end
ee/spec/workers/geo/design_repository_sync_worker_spec.rb
View file @
e7a362bd
...
...
@@ -15,16 +15,6 @@ describe Geo::DesignRepositorySyncWorker, :geo do
expect
(
service
).
to
have_received
(
:execute
)
end
it
'does not run DesignRepositorySyncService if feature is disabled'
do
project
=
create
(
:project
)
stub_feature_flags
(
enable_geo_design_sync:
false
)
expect
(
Geo
::
DesignRepositorySyncService
).
not_to
receive
(
:new
)
described_class
.
new
.
perform
(
project
.
id
)
end
it
'logs error when repository does not exist'
do
worker
=
described_class
.
new
...
...
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