Call alter_cell_sequences_range rake on provisioning cells

What does this MR do and why?

This calls the rake introduced in !168941 (merged) while provisioning the cell.

For more info on why we call this from gitlab:db:configure, please refer #465807 (closed).

How to test

  1. Set up cells locally. Make sure you have the topology service enabled.
  2. Change the sequence range in gdk/gitlab-topology-service/config.toml and run gdk restart gitlab-topology-service to apply the new config.
[[cells]]
id = 1
name = "cell-1"
address = "gdk.test:12001"
session_prefix = "cell-1"
sequence_range = [1, 750000]
  1. Check the current min and max sequence values:
gdk-psql

gitlabhq_development=# SELECT DISTINCT(min_value, max_value) FROM pg_sequences WHERE schemaname = 'public';
    row
------------
 (1,100000)
  1. Run rails db:drop db:create and bundle exec rake gitlab:db:configure
❯ bundle exec rake gitlab:db:configure
DEPRECATION WARNING: Support for Rails versions < 7.1 is deprecated and will be removed from ViewComponent 4.0.0 (ViewComponent v4 will remove support for Rails versions < 7.1 no earlier than April 1, 2025) (called from <main> at /Users/leonardodarosa/gdk/gitlab/config/environment.rb:7)
Running db:schema:load:main rake task
Running db:schema:load:ci rake task
Running gitlab:db:alter_cell_sequences_range rake task with (1, 750000)
  1. Check the current min and max sequence values again. Both should be the same as configured in step 2.
gdk-psql

gitlabhq_development=# SELECT DISTINCT(min_value, max_value) FROM pg_sequences WHERE schemaname = 'public';
    row
------------
 (1,750000)

Related to #465807 (closed)

Edited by Leonardo da Rosa

Merge request reports

Loading