Metrics Report MR widget shows existing metrics as "new"
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
The Metrics Report MR widget will show all metrics as "new" if the last MR run on the target branch doesn't contain a metrics report artifact. This is problematic in scenarios where your default branches pipeline might not always run a job that generates a metrics report.
Steps to reproduce
-
Fork the example project below.
-
Run a new pipeline on
main. By default, this will include the metrics job. -
Create a new branch and make a superfluous commit, then push it up.
-
Open a merge request for this new branch with
mainas the target. The Metrics Report MR widget will read as "Metrics reports did not change". -
Manually run a new pipeline on main via the UI. This time, set the variable
METRICS_DISABLEDtotruebefore clicking "run" on the run pipeline page. -
Take another look at the MR. All metrics will be marked as new.
Example Project
https://gitlab.com/calebw/metrics_reports_new
What is the current bug behavior?
Metrics Report MR widget shows all metrics as new if the target branche's latest pipeline doesn't contain a metrics report.
What is the expected correct behavior?
Metrics Report MR widget compares against the latest (not necessarily latest pipeline) metrics report for the target branch.
Output of checks
This bug happens on GitLab.com.