Skip to content

Add rubocop to ban use of Gitlab::Saas.feature_available?

Description of the proposal

Ban use of Gitlab::Saas.feature_available? outside of ee as documented in https://docs.gitlab.com/ee/development/ee_features.html#saas-only-feature. Instead we should be promoting the methods outlined in https://docs.gitlab.com/ee/development/ee_features.html#do-not-use-saas-only-features-for-functionality-in-ce instead.

      # @example
      #
      # # bad when outside ee directory
      #
      # Gitlab::Saas.feature_available?('_some_feature_')

Check-list

  • Make sure this MR enables a static analysis check rule for new usage but ignores current offenses.
  • Mention this proposal in the relevant Slack channels (e.g. #development, #backend, #frontend).
  • The MR doesn't have significant objections, and is getting a majority of 👍 vs 👎 (remember that we don't need to reach a consensus).
  • Create a follow-up issue to fix the current offenses as a separate iteration: no current offenses
  • Follow the review process as usual.
  • Once approved and merged by a maintainer, mention it again:
    • In the relevant Slack channels (e.g. #development, #backend, #frontend).
    • (Optional depending on the impact of the change) In the Engineering Week in Review.

/cc @gitlab-org/maintainers/rails-backend

Related to #225101 (closed)

Edited by Doug Stull

Merge request reports