Rename move geo namespaced rake tasks to gitlab:geo

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Work on this issue
  • Close this issue

The following discussion from !9988 (merged) should be addressed:

  • @ashmckenzie started a discussion: (+1 comment)

    Was always curious why we have the geo and gitlab:geo rake namespaces. Slightly off topic, but am still curious 😄

Implementation Plan

Reference MR example: !36911 (merged)

Tasks to Migrate

Deprecated Replacement
geo:set_primary_node gitlab:geo:set_primary_node
geo:set_secondary_as_primary gitlab:geo:set_secondary_as_primary
geo:update_primary_node_url gitlab:geo:update_primary_node_url
geo:status gitlab:geo:status
geo:site:role gitlab:geo:site:role
geo:replication:pause gitlab:geo:replication:pause
geo:replication:resume gitlab:geo:replication:resume
geo:dev:ssf_metrics gitlab:geo:dev:ssf_metrics

Implementation Steps

1. Create Deprecation Notice

Create data/deprecations/18-x-geo-rake-task-namespace.yml with removal_milestone: "19.0" (19.0 OR next major milestone).

Then run: bin/rake gitlab:docs:compile_deprecations

2. Add New Tasks & Deprecate Old Ones

Action Files
Add new task implementations ee/lib/tasks/gitlab/geo.rake
ee/lib/tasks/gitlab/geo/replication.rake (create)
ee/lib/tasks/gitlab/geo/dev.rake (create)
Convert old tasks to deprecation wrappers ee/lib/tasks/geo.rake
ee/lib/tasks/geo/replication.rake
ee/lib/tasks/geo/dev.rake

Deprecation wrapper pattern:

task set_primary_node: :environment do
  puts Rainbow("WARNING: `rake geo:set_primary_node` is deprecated. Use `gitlab:geo:set_primary_node`.").yellow
  Rake::Task['gitlab:geo:set_primary_node'].invoke
end

3. Update Specs

Action Files
Add tests for new tasks ee/spec/tasks/gitlab/geo_rake_spec.rb
ee/spec/tasks/gitlab/geo/replication_rake_spec.rb (create)
Update deprecated task tests ee/spec/tasks/geo_rake_spec.rb

4. Update Documentation

  • doc/administration/geo/disaster_recovery/_index.md
  • doc/administration/geo/disaster_recovery/failover_troubleshooting.md
  • doc/administration/geo/replication/troubleshooting/common.md
  • doc/administration/geo/replication/troubleshooting/postgresql_replication.md
  • doc/update/zero_downtime.md
  • doc/administration/logs/log_parsing.md
  • .gitlab/issue_templates/Geo Replicate a new Git repository type.md
  • .gitlab/issue_templates/Geo Replicate a new blob type.md

5. External Repositories

Open follow-up issues for:

  • omnibus-gitlab - Update CLI commands invoking geo rake tasks
  • charts/gitlab - Documentation updates

6. Removal (GitLab 19.0 (or next major version after implementation))

Delete deprecated wrappers from ee/lib/tasks/geo.rake, ee/lib/tasks/geo/replication.rake, and ee/lib/tasks/geo/dev.rake.

Timeline

Version Action
18.x Add deprecation YAML + new tasks + runtime warnings
19.0 Remove deprecated tasks
Edited Jan 30, 2026 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading