Prevent GitLab.com features from affecting Self-Managed customers

Problem

We are integrating more tightly the customer portal into GitLab EE, and it means that more GitLab.com only code will end up there, potentially increasing the leakage to self-manage.

This is a corrective action from the RCA: https://gitlab.com/gitlab-org/fulfillment-meta/issues/34

Proposal

A few ideas could be:

  1. Add a Danger warning when touching specific SaaS code
  2. Add a checkbox in the MR to make sure we double-check we are guarding against this
  3. Abstract and extract specific code so it is easier to put a high-level check or some sort of gateway to check for .com?
  4. Extract this code into a Gem, engine, or different service, easier to include/exclude depending on being a .com? feature
  5. Keep this code in the customer's app, focusing on a transparent transition to the customer (from .com? to the customer portal, they will appear the same).

Result

More safety towards this kind of bugs, or total prevention

Next steps (if any)

Gather more ideas and agree on one or more in order to prevent the leakage situation

cc @rdavila @stanhu @dennis

Edited by Luca Kisielius