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
- Set up cells locally. Make sure you have the topology service enabled.
- Change the sequence range in
gdk/gitlab-topology-service/config.tomland rungdk restart gitlab-topology-serviceto apply the new config.
[[cells]]
id = 1
name = "cell-1"
address = "gdk.test:12001"
session_prefix = "cell-1"
sequence_range = [1, 750000]
- Check the current
minandmaxsequence values:
gdk-psql
gitlabhq_development=# SELECT DISTINCT(min_value, max_value) FROM pg_sequences WHERE schemaname = 'public';
row
------------
(1,100000)
- Run
rails db:drop db:createandbundle 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)
- Check the current
minandmaxsequence 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