API endpoint for code coverage graph
Problem to solve
Getting data for code coverage over time is a manual slow process today. This is described in full in the issue to display the graph.
It is too slow to get the data every time the graph is drawn from the ci builds
table.
Intended users
Further details
N/A - This is a backstage feature, won't be accessible.
Proposal
This focuses on figuring out how to retrieve and store the code coverage data from the ci_builds
table that will be used by the graph. The API endpoint will then be consumed by the frontend on #33743 (closed).
Given there could be a number of different jobs that would run code coverage in a project, we will have to split this into 2 endpoints:
- For fetching all the available job names for the past 3 months. The values returned here will be rendered in the dropdown.
- For fetching the coverage values for the past 3 months for the given job name.
Permissions and Security
This is not a public API but rather will be used by the frontend to fetch data through AJAX requests.
Documentation
No documentation change.
Availability & Testing
Questions
- What's the rate limiting on this look like?
- This would follow the same rate limiting from the other AJAX endpoints we have.
- Is the time range customizable?
- For now, we won't accept any custom time range and have this always return data within 3 months.
- What if there is no data yet?
- The API would return an empty hash or array
Test areas
- Unit test changes
- Feature requires new unit tests
- FE
- API
- Feature requires new unit tests
- Integration test changes
- Feature requires integration test: FE <- API
- End-to-end test change
- No end-to-end testing required
- package-and-qa not required
What does success look like, and how can we measure that?
What is the type of buyer?
Links / references
Edited by Zeff Morgan