Draft: Fix compute minutes threshold email link to use CustomersDot purchase URL
What does this MR do and why?
The compute minutes threshold notification email was linking to the old in-product purchase flow (/-/subscriptions/buy_minutes) for group namespaces. This flow was migrated to CustomersDot (CDot) approximately 2 years ago, causing users to receive a 404 error when clicking the link.
This MR fixes the issue by updating use_customers_dot_for_addon_path? in EE::NamespacesHelper to always return true, so that buy_additional_minutes_url and buy_additional_minutes_path always use the CustomersDot URL (subscription_portal_more_minutes_url) for all namespace types, including groups.
Previously, only personal (user) namespaces used the CDot URL. Group namespaces fell back to the old in-product flow that no longer exists.
References
Screenshots or screen recordings
No UI changes - this is a backend fix for email link generation.
| Before | After |
|---|---|
Email link points to /-/subscriptions/buy_minutes?selected_group=<id> (404) |
Email link points to https://customers.gitlab.com/buy_pipeline_minutes?gl_namespace_id=<id> (working CDot URL) |
How to set up and validate locally
- In rails console, find a group namespace approaching its compute minutes limit
- Trigger a compute minutes notification email:
namespace = Group.find(<id>) CiMinutesUsageMailer.notify(namespace, ['test@example.com']).deliver_now - Check the email body - the 'buy additional compute minutes' link should now point to the CustomersDot URL (
https://customers.gitlab.com/buy_pipeline_minutes?gl_namespace_id=<id>)
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.