You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before you create a new issue, please make sure to search in https://gitlab.com/gitlab-org/omnibus-gitlab/issues,
5
+
to verify that the issue you are about to submit isn't a duplicate.
6
+
-->
7
+
8
+
## Remove deprecation messages
9
+
10
+
<!--
11
+
List here the deprecation messages you want to remove.
12
+
-->
13
+
14
+
### Preparation when creating the Issue
15
+
16
+
-[ ] List all the [Remove deprecation messages](#remove-deprecation-messages) section all the deprecations you want to remove.
17
+
-[ ] Set the milestone of this issue to [next planned required stop](https://docs.gitlab.com/ee/update/index.html#upgrade-paths), which should be after
18
+
the milestone when the configuration will be removed.
19
+
20
+
### Preparation when executing the Issue
21
+
22
+
-[ ] Verify that the related configuration got indeed removed in a previous milestone.
23
+
-[ ] Make sure the MR removing the deprecation message is released on a [required stop](https://docs.gitlab.com/ee/update/index.html#upgrade-paths)
24
+
which is later than the removal of the configuration.
Copy file name to clipboardExpand all lines: doc/development/adding-deprecation-messages.md
+89-9Lines changed: 89 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,31 @@ group: Distribution
4
4
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
5
5
---
6
6
7
-
# Adding deprecation messages
7
+
# Omnibus GitLab deprecation process
8
+
9
+
Besides following the [GitLab deprecation guidelines](https://about.gitlab.com/handbook/product/gitlab-the-product/#deprecations-removals-and-breaking-changes), we should also add deprecation messages
10
+
to the Omnibus GitLab package.
11
+
12
+
Notifying GitLab administrators of the deprecation and removal of features through deprecation messages consists of:
If a configuration has to be deprecated, it has to be added to that list with
12
-
proper details.
13
-
14
-
## Example
31
+
proper details. For example:
15
32
16
33
```ruby
17
34
deprecations = [
@@ -33,18 +50,81 @@ deprecations = [
33
50
34
51
### `config_keys`
35
52
36
-
`config_keys` represents a list of keys, which can be used to traverse the configuration hash available from `/opt/gitlab/embedded/nodes/{fqdn}.json` to reach a specific configuration. For example `%w(mattermost log_file_directory)` means `mattermost['log_file_directory']` setting. Similarly, `%w(gitlab nginx listen_addresses)` means `gitlab['nginx']['listen_addresses']`. We internally convert it to `nginx['listen_addresses']`, which is what we use in `/etc/gitlab/gitlab.rb`.
53
+
`config_keys` represents a list of keys, which can be used to traverse the configuration hash available
54
+
from `/opt/gitlab/embedded/nodes/{fqdn}.json` to reach a specific configuration.
55
+
For example `%w(mattermost log_file_directory)` means `mattermost['log_file_directory']` setting.
56
+
Similarly, `%w(gitlab nginx listen_addresses)` means `gitlab['nginx']['listen_addresses']`.
57
+
We internally convert it to `nginx['listen_addresses']`, which is what we use in `/etc/gitlab/gitlab.rb`.
37
58
38
59
### `deprecation`
39
60
40
-
`deprecation` is where you set the `<major>.<minor>` version that deprecated the change. Starting in that version, running `gitlab-ctl reconfigure` will warn that the setting is being removed in the `removal` version, and it will display the provided `note`.
61
+
`deprecation` is where you set the `<major>.<minor>` version that deprecated the change.
62
+
Starting in that version, running `gitlab-ctl reconfigure` will warn that the setting is being removed in the `removal`
63
+
version, and it will display the provided `note`.
41
64
42
65
### `removal`
43
66
44
-
`removal` is where you set the `<major>.<minor>` version that will no longer support the change at all. This should almost always be a major release. The Omnibus package runs a script at the beginning of installation that ensures you don't have any removed configuration in your settings. The install will fail early, before making any changes, if it finds configuration that is no longer supported.
67
+
`removal` is where you set the `<major>.<minor>` version that will no longer support the change at all.
68
+
This should almost always be a major release. The Omnibus package runs a script at the beginning of installation that ensures you don't have any removed configuration in your settings. The install will fail early, before making any changes, if it finds configuration that is no longer supported. Similarly, running `gitlab-ctl reconfigure` will also check the `gitlab.rb` file for removed configs. This is to tackle situations where users simply copy `gitlab.rb` from an older instance to a newer one.
45
69
46
70
### `note`
47
71
48
-
`note` is part of the deprecation message provided to users during `gitlab-ctl reconfigure`. Use this area to inform users of how to change their settings, often by linking to new documentation, or in the case of a settings rename, telling them what the new setting name should be.
72
+
`note` is part of the deprecation message provided to users during `gitlab-ctl reconfigure`.
73
+
Use this area to inform users of how to change their settings, often by linking to new documentation,
74
+
or in the case of a settings rename, telling them what the new setting name should be.
75
+
76
+
## Tracking the removal of deprecation messages
77
+
78
+
Deprecation messages **should not** be cleaned up together with removals, because even after the removal they protect upgrades
79
+
where an administrator tries to upgrade to the version where the key got removed, but they have not yet migrated all
80
+
the old configuration.
81
+
82
+
Upgrades do this by running the `Gitlab::Deprecations.check_config` method, which compares existing
83
+
configuration against their scheduled removal date, before allowing the GitLab package to be updated.
84
+
85
+
Additionaly, we have users who might skip multiple GitLab versions when upgrading. For that reason, we recommend deprecation
86
+
messages to only be removed in the next planned required stop following the removal milestone, as per our
87
+
[upgrade paths](https://docs.gitlab.com/ee/update/index.html#upgrade-paths). For example:
88
+
89
+
- A deprecation message was added in 15.8.
90
+
- The old configuration was removed from the codebase in 16.0.
91
+
- The deprecation messages should be removed in 16.3, as this is the next planned required stop.
92
+
93
+
To track the removal of deprecation messages:
94
+
95
+
1. Create a follow-up issue using the `Remove Deprecation Message` issue template.
96
+
1. Add a comment next to your deprecation message with a link to the follow-up issue to remove the message. For example:
The follow-up issue should be set to the milestone in which the feature is expected to be removed.
123
+
124
+
## Removing deprecation messages
125
+
126
+
When the messages are ready to be removed you should:
49
127
50
-
Once the version where the setting is removed is out of the [maintenance window](https://docs.gitlab.com/ee/policy/maintenance.html#gitlab-release-and-maintenance-policy), the deprecation message can be removed from the codebase.
128
+
1. Make sure the deprecated configuration was indeed removed in a previous milestone.
129
+
1. Make sure the message removal is being released in a required stop milestone later than the one that removed the configuration.
130
+
1. Open an MR to remove the deprecation messages and to close the follow-up issue.
0 commit comments