Geo: Redirect the replicable details page when replication is disabled
Problem
The Geo replicable details page uses a generic route, /admin/geo/sites/:id/replication/:replicable_name_plural, defined in ee/config/routes/instance_admin.rb. Admin::Geo::ReplicablesController#set_replicator_class resolves the name through Gitlab::Geo::Replicator.for_replicable_name and returns 404 only when no replicator class exists.
Every replicable has a geo_<name>_replication ops feature flag. When an administrator disables one, the replicator class still exists, so the URL still resolves. The page renders, but the GraphQL registries resolver returns nothing for a disabled replicator. The admin sees an empty table with no explanation. The Geo Sites page no longer links to the page, because #591685 (closed) hides disabled replicables, so the only way to reach it is a bookmark or an old runbook link.
Proposal
When a replicator is disabled, redirect the admin to the Geo Sites page with a flash notice explaining why, instead of showing an empty table. This covers every disabled replicable and matches the hide-disabled behaviour introduced in #591685 (closed).
Replicables that belong to a group, such as the upload partitions, are handled separately by #628547 (closed), which renders an overview page at the group URL. That branch runs before this check.
Implementation plan
- In
ReplicablesController#index, add a check for@replicator_class.replication_enabled?, placed after the existing legacy-route redirect. - When disabled, redirect to
admin_geo_nodes_pathwith a flash notice, for example "Replication of Uploads is disabled on this site." using the replicable's own title. - Keep
showbehaviour unchanged. Apply the same redirect there later if it turns out to be reachable. - Do not add aliases for removed replicables. A removed replicator should keep returning 404.
- Add request specs in
ee/spec/requests/admin/geo/replicables_controller_spec.rb:- Enabled replicable renders normally.
- Disabled replicable redirects to the Geo Sites page with the notice.
- Unknown replicable still returns 404.
- Add changelog trailers:
Changelog: changed,EE: true.
Out of scope
- Any change to the replicable detail pages themselves.
- Group overview pages, tracked in #628547 (closed).