Return only the latest build with coverage in MR widget JSON
What does this MR do?
Solves #246793 (closed).
Related to feature #15399 (closed).
Since !40533 (merged), the MR Widget endpoint returns an array of builds with coverage from the pipeline of the MR. Problem is, that the array also includes retried builds. After this MR, the array will only consist of the latest build of each job.
Before:
"builds_with_coverage": [
{"name":"documentation-tests","coverage":0.1600187649147498},
{"name":"documentation-tests","coverage":0.1600105563188697},
{"name":"maven-tests", "coverage":0.16001055664367975},
{"name":"maven-tests", "coverage":0.1600187700528734},
{"name":"documentation-tests","coverage":0.15998424227076935},
{"name":"maven-tests", "coverage":0.1599842419446638}
],
After:
"builds_with_coverage": [
{"name":"documentation-tests","coverage":0.1600187649147498},
{"name":"maven-tests", "coverage":0.1600187700528734}
],
Notes
- I'm not sure if the changelog entry is justified. I guess it depends on whether the original feature is in the 13.4 release without this fix. Let me know if I should remove it.
Screenshots
Before
After
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Simon Lenz