After upgrade to 18.1.0, gitlab:doctor:secrets fails with ActiveModel::MissingAttributeError

Summary

After upgrading GitLab EE (omnibus) from 17.11.4-ee.0 to 18.1.0-ee.0, the command sudo gitlab-rake gitlab:doctor:secrets fails with error:

ActiveModel::MissingAttributeError: missing attribute 'encrypted_url_variables' for WebHook

Steps to reproduce

  • Install GitLab EE 17.11.4-ee.0 (omnibus)
  • Upgrade to version 18.1.0-ee.0
  • Run the command sudo gitlab-rake gitlab:doctor:secrets

What is the current bug behavior?

The command sudo gitlab-rake gitlab:doctor:secrets fails with error:

ActiveModel::MissingAttributeError: missing attribute 'encrypted_url_variables' for WebHook

What is the expected correct behavior?

The command should complete without errors

Relevant logs and/or screenshots

Output of the command sudo gitlab-rake gitlab:doctor:secrets:

$ sudo gitlab-rake gitlab:doctor:secrets
I, [2025-06-24T08:53:52.353081 #2570830]  INFO -- : Checking encrypted values in the database
I, [2025-06-24T08:54:02.838350 #2570830]  INFO -- : - DependencyProxy::GroupSetting failures: 0
I, [2025-06-24T08:54:02.842984 #2570830]  INFO -- : - VirtualRegistries::Packages::Maven::Upstream failures: 0
I, [2025-06-24T08:54:02.847133 #2570830]  INFO -- : - Ai::ActiveContext::Connection failures: 0
I, [2025-06-24T08:54:02.883876 #2570830]  INFO -- : - CloudConnector::Keys failures: 0
I, [2025-06-24T08:54:02.901908 #2570830]  INFO -- : - ApplicationSetting failures: 0
I, [2025-06-24T08:54:02.913315 #2570830]  INFO -- : - Ci::PipelineScheduleInput failures: 0
I, [2025-06-24T08:54:02.919425 #2570830]  INFO -- : - Packages::Debian::ProjectDistributionKey failures: 0
I, [2025-06-24T08:54:02.924927 #2570830]  INFO -- : - Packages::Debian::GroupDistributionKey failures: 0
I, [2025-06-24T08:54:02.930699 #2570830]  INFO -- : - Clusters::Providers::Gcp failures: 0
I, [2025-06-24T08:54:02.936453 #2570830]  INFO -- : - Clusters::Providers::Aws failures: 0
I, [2025-06-24T08:54:02.938825 #2570830]  INFO -- : - Clusters::Integrations::Prometheus failures: 0
I, [2025-06-24T08:54:02.944105 #2570830]  INFO -- : - ServiceDesk::CustomEmailVerification failures: 0
I, [2025-06-24T08:54:02.949294 #2570830]  INFO -- : - ServiceDesk::CustomEmailCredential failures: 0
I, [2025-06-24T08:54:02.971251 #2570830]  INFO -- : - Integrations::ZentaoTrackerData failures: 0
I, [2025-06-24T08:54:02.993623 #2570830]  INFO -- : - Integrations::JiraTrackerData failures: 0
I, [2025-06-24T08:54:03.015395 #2570830]  INFO -- : - Integrations::IssueTrackerData failures: 0
I, [2025-06-24T08:54:03.021672 #2570830]  INFO -- : - IncidentManagement::ProjectIncidentManagementSetting failures: 0
I, [2025-06-24T08:54:03.026335 #2570830]  INFO -- : - ErrorTracking::ProjectErrorTrackingSetting failures: 0
I, [2025-06-24T08:54:03.046874 #2570830]  INFO -- : - Clusters::KubernetesNamespace failures: 0
I, [2025-06-24T08:54:03.053050 #2570830]  INFO -- : - CloudConnector::ServiceAccessToken failures: 0
I, [2025-06-24T08:54:03.057366 #2570830]  INFO -- : - BulkImports::Configuration failures: 0
I, [2025-06-24T08:54:03.061825 #2570830]  INFO -- : - Atlassian::Identity failures: 0
I, [2025-06-24T08:54:03.066435 #2570830]  INFO -- : - Alerting::ProjectAlertingSetting failures: 0
I, [2025-06-24T08:54:03.072214 #2570830]  INFO -- : - SlackIntegration failures: 0
I, [2025-06-24T08:54:03.075560 #2570830]  INFO -- : - RemoteMirror failures: 0
I, [2025-06-24T08:54:03.108847 #2570830]  INFO -- : - ProjectSetting failures: 0
I, [2025-06-24T08:54:03.114526 #2570830]  INFO -- : - PagesDomainAcmeOrder failures: 0
I, [2025-06-24T08:54:03.133499 #2570830]  INFO -- : - PagesDomain failures: 0
I, [2025-06-24T08:54:03.139237 #2570830]  INFO -- : - JiraConnectInstallation failures: 0
I, [2025-06-24T08:54:03.145302 #2570830]  INFO -- : - GrafanaIntegration failures: 0
I, [2025-06-24T08:54:03.150895 #2570830]  INFO -- : - ChatName failures: 0
I, [2025-06-24T08:54:03.153264 #2570830]  INFO -- : - DependencyProxy::Packages::Setting failures: 0
I, [2025-06-24T08:54:03.158179 #2570830]  INFO -- : - SystemAccess::MicrosoftGraphAccessToken failures: 0
I, [2025-06-24T08:54:03.163113 #2570830]  INFO -- : - SystemAccess::MicrosoftApplication failures: 0
I, [2025-06-24T08:54:03.168686 #2570830]  INFO -- : - SystemAccess::GroupMicrosoftGraphAccessToken failures: 0
I, [2025-06-24T08:54:03.173907 #2570830]  INFO -- : - SystemAccess::GroupMicrosoftApplication failures: 0
I, [2025-06-24T08:54:03.178631 #2570830]  INFO -- : - StatusPage::ProjectSetting failures: 0
I, [2025-06-24T08:54:03.195796 #2570830]  INFO -- : - ComplianceManagement::ComplianceFramework::ComplianceRequirementsControl failures: 0
I, [2025-06-24T08:54:03.201334 #2570830]  INFO -- : - AuditEvents::Instance::ExternalStreamingDestination failures: 0
I, [2025-06-24T08:54:03.206593 #2570830]  INFO -- : - AuditEvents::Group::ExternalStreamingDestination failures: 0
I, [2025-06-24T08:54:03.213249 #2570830]  INFO -- : - AuditEvents::Instance::GoogleCloudLoggingConfiguration failures: 0
I, [2025-06-24T08:54:03.218536 #2570830]  INFO -- : - AuditEvents::Instance::AmazonS3Configuration failures: 0
I, [2025-06-24T08:54:03.223968 #2570830]  INFO -- : - AuditEvents::AmazonS3Configuration failures: 0
I, [2025-06-24T08:54:03.228823 #2570830]  INFO -- : - AuditEvents::GoogleCloudLoggingConfiguration failures: 0
I, [2025-06-24T08:54:03.233154 #2570830]  INFO -- : - AuditEvents::InstanceExternalAuditEventDestination failures: 0
I, [2025-06-24T08:54:03.238083 #2570830]  INFO -- : - Ai::SelfHostedModel failures: 0
I, [2025-06-24T08:54:03.244141 #2570830]  INFO -- : - MergeRequests::ExternalStatusCheck failures: 0
I, [2025-06-24T08:54:03.250766 #2570830]  INFO -- : - AlertManagement::HttpIntegration failures: 0
I, [2025-06-24T08:54:03.256073 #2570830]  INFO -- : - RemoteDevelopment::WorkspaceVariable failures: 0
I, [2025-06-24T08:54:03.261151 #2570830]  INFO -- : - Clusters::Agents::UrlConfiguration failures: 0
I, [2025-06-24T08:54:03.262426 #2570830]  INFO -- : - EE::Gitlab::BackgroundMigration::FixIncompleteInstanceExternalAuditDestinations::InstanceStreamingDestination failures: 0
I, [2025-06-24T08:54:03.263625 #2570830]  INFO -- : - EE::Gitlab::BackgroundMigration::FixIncompleteInstanceExternalAuditDestinations::InstanceExternalAuditEventDestination failures: 0
I, [2025-06-24T08:54:03.264884 #2570830]  INFO -- : - EE::Gitlab::BackgroundMigration::FixIncompleteExternalAuditDestinations::GroupStreamingDestination failures: 0
I, [2025-06-24T08:54:03.266601 #2570830]  INFO -- : - EE::Gitlab::BackgroundMigration::CreateMissingExternalLinksForVulnerabilities::JiraTrackerData failures: 0
rake aborted!
ActiveModel::MissingAttributeError: missing attribute 'encrypted_url_variables' for WebHook
/opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/web_hooks/hook.rb:196:in `initialize_url_variables'
/opt/gitlab/embedded/service/gitlab-rails/gems/activerecord-gitlab/lib/active_record/gitlab_patches/rescue_from.rb:31:in `exec_queries'
/opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/each_batch.rb:65:in `each_batch'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/doctor/secrets.rb:67:in `block (2 levels) in check_model_attributes'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/doctor/secrets.rb:129:in `with_skipped_callbacks_for'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/doctor/secrets.rb:61:in `block in check_model_attributes'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/doctor/secrets.rb:58:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/doctor/secrets.rb:58:in `check_model_attributes'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/doctor/secrets.rb:30:in `run!'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/doctor/secrets.rake:11:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:25:in `load'
/opt/gitlab/embedded/bin/bundle:25:in `<main>'
Tasks: TOP => gitlab:doctor:secrets
(See full trace by running task with --trace)

Results of GitLab environment info

Expand for output related to GitLab environment info

```
System information
System:         Debian 11
Proxy:          no
Current User:   git
Using RVM:      no
Ruby Version:   3.2.5
Gem Version:    3.6.9
Bundler Version:2.6.9
Rake Version:   13.0.6
Redis Version:  7.2.9
Sidekiq Version:7.3.9
Go Version:     unknown

GitLab information
Version:        18.1.0-ee
Revision:       e0f3b86408a
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     PostgreSQL
DB Version:     16.8
URL:            https://REMOVED
HTTP Clone URL: https://REMOVED/some-group/some-project.git
SSH Clone URL:  git@REMOVED:some-group/some-project.git
Elasticsearch:  no
Geo:            no
Using LDAP:     no
Using Omniauth: yes
Omniauth Providers: openid_connect, auth0

GitLab Shell
Version:        14.42.0
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.1.0
- default Git Version:  2.49.0.gl2
```

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.42.0 ? ... OK (14.42.0)
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: ... LDAP is disabled in config/gitlab.yml

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
5/2 ... yes
15/3 ... yes
5/4 ... yes
123/5 ... yes
4/6 ... yes
34/7 ... yes
34/8 ... yes
34/9 ... yes
34/10 ... yes
123/11 ... yes
8/13 ... yes
44/15 ... yes
49/17 ... yes
28/19 ... yes
146/20 ... yes
56/21 ... yes
45/22 ... yes
59/23 ... yes
51/24 ... yes
28/25 ... yes
45/26 ... yes
45/27 ... yes
66/28 ... yes
45/31 ... yes
45/32 ... yes
8/33 ... yes
4/34 ... yes
74/35 ... yes
51/36 ... yes
45/37 ... yes
51/38 ... yes
51/39 ... yes
80/40 ... yes
51/41 ... yes
83/42 ... yes
51/43 ... yes
86/44 ... yes
42/45 ... yes
51/46 ... yes
30/48 ... yes
4/49 ... yes
28/50 ... yes
99/51 ... yes
28/52 ... yes
102/53 ... yes
4/54 ... yes
51/55 ... yes
106/57 ... yes
109/58 ... yes
51/59 ... yes
112/60 ... yes
30/62 ... yes
8/65 ... yes
126/66 ... yes
80/67 ... yes
10/68 ... yes
28/69 ... yes
136/70 ... yes
4/71 ... yes
297/72 ... yes
143/73 ... yes
102/74 ... yes
146/75 ... yes
4/76 ... yes
14/77 ... yes
51/78 ... yes
102/79 ... yes
156/80 ... yes
161/81 ... yes
4/82 ... yes
167/83 ... yes
93/84 ... yes
170/85 ... yes
102/86 ... yes
102/87 ... yes
138/88 ... yes
14/89 ... yes
176/90 ... yes
182/91 ... yes
6/92 ... yes
185/94 ... yes
102/95 ... yes
51/96 ... yes
161/97 ... yes
4/98 ... yes
197/99 ... yes
4/100 ... yes
161/101 ... yes
202/102 ... yes
102/103 ... yes
14/104 ... yes
206/105 ... yes
161/106 ... yes
202/107 ... yes
185/108 ... yes
4/109 ... yes
4/110 ... yes
51/111 ... yes
51/112 ... yes
51/113 ... yes
219/114 ... yes
219/115 ... yes
4/116 ... yes
224/117 ... yes
4/118 ... yes
99/119 ... yes
126/120 ... yes
45/122 ... yes
224/123 ... yes
4/124 ... yes
241/125 ... yes
241/126 ... yes
51/127 ... yes
45/129 ... yes
250/130 ... yes
241/131 ... yes
146/132 ... yes
51/133 ... yes
258/134 ... yes
336/136 ... yes
6/137 ... yes
51/138 ... yes
266/140 ... yes
266/141 ... yes
266/142 ... yes
6/143 ... yes
56/144 ... yes
4/145 ... yes
258/146 ... yes
274/147 ... yes
274/149 ... yes
123/150 ... yes
4/151 ... yes
185/152 ... yes
56/154 ... yes
8/155 ... yes
202/157 ... yes
51/158 ... yes
278/159 ... yes
45/160 ... yes
138/162 ... yes
297/163 ... yes
4/164 ... yes
51/165 ... yes
219/167 ... yes
308/168 ... yes
308/169 ... yes
311/171 ... yes
278/172 ... yes
317/173 ... yes
30/174 ... yes
320/175 ... yes
320/176 ... yes
324/177 ... yes
326/178 ... yes
28/179 ... yes
336/180 ... yes
28/181 ... yes
233/182 ... yes
336/183 ... yes
51/184 ... yes
343/185 ... yes
308/186 ... yes
56/187 ... yes
254/188 ... yes
136/189 ... yes
349/190 ... yes
343/191 ... yes
102/192 ... yes
336/193 ... yes
56/194 ... yes
170/195 ... yes
317/196 ... yes
219/197 ... yes
364/198 ... yes
366/199 ... yes
51/200 ... yes
45/201 ... yes
375/202 ... yes
45/203 ... yes
143/204 ... yes
364/205 ... yes
106/206 ... yes
278/207 ... yes
51/208 ... yes
106/209 ... yes
51/211 ... yes
66/212 ... yes
51/213 ... yes
51/214 ... yes
80/215 ... yes
349/216 ... yes
258/217 ... yes
397/218 ... yes
397/219 ... yes
4/220 ... yes
402/221 ... yes
404/222 ... yes
343/223 ... yes
397/224 ... yes
397/225 ... yes
Redis version >= 6.2.14? ... yes
Ruby version >= 3.0.6 ? ... yes (3.2.5)
Git user has default SSH configuration? ... yes
Active users: ... 66
Is authorized keys file accessible? ... yes
GitLab configured to store new projects in hashed storage? ... yes
All projects are in hashed storage? ... yes
Elasticsearch version 7.x-9.x or OpenSearch version 1.x-3.x ... skipped (advanced search is disabled)
All migrations must be finished before doing a major upgrade ... skipped (Advanced Search is disabled)

Checking GitLab App ... Finished


Checking GitLab subtasks ... Finished
Edited by 🤖 GitLab Bot 🤖