Skip to content

PoC: Cleanup `usage_quotas_pipelines_vue` feature flag

What does this MR do and why?

PoC for: #360784 (closed)

Breaking down this MR:

(If you need to copy/past these paths you can replace ... with app/assets/javascripts.

  1. Remove usage_quotas_pipelines_vue feature flag
    1. Remove FF in ee/.../ci/usage_quotas/pipelines/index.js
    2. Clean up ee/.../pages/groups/usage_quotas/index.js
    3. Cleanup the Group controller: ee/app/controllers/groups/usage_quotas_controller.rb
    4. Cleanup the Profile controller: ee/app/controllers/profiles/usage_quotas_controller.rb
    5. Remove FF in Groups: ee/app/views/groups/usage_quotas/index.html.haml
    6. Remove FF in Profiles: ee/app/views/profiles/usage_quotas/index.html.haml
    7. Delete Yaml: ee/config/feature_flags/development/usage_quotas_pipelines_vue.yml
    8. Specs:
      1. ee/spec/features/ci/ci_minutes_spec.rb
      2. ee/spec/features/groups/usage_quotas/pipelines_tab_spec.rb
      3. ee/spec/features/groups/usage_quotas/seats_tab_spec.rb
      4. ee/spec/features/groups/usage_quotas/usage_quotas_spec.rb
      5. ee/spec/features/profiles/usage_quotas_spec.rb
      6. ee/spec/requests/groups/usage_quotas_spec.rb
  2. Delete unused HAML files:
    1. ee/app/views/namespaces/pipelines_quota/_list.html.haml
    2. ee/app/views/namespaces/pipelines_quota/_ci_minutes_report.html.haml
    3. ee/app/views/namespaces/pipelines_quota/_extra_shared_runners_minutes_quota.html.haml
  3. Remove Group CI minutes usage old app
    1. Remove ee/.../ci/usage_quotas/ci_minutes_usage/components/app.vue. This app was used in the old HAML view to display the graphs for Groups. We're now using ee/.../ci/usage_quotas/pipelines/components/minutes_usage_charts.vue
    2. Remove ee/.../ci/usage_quotas/ci_minutes_usage/index.js as it's the initializer of the old app for groups
    3. Move ee/.../ci/usage_quotas/ci_minutes_usage/graphql/queries/ci_minutes_namespace.query.graphql and update its reference in ee/.../ci/usage_quotas/pipelines/components/app.vue
    4. Delete ee/spec/frontend/ci/usage_quotas/ci_minutes_usage/...
  4. Remove Profile CI minutes usage old app
    1. Remove ee/.../ci/ci_minutes_usage/components/app.vue: This app was used in the old HAML view to display the graphs for profiles. We're now using ee/.../ci/usage_quotas/pipelines/components/minutes_usage_charts.vue
    2. Move the files in ee/.../ci/ci_minutes_usage to ee/.../ci/usage_quotas/:
      1. minutes_usage_month_chart.vue
      2. minutes_usage_project_chart.vue
      3. no_minutes_alert.vue
      4. shared_runner_usage_month_chart.vue
      5. These are the actual graphs. We need to update the reference in ee/.../ci/usage_quotas/pipelines/components/minutes_usage_charts.vue
    3. Move ci_minutes.query.graphql from ee/.../ci/ci_minutes_usage to ee/.../ci/usage_quotas/:
      1. We need to update its reference in ee/.../ci/usage_quotas/pipelines/components/app.vue
      2. Remove ee/.../ci/ci_minutes_usage/constants.js. Whatever constant being used is now moved to ee/.../ci/usage_quotas/pipelines/constants.js
      3. Remove ee/.../ci/ci_minutes_usage/index.js as it's the initializer of the old app for profiles (item 1.)
      4. We also need to remove its call in ee/.../pages/profiles/usage_quotas/index.js
      5. Move ee/.../ci/ci_minutes_usage/utils.js as is to ee/.../ci/usage_quotas/pipelines/utils.js
      6. Amend tests in ee/spec/frontend/ci/ci_minutes_usage/mock_data.js
Title MR Description
Remove JS and FF calls from HAML files !105487 (merged) With this MR all the old JS/ruby code will never be executed because it's never being included. This gives us more piece to break down the JS removals in more MRs. We can remove the FF as well, at this point
Remove the remaining backend code !105723 (merged) This finishes the removal of all dead code on the backend
Remove unused Group CI frontend code !105795 (merged) Removes the old frontend files for Group Usage Quotas
Remove unused Profile CI frontend code !105880 (merged) Removes the old frontend files for Profile Usage Quotas. This finishes the removal of all dead code on the frontend

Screenshots or screen recordings

No UI changes. Details: #360785 (comment 1180904501)

How to set up and validate locally

  1. Checkout the branch
  2. Visit: http://gdk.test:3000/groups/flightjs/-/usage_quotas#pipelines-quota-tab
  3. Visit: http://gdk.test:3000/-/profile/usage_quotas#pipelines-quota-tab
  4. Make sure both pages are rendering correctly

MR acceptance checklist

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

Edited by Sheldon Led

Merge request reports