Separate EE from SaaS data properly on pipeline_usage_app_data
What does this MR do and why?
This fixes #405173 (closed). The method that provided the data to the frontend was treating all EE
data as SaaS
data, breaking the UI on Usage Quotas
page for Self Managed
users.
There's also a small UI improvement on the top title padding for Self Managed
, as highlighted in the screenshots below
Screenshots or screen recordings
Before | After | Simulating SaaS |
---|---|---|
How to set up and validate locally
- If you have configured your GDK to simulate a SaaS instance make sure to undo it so that your GDK behave as Self-Managed
- Create a project within a group on a SM instance.
- Run a pipeline in the project for at least 60 seconds. A single job with
sleep 60
should to the trick.- If you don't have runners configured on your local GDK, you can mock the data in the DB:
# If you already have ci minutes record, update it with any number Ci::Minutes::NamespaceMonthlyUsage.where(namespace_id: 188, date: Time.current.utc.beginning_of_month).update(amount_used: 70) # If you don't have the DB record, create it Ci::Minutes::NamespaceMonthlyUsage.new(namespace_id: 188, date: Time.current.utc.beginning_of_month, amount_used: 70).save # If you want a nice line in the graph, add data for the previous month # Create Ci::Minutes::NamespaceMonthlyUsage.new(namespace_id: 188, date: Time.current.utc.beginning_of_month - 1.month, amount_used: 50).save # Update Ci::Minutes::NamespaceMonthlyUsage.where(namespace_id: 188, date: Time.current.utc.beginning_of_month - 1.month).update(amount_used: 50)
- Go to the top-level group and navigate to:
Settins -> Usage Quotas
and select thePipelines
tab. - Notice how the CI/CD minutes usage quota shows up.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Marius Bobin