Refactor GitLab Dedicated and Self-Managed plans by plan type in config
Problem
Follow up from this discussion https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/12122#note_2393562285
The current structure of Dedicated and Self-Managed plans in (dedicated
and self_managed
nodes in config/application.yml
) has been become challenging to parse in app/models/plan.rb
as there is a growing list of variants: ecosystem, US public sector, duo with amazon q, etc.
Maintainability of these SKUs could be further improved by restructuring the dedicated
and self_managed
nodes in application.yml
to use a nested key for each Dedicated / SM plan type e.g.
dedicated:
ecosystem:
us_pubsec:
ecosystem:
duo_with_amazon_q:
ecosystem:
With this structure, the plans can be more readily accessed in plan.rb
by variant/type:
APP_CONFIG.zuora.plans.dedicated
APP_CONFIG.zuora.plans.dedicated.ecosystem
APP_CONFIG.zuora.plans.dedicated.us_pubsec
- etc
Proposal
Refactor dedicated
and self_managed
node in config/application.yml
to use a nested/child key for each plan type, use this nested structure to parse dedicated plans in plan.rb
.
Result
Improved maintainability of plans across application/yml
and plan.rb
.