Skip to content

Draft: Add shared runner duration to table

Annabel Gray requested to merge 12345-a-very-long-branch-name-indeed into master

What does this MR do and why?

Adds the shared runner duration the the project table for group/personal namespaces.

Screenshots or screen recordings

Before After

How to set up and validate locally

Seed data

ApplicationSetting.current.update(shared_runners_minutes: 400)
project = Project.find(20)
root_namespace = project.root_namespace

namespace_usage = Ci::Minutes::NamespaceMonthlyUsage.find_or_create_current(namespace_id: root_namespace)
Ci::Minutes::NamespaceMonthlyUsage.update_counters(namespace_usage, amount_used: 100, shared_runners_duration: 100)

project_usage = Ci::Minutes::ProjectMonthlyUsage.find_or_create_current(project_id: project)
Ci::Minutes::ProjectMonthlyUsage.update_counters(project_usage, amount_used: 100, shared_runners_duration: 100)

View changes

  1. Visit Group > Settings > Usage Quotas
  2. View the project table at the bottom of the view

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 Annabel Gray

Merge request reports