Omnibus GitLab automatically sets deprecated registry threshold parameter despite user migration to maxretries
### Summary Omnibus GitLab continues to set deprecated `threshold` values in the registry configuration file even when users have migrated to the new `maxretries` configuration, causing persistent deprecation warnings that cannot be silenced. This prevents users from validating their configuration is correct before the hard removal in GitLab 19.0. ### Steps to reproduce 1. Configure registry notifications in `/etc/gitlab/gitlab.rb` using only the new `maxretries` parameter: ```ruby registry['notifications'] = [ { 'name' => 'test_endpoint', 'url' => 'https://example.com/notify', 'timeout' => '500ms', 'maxretries' => 5, 'backoff' => '1s', 'headers' => { "Authorization" => ["AUTHORIZATION_EXAMPLE_TOKEN"] } } ] ``` 2. Run `gitlab-ctl reconfigure` 3. Check the generated `/var/opt/gitlab/registry/config.yml` file ### What is the current *bug* behavior? Despite not configuring the deprecated `threshold` parameter in `gitlab.rb`, the generated registry configuration file contains both `maxretries` and `threshold` values: ```yaml notifications: endpoints: [{"name":"test_endpoint","url":"https://example.com/notify","timeout":"500ms","maxretries":5,"backoff":"1s","headers":{"Authorization":["AUTHORIZATION_EXAMPLE_TOKEN"]},"threshold":5}] ``` This triggers deprecation warnings during GitLab startup: ``` [2025-09-15T04:24:56+00:00] WARN: * registry['default_notifications_threshold'] has been deprecated since 17.1 and will be removed in 19.0. `registry['default_notifications_threshold'] will be removed in 19.0. Please use `default_notifications_maxretries` instead https://gitlab.com/gitlab-org/container-registry/-/issues/1243. [2025-09-15T04:24:56+00:00] WARN: *registry['notifications'][{threshold => value}] has been deprecated since 17.1 and will be removed in 19.0. Starting with GitLab 19.0, `registry['notifications'][{'threshold'=> value}] will be removed. Please use `maxretries` instead https://gitlab.com/gitlab-org/container-registry/-/issues/1243. ``` ### What is the expected *correct* behavior? 1. When users configure only `maxretries` in their notification endpoints, Omnibus should not automatically add the deprecated `threshold` parameter to the generated configuration 2. The deprecation warnings should only appear when users are actually using the deprecated configuration parameters 3. Users should be able to validate their configuration is compliant before the hard removal in GitLab 19.0 ### Relevant logs <details> <summary> Relevant logs </summary> <pre> [2025-09-15T04:24:54+00:00] INFO: Generating default secrets [2025-09-15T04:24:56+00:00] INFO: Generating /etc/gitlab/gitlab-secrets.json file [2025-09-15T04:24:56+00:00] WARN: * registry['default_notifications_threshold'] has been deprecated since 17.1 and will be removed in 19.0. `registry['default_notifications_threshold'] will be removed in 19.0. Please use `default_notifications_maxretries` instead https://gitlab.com/gitlab-org/container-registry/-/issues/1243. [2025-09-15T04:24:56+00:00] WARN: *registry['notifications'][{threshold => value}] has been deprecated since 17.1 and will be removed in 19.0. Starting with GitLab 19.0, `registry['notifications'][{'threshold'=> value}] will be removed. Please use `maxretries` instead https://gitlab.com/gitlab-org/container-registry/-/issues/1243. </pre> </details> ### Details of package version <details> <summary>Provide the package version installation details</summary> <pre> GitLab 18.3.1 </pre> </details> ### Environment details * Operating System: `Various` * Installation Target, remove incorrect values: * Bare Metal Machine * VM: Digital Ocean, AWS, GCP, Azure, Other * Installation Type, remove incorrect values: * Upgrade from version `17.x to 18.3.1` * Is there any other software running on the machine: `N/A` * Is this a single or multiple node installation? `Both affected` * Resources * CPU: `N/A` * Memory total: `N/A` ### Root Cause Analysis The issue is in the `parse_registry_notifications` method in `files/gitlab-cookbooks/gitlab/libraries/registry.rb` at line 148: ```ruby endpoint['threshold'] ||= user_configuration['default_notifications_threshold'] ``` This line automatically sets the deprecated `threshold` parameter from the default value (`default['registry']['default_notifications_threshold'] = 5` in `files/gitlab-cookbooks/registry/attributes/default.rb`) even when users haven't configured it and are using the new `maxretries` parameter instead. ### Impact 1. **User Experience**: Users cannot validate their configuration is compliant before the hard removal in GitLab 19.0 2. **Operational Risk**: When GitLab 19.0 is released and the container registry re-deprecates these fields, installations will break if Omnibus is still setting default threshold values 3. **Configuration Confusion**: The deprecation warnings appear even for users who have correctly migrated their configuration ### Proposed Solution 1. **Immediate Fix**: Remove the automatic setting of `threshold` from default values when `maxretries` is explicitly configured 2. **Long-term**: Remove the `default_notifications_threshold` default value entirely before GitLab 19.0 to prevent the repeat of the broken release that occurred in 18.0 ### Related Issues - Original deprecation: https://gitlab.com/gitlab-org/container-registry/-/issues/1243 - Postponement MR: https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/8454 - Removal of deprecation warnings: https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/8426 - Issue reported by customer in: https://gitlab.zendesk.com/agent/tickets/656111
issue