Frontend: Show year in CI minutes usage graph

Release notes

Problem to solve

🧩 Background

In #246844 (closed) we introduced graphs for CI usage historical data by month/project on the CI/CD Analytics page. Today, we capture year by mentioning month and year together on the chart, such as Feb 2022.

Also, We received an internal bug report that CI minutes usage by project bar chart does not consider the year and it's showing usage from February 2021 instead.

Intended users

Developers, Dev Team Lead

User experience goal

Users should be able to filter the chart information by year and display data for 24 months of data (if they have data that far back). - Today (April 2022) If I had pipelines that far back I would expect to see data from as far back as April 2020. - This data range is dependent on performance, if the query to get data > 12 months old is deemed two long for this iteration the available data in the UI may be less than what is available from the API.

💭 Proposal

Go to the design management section for detailed specifications of the proposal

Image
Show-year-in-CI-minutes-usage-graph
  • Add a provision in the UI for including the year with the month
  • Define how the data from previous years can be accessed

Permissions and Security

  • Add expected impact to members with no access (0)
  • Add expected impact to Guest (10) members
  • Add expected impact to Reporter (20) members
  • Add expected impact to Developer (30) members
  • Add expected impact to Maintainer (40) members
  • Add expected impact to Owner (50) members

Documentation

None.

Availability & Testing

Integration Tests

  • With the fix made in !78006 (merged) for the "CI minutes usage by month" graph, beyond just ensuring month_iso8601 is returned in the response, let's also look into adding some FE tests for the component to ensure the months are displayed in the correct order.
  • Ensure we create test data in the same month but with different years to ensure that they are being displayed properly on the "CI minutes usage by project" graph.

Available Tier

  • Free
  • Premium
  • Ultimate

What does success look like, and how can we measure that?

We will not track any metrics on usage of this specific feature.

Acceptance Criteria

  • A user can choose a year with data and the months with data
  • Upon a valid choice the graph/table should update with data
  • A user can't choose a year / month combo without data

Is this a cross-stage feature?

No.

Links / references

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Technical Proposal (Front end only)

A first iteration will be frontend only.

Since we only need data going back to 2020 or so, use the monthIso8601 field that contains the year and month data. On the frontend populate the dropdown by parsing out the years and ensuring uniqueness.

Edited by Allison Browne (PTO 12/19-1/2)