Project

General

Profile

action #157354

Updated by rainerkoenig 2 months ago

## Motivation 
 Currently we're using the [backlogger script](https://github.com/openSUSE/backlogger) from QE Core for our measurments.  
 This script has some problems because it just crates one datapoint per day looking at the previously colleted data it is not usable for our needs. 

 ### Vision 
 Since we're now organizing our sprints per month we could go for the following idea: 

 We create a script that every day at e.g. 23:50 collects the number of resolved issues between `start of the current month` (calculated from the day use as a parameter for this script) and the date that we use to call this script. So if I would call the script `collect` and invoke it with `collect(2024-03-15)` it would do a query for all resolved issues in our `qe-yam` project that were closed between `2024-03-01` and `2024-03-15`. Then put this measurement into InfluxDB with our own measurement name, e.g "qe-yam" and tags like `title="acuumlated resolved"`.  

 So we get a time series that starts with a low value on the first day of the month and then it increases.  

 Possible visualizations for this idea are: 
 - a sort of "sawtooth" graph if we do a panel that shows the values for every day. 
 - a sort of comparable bar chart if we just display the final accumulated number at the end of the month. 

 ## Additional info 
 - You should study the existing script to get an idea about the needed API calls 
 - You can refer to the [Redmine API documentation for Issues](https://www.redmine.org/projects/redmine/wiki/Rest_Issues) to see that its probably not so difficult to script a query for our `collect` script.  
 - I also created a [small python script](https://github.com/rakoenig/data-collector) that creates raw CSV data for a proof of concept. You can use this as a starting point.  
 - If we want to run this on a regular schedule you need to learn about the salt-pillars-openqa repo on GitLab. 
 - If the `collect` script works as expected we could create a simple script that iterates through the days from e.g. January 1st until the day we have everyting up and running automatically to obtain historical data.  

 ## Acceptance criteria 
 - **AC1:** `collect` script is working as expected 
 - **AC2:** salt-pillars-openqa is adapated so that the script is executed on a daily schedule 
 - **AC3:** we provide historical data with the wrapper script 
 - **AC4:** visualizaion in Grafana is up and working 

 Feel free to split this up into subtasks if it looks too heavy.

Back