Fix redundant DuoEnterprise addon entry generated from ecosystem SKU

Problem

When customers purchase DuoEnterprise with ecosystem SKU, the system generates redundant addon entries with quantity: 0. This is confusing when someone inspects the license.

The quantity: 0 pack is generated from the ecosystem RatePlanCharge.

Context

This is similar to the issue fixed in !14399 for self_hosted_dap addon.

For self_hosted_dap, the fix was:

  1. Use product_rate_plan_charge_id (instead of product_rate_plan_id) to find the self_hosted_dap product
  2. Add sm_gitlab_duo_self_hosted_charges method to PlansClassifier to return self_hosted_dap charge IDs ONLY

Proposed Solution

Apply a similar fix for DuoEnterprise. However, to get the ProductRatePlanCharge ids for DuoEnterprise (excluding ecosystem one), it would be easier to implement in the PlansClassifier by defining PlansClassifier.sm_duo_enterprise_charges in module Plans::DuoEnterprisePlans.

Important Note

The feature flag use_plan_type_metadata_for_duo_enterprise is still used in Plans::DuoEnterprisePlans. This means we have not fully transitioned to PlansClassifier for DuoEnterprise product.

Recommendation: Fix DuoEnterprise after fully transitioning to PlansClassifier (i.e., after the feature flag use_plan_type_metadata_for_duo_enterprise is removed).

Related Issues

  • !14722 - Include all ramp interval AddOn products for offline license
  • !14399 - Fix redundant self-hosted-dap pack for ecosystem-sku
Assignee Loading
Time tracking Loading