Multi Year Subscriptions and License file start/end dates
Summary
Self-managed subscriptions sold with a validity period greater than 12 months result in a license file always being generated for the original start date and original end date. This includes any amendments made to the subscription, such as adding users, often resulting in the system generating a license file with a 12-month validity period in the past.
Steps to reproduce
- Have a multi-year subscription
- Create any amendment to it that would result in a new license being generated, like adding seats to the license, during year 2 or 3.
What is the current bug behavior?
License files created with outdated validity periods.
Reason:
- We generate a legacy license with
term_start_date
+ 1 year based on our logic of generating all legacy licenses for 1 year. - The problem with this is that
term_start_date
matches the original subscription start date - so when we are year 2 or 3 of a MY subscription and a new license is generated, it will be for the first year only.
What is the expected correct behavior?
Generate a license file that matches the relevant, current year of the subscription.
Workarounds
Generate license manually with the correct dates.
Reported examples
-
https://license.gitlab.com/licenses/180420
- Issued at 2021-06-22 ; Starts at 2018-09-28, the original date of the first amendment on the subscription
- gitlab-com/support/internal-requests#8536
-
https://gitlab.zendesk.com/agent/tickets/223424
- added users to a multi-year, resulting license file Issued at 2021-07-08 ; Starts at 2020-05-22
-
https://gitlab.com/gitlab-com/support/internal-requests/-/issues/8911
- https://customers.gitlab.com/admin/license/1000675, Issue at 2021-08-12, Starts at 2020-09-30
- After clicking the download license file in the subscription, a new license was generated: https://customers.gitlab.com/admin/license/1001375, issue at 2021-08-25, Starts at 2020-09-30
Proposal
Dynamically calculate the license end date
and license start date
for a multi-year subscription on a legacy or offline license based on the provision date.
- By dynamically setting
end date
of the license based on the provision date, we ensure the license is aligned to the current term. - By dynamically setting
start date
based on provision date, the 1-year increment logic can hold true, allowing true-ups to be calculated correctly.
Note: an alternative option is to generate all legacy licenses for the full subscription term (i.e. 3 years) but this is not something we are prepared to move to at this time (comment for details).