Skip to content

Add Geo rake task descriptions

Toon Claes requested to merge tc-geo-document-rake-tasks into master

What does this MR do?

To increase visibility of Geo rake tasks, add description so rake -T shows them.

Output

​❯ bundle exec rake -T | grep geo
rake geo:db:create               # Creates the Geo tracking database from config/database_geo.yml for the current RAILS_ENV
rake geo:db:drop                 # Drops the Geo tracking database from config/database_geo.yml for the current RAILS_ENV
rake geo:db:migrate              # Migrate the Geo tracking database (options: VERSION=x, VERBOSE=false, SCOPE=blog)
rake geo:db:migrate:down         # Runs the "down" for a given migration VERSION
rake geo:db:migrate:redo         # Rollbacks the database one migration and re migrate up (options: STEP=x, VERSION=x)
rake geo:db:migrate:up           # Runs the "up" for a given migration VERSION
rake geo:db:reset                # Drops and recreates the database from db/geo/schema.rb for the current environment and loads the seeds
rake geo:db:rollback             # Rolls the schema back to the previous version (specify steps w/ STEP=n)
rake geo:db:schema:dump          # Create a db/geo/schema.rb file that is portable against any DB supported by AR
rake geo:db:schema:load          # Load a db/geo/schema.rb file into the database
rake geo:db:seed                 # Load the seed data from db/geo/seeds.rb
rake geo:db:setup                # Create the Geo tracking database, load the schema, and initialize with the seed data
rake geo:db:show_encryption_key  # Display database encryption key
rake geo:db:test:prepare         # Check for pending migrations and load the test schema
rake geo:db:version              # Retrieves the current schema version number
rake geo:set_primary_node        # Make this node the Geo primary
rake gitlab:geo:check            # GitLab | Check Geo configuration and dependencies

Is there anything the reviewer should double check?

We could just use desc Rake::Task["db:#{task_name}"].comment, but I choose not to because:

  • Some tasks do not have a description in the db namespace, so they still won't have a description
  • We can use the correct paths for config/database_geo.yml and db/geo/schema.rb

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes gitlab-org/gitlab-ee#3366

Edited by Nick Thomas

Merge request reports

Loading