diff options
Diffstat (limited to 'doc/development/geo/framework.md')
-rw-r--r-- | doc/development/geo/framework.md | 52 |
1 files changed, 46 insertions, 6 deletions
diff --git a/doc/development/geo/framework.md b/doc/development/geo/framework.md index b720a6ca47e..55f4be07bb4 100644 --- a/doc/development/geo/framework.md +++ b/doc/development/geo/framework.md @@ -1,3 +1,9 @@ +--- +stage: Enablement +group: Geo +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers +--- + # Geo self-service framework (alpha) NOTE: **Note:** @@ -91,8 +97,6 @@ module Geo ::Packages::PackageFile end - # Change this to `true` to release replication of this model. Then remove - # this override in the next release. # The feature flag follows the format `geo_#{replicable_name}_replication`, # so here it would be `geo_package_file_replication` def self.replication_enabled_by_default? @@ -193,7 +197,9 @@ For example, to add support for files referenced by a `Widget` model with a file_store == ObjectStorage::Store::LOCAL end - def self.replicables_for_geo_node + # @param primary_key_in [Range, Widget] arg to pass to primary_key_in scope + # @return [ActiveRecord::Relation<Widget>] everything that should be synced to this node, restricted by primary key + def self.replicables_for_current_secondary(primary_key_in) # Should be implemented. The idea of the method is to restrict # the set of synced items depending on synchronization settings end @@ -220,8 +226,6 @@ For example, to add support for files referenced by a `Widget` model with a model_record.file end - # Change this to `true` to release replication of this model. Then remove - # this override in the next release. # The feature flag follows the format `geo_#{replicable_name}_replication`, # so here it would be `geo_widget_replication` def self.replication_enabled_by_default? @@ -637,7 +641,7 @@ the Admin Area UI, and Prometheus! include ::Types::Geo::RegistryType graphql_name 'WidgetRegistry' - description 'Represents the sync and verification state of a widget' + description 'Represents the Geo sync and verification state of a widget' field :widget_id, GraphQL::ID_TYPE, null: false, description: 'ID of the Widget' end @@ -676,6 +680,12 @@ the Admin Area UI, and Prometheus! } ``` +1. Update the GraphQL reference documentation: + + ```shell + bundle exec rake gitlab:graphql:compile_docs + ``` + Individual widget synchronization and verification data should now be available via the GraphQL API! @@ -693,3 +703,33 @@ To do: This should be done as part of Widget sync and verification data (aggregate and individual) should now be available in the Admin UI! + +#### Releasing the feature + +1. In `ee/app/replicators/geo/widget_replicator.rb`, delete the `self.replication_enabled_by_default?` method: + + ```ruby + module Geo + class WidgetReplicator < Gitlab::Geo::Replicator + ... + + # REMOVE THIS METHOD + def self.replication_enabled_by_default? + false + end + # REMOVE THIS METHOD + + ... + end + end + ``` + +1. In `ee/app/graphql/types/geo/geo_node_type.rb`, remove the `feature_flag` option for the released type: + + ```ruby + field :widget_registries, ::Types::Geo::WidgetRegistryType.connection_type, + null: true, + resolver: ::Resolvers::Geo::WidgetRegistriesResolver, + description: 'Find widget registries on this Geo node', + feature_flag: :geo_widget_replication # REMOVE THIS LINE + ``` |