Skip to content

Troubleshoot Job: scope license feature check to Project

Allison Browne requested to merge ab-fix-license-feature-check-rca into master

What does this MR do and why?

These code changes are related to a feature called "troubleshoot job with AI" or "Root cause Analysis".

The feature is now enabled only for projects/groups that have an (ultimate)license for it.

Previously, the feature was only enabled if the user had a global ultimate license for the instance.

#457573 (closed)

Steps to reproduce

This was primarily reproduced on staging.gitlab.com. See the chart: https://gitlab.com/gitlab-org/fulfillment/meta/-/work_items/1944#saas

  1. Setup an admin with an ultimate license https://docs.gitlab.com/ee/administration/license_file.html
  2. Setup a group with a premium license.
  • (It's tricky on gdk, but common in saas, We can take a look at a user that is not using_license_seat? and to create a free group. Then check project.licensed_feature_available?(:troubleshoot_job) versus ::License.feature_available?(:troubleshoot_job) on the free group project.
  1. Navigate to the billing page to see that the group has a premium license even though the instance has a ultimate license: http:///groups/group-without-ultimate-features/-/billings
  2. Create a project in the group
  3. The group/project can use RCA to troubleshoot a job (@mfanGitLab, verified this in staging)
  4. Find the project you created and execute project.licensed_feature_available?(:troubleshoot_job) it should return false. Then execute ::License.feature_available?(:troubleshoot_job) it should return true
Edited by Allison Browne

Merge request reports

Loading