jenkins-infra / plugin-health-scoring

This project aims to introduce a metric system to calculate the health score of each plugin within the Jenkins ecosystem and reflect the final scores on the Plugin Site for the plugin maintainers and users.

Home Page:https://plugin-health.jenkins.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Providing score trend on plugins

alecharp opened this issue · comments

Knowing the current score of a plugin great, but knowing if it improves and is getting worse would be a nice addition to the data we have on each plugin.

In addition, knowing when that previous score was computed would help understand if the plugin is change frequently or not.

We already keep the last at max 5 scores in the scores table, We can return a list of the score to UI, then UI can decide if its shows the value or if it shows a sign for the trend
image

We just need to create a api to return a list of score with timestamp of generation, It would help the UI to analyse the trend easily

No you don't.
Plugins Site is using one API endpoint and shouldn't have to multiply the calls.

In the current /api/scores output, we should add a new entry, for each plugin, to hold the previously known score.

No you don't. Plugins Site is using one API endpoint and shouldn't have to multiply the calls.

In the current /api/scores output, we should add a new entry, for each plugin, to hold the previously known score.

Thanks @alecharp so the endpoint will be /api/scores/{pluginName} this will return all the score result

No, that would still be a new endpoint. We want the trend to be accessible in the current /api/scores output.

No, that would still be a new endpoint. We want the trend to be accessible in the current /api/scores

@alecharp Thanks, in this case, we can create and pass another parameter in the score card, return bodyBuilder.body(new ScoreReport(plugins, scoreService.getScoresStatistics())); that contains all the information of past score of a plugin

No. We want the elements of plugins to have a previousScore for example.

No. We want the elements of plugins to have a previousScore for example.

@alecharp Example, in single DB call ?
"plugins": {
"aws-java-sdk-sns": {
"value": 24,
"date": "2024-01-24T07:56:49.118963Z",
"previousScore": 98, 34, 23
"details": {
"security": {
"value": 100,
"weight": 1,
"components": [
{
"value": 100,
"weight": 1,
"reasons": [
"Plugin does not seem to have on-going security advisory."
],
"resolutions": null
}
]
},

Either you provide an array of previous score, or only one value. Last value is enough.

Either you provide an array of previous score, or only one value. Last value is enough.

Thank you so much @alecharp I guess it is good to provide all previous score to better analysis

No, only last score is better. It's easier to interpret.