Gitlab::BackgroundMigration.remaining and Gitlab::Database::BackgroundMigrationJob.pending.count are not recognized
Summary
After update from 18.2.6 to 18.4.0, both Gitlab::BackgroundMigration.remaining and Gitlab::Database::BackgroundMigrationJob.pending.count don't seem to be recognized, although they are still documented here.
In my organization, for upgrades via Ansible we use these two for checks, along with echo "select job_class_name, table_name, column_name, job_arguments from batched_background_migrations where status NOT IN(3, 6);" | gitlab-psql for batch migrations. Should we be doing this differently?
Steps to reproduce
- Open terminal in host with Gitlab (installed via linux omnibus package)
- Run either:
sudo gitlab-rails runner -e production 'puts Gitlab::BackgroundMigration.remaining'sudo gitlab-rails runner -e production 'puts Gitlab::Database::BackgroundMigrationJob.pending.count'
What is the current bug behavior?
fzadikian@parranda:~$ sudo gitlab-rails runner -e production 'puts Gitlab::BackgroundMigration.remaining'
Please specify a valid ruby command or the path of a script to run.
Run 'bin/rails runner -h' for help.
undefined method `remaining' for Gitlab::BackgroundMigration:Module
fzadikian@parranda:~$ sudo gitlab-rails runner -e production 'puts Gitlab::Database::BackgroundMigrationJob.pending.count'
Please specify a valid ruby command or the path of a script to run.
Run 'bin/rails runner -h' for help.
uninitialized constant Gitlab::Database::BackgroundMigrationJob
What is the expected correct behavior?
Show background migrations that remain in the Sidekiq queue and background migrations stuck in ‘pending’ state, respectively.
Results of GitLab environment info
Expand for output related to GitLab environment info
System information
System: Debian 12
Current User: git
Using RVM: no
Ruby Version: 3.2.8
Gem Version: 3.7.1
Bundler Version:2.7.1
Rake Version: 13.0.6
Redis Version: 7.2.10
Sidekiq Version:7.3.9
Go Version: unknown
GitLab information
Version: 18.4.1
Revision: e88a8d1d1c2
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: PostgreSQL
DB Version: 16.10
URL: https://parranda.interior.edu.uy
HTTP Clone URL: https://parranda.interior.edu.uy/some-group/some-project.git
SSH Clone URL: git@parranda.interior.edu.uy:some-group/some-project.git
Using LDAP: yes
Using Omniauth: yes
Omniauth Providers:
GitLab Shell
Version: 14.45.2
Repository storages:
- default: unix:/var/opt/gitlab/gitaly/gitaly.socket
GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell
Gitaly
- default Address: unix:/var/opt/gitlab/gitaly/gitaly.socket
- default Version: 18.4.1
- default Git Version: 2.50.1
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 14.45.2 ? ... OK (14.45.2)
Running /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-check
Internal API available: OK
Redis available via internal API: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes
Number of Sidekiq processes (cluster/worker) ... 1/1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... Server: ldapmain
LDAP authentication... Success
LDAP users with access to your GitLab server (only showing the first 100 results)
User output sanitized. Found 100 users of 100 limit.
Checking LDAP ... Finished
Checking GitLab App ...
Database config exists? ... yes
Tables are truncated? ... skipped
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Cable config exists? ... yes
Resque config exists? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... yes
Systemd unit files or init script exist? ... skipped (omnibus-gitlab has neither init script nor systemd units)
Systemd unit files or init script up-to-date? ... skipped (omnibus-gitlab has neither init script nor systemd units)
Projects have namespace: ...
2/1 ... yes
7/2 ... yes
3/4 ... yes
10/5 ... yes
4/6 ... yes
9/7 ... yes
11/8 ... yes
5/9 ... yes
5/10 ... yes
410/11 ... yes
6/12 ... yes
15/13 ... yes
410/14 ... yes
395/16 ... yes
15/17 ... yes
7/21 ... yes
354/23 ... yes
410/26 ... yes
2/28 ... yes
6/29 ... yes
6/30 ... yes
413/31 ... yes
413/32 ... yes
413/33 ... yes
413/34 ... yes
413/35 ... yes
416/36 ... yes
6/37 ... yes
419/38 ... yes
2/39 ... yes
413/40 ... yes
425/41 ... yes
6/42 ... yes
425/43 ... yes
6/44 ... yes
402/47 ... yes
410/48 ... yes
432/49 ... yes
5/50 ... yes
439/51 ... yes
13/52 ... yes
408/53 ... yes
434/54 ... yes
14/55 ... yes
424/56 ... yes
424/57 ... yes
181/58 ... yes
12/59 ... yes
441/62 ... yes
395/64 ... yes
443/65 ... yes
444/66 ... yes
444/67 ... yes
432/68 ... yes
451/69 ... yes
402/70 ... yes
6/72 ... yes
434/73 ... yes
450/74 ... yes
6/75 ... yes
6/77 ... yes
13/78 ... yes
452/79 ... yes
402/80 ... yes
447/81 ... yes
445/82 ... yes
416/84 ... yes
418/85 ... yes
454/86 ... yes
15/87 ... yes
444/88 ... yes
2/89 ... yes
454/90 ... yes
397/92 ... yes
397/93 ... yes
397/94 ... yes
397/95 ... yes
397/96 ... yes
397/97 ... yes
444/98 ... yes
402/99 ... yes
444/100 ... yes
6/102 ... yes
6/103 ... yes
562/104 ... yes
6/105 ... yes
416/106 ... yes
566/107 ... yes
416/108 ... yes
416/110 ... yes
581/111 ... yes
434/112 ... yes
6/113 ... yes
431/114 ... yes
3/115 ... yes
408/116 ... yes
591/117 ... yes
444/118 ... yes
596/119 ... yes
416/120 ... yes
2/121 ... yes
416/122 ... yes
6/123 ... yes
6/124 ... yes
608/125 ... yes
410/126 ... yes
416/128 ... yes
416/129 ... yes
608/130 ... yes
410/132 ... yes
402/134 ... yes
431/135 ... yes
6/136 ... yes
608/137 ... yes
451/138 ... yes
633/139 ... yes
635/140 ... yes
635/141 ... yes
639/142 ... yes
444/143 ... yes
454/145 ... yes
646/146 ... yes
416/147 ... yes
402/148 ... yes
397/149 ... yes
6/150 ... yes
6/151 ... yes
661/153 ... yes
663/154 ... yes
416/155 ... yes
419/156 ... yes
6/158 ... yes
6/159 ... yes
580/160 ... yes
6/161 ... yes
6/162 ... yes
416/163 ... yes
682/164 ... yes
678/165 ... yes
450/166 ... yes
682/167 ... yes
444/168 ... yes
694/169 ... yes
691/170 ... yes
6/172 ... yes
6/174 ... yes
6/175 ... yes
712/176 ... yes
711/177 ... yes
410/178 ... yes
419/180 ... yes
419/181 ... yes
12/182 ... yes
432/183 ... yes
678/184 ... yes
728/185 ... yes
6/186 ... yes
732/187 ... yes
419/188 ... yes
419/189 ... yes
421/190 ... yes
181/192 ... yes
Redis version >= 6.2.14? ... yes
Ruby version >= 3.0.6 ? ... yes (3.2.8)
Git user has default SSH configuration? ... yes
Active users: ... 124
Is authorized keys file accessible? ... yes
GitLab configured to store new projects in hashed storage? ... yes
All projects are in hashed storage? ... yes
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
Edited by 🤖 GitLab Bot 🤖