Skip to content

Avoid GitlabSubscription generation outside SaaS

Mark Chao requested to merge 214434-subscription into master

What does this MR do and why?

GitlabSubscription is only used under SaaS context, but is still generated outside SaaS environment. This MR fixes this.

How to set up and validate locally

  1. Ensure you are under self managed instance
  2. Observe GitlabSubscription count first.
    GitlabSubscription.count
  3. Create a new group
  4. Observe GitlabSubscription count has not changed
    GitlabSubscription.count
  5. Run the following and it should return "default" instead of "free".
    Namespace.last.actual_plan
  6. Check that no new records has been generated.
    GitlabSubscription.count

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #214434 (closed)

Edited by Mark Chao

Merge request reports