Sort code coverage graph by dates
What does this MR do?
Follow up to #33743 (closed) because we discovered that the graph was rendering in reverse order. The API passed the data in the order on purpose, so we adjust them in the FE.
It's a fairly straightforward change: we add a computed property that sorts the array. We could have opted for using something like reverse
since we know it's in descending order, but it feels more robust to do a full on date comparison.
I also added a simple test that check that the mock data, which is now in descending order, gets reverse to the correct order.
Merge request reports
Activity
changed milestone to %13.1
added devopsverify frontend grouppipeline security labels
mentioned in issue #222939 (closed)
Danger has errored
[!] Invalid
Dangerfile
file: [31m [!] InvalidDangerfile
file: Server responded with code 404, message: 404 File Not Found. Request URI: https://gitlab.com/api/v4/projects/278964/repository/files/ee%2Fapp%2Fassets%2Fjavascripts%2Fpages%2Fprojects%2Fgraphs%2Fcomponents%2Fcode_coverage.vue. Updating the Danger gem might fix the issue. Your Danger version: 8.0.1, latest Danger version: 8.0.2 [0mfrom danger/ce_ee_vue_templates/Dangerfile:13
-------------------------------------------
> response = gitlab.api.get_file(gitlab.mr_json[
project_id
], counterpart_path,master
)response.code != 404
-------------------------------------------
. Updating the Danger gem might fix the issue. Your Danger version: 8.0.1, latest Danger version: 8.0.2
# from danger/ce_ee_vue_templates/Dangerfile:13 # ------------------------------------------- # gitlab_danger = GitlabDanger.new(helper.gitlab_helper) > # gitlab_danger.rule_names.each do |file| # -------------------------------------------
Generated by
DangerEdited by 🤖 GitLab Bot 🤖Generated by
DangerEdited by 🤖 GitLab Bot 🤖assigned to @pburdette
- Resolved by Frédéric Caplette
@pburdette Could you be the reviewer on this MR? thanks!
added typebug label
added 19 commits
-
c0fb8317...a9488613 - 17 commits from branch
master
- 7665f66a - Sort code coverage graph by dates
- 2c06b91d - Add a changelog
-
c0fb8317...a9488613 - 17 commits from branch
- Resolved by Frédéric Caplette
- Resolved by Frédéric Caplette
unassigned @pburdette
@afontaine Could you be the maintainer for this tiny MR? It simply adds a sorting method in a component to make sure the data is sorted by ascending dates. The
danger review
job failing seems to be a widespread problem on every build at the moment, so not related to this MR. Thanks!Edited by Frédéric Capletteassigned to @afontaine
- Resolved by Andrew Fontaine
@f_caplette I think this looks ok to me.
I am generally a little bit wary of tests that examine values on the
vm
object, but it seems those are pretty widespread in this file so I will assume those are there for a good reasonI think I just merged a fix for danger so the next pipeline should be fixed
enabled an automatic merge when the pipeline for f0803e66 succeeds
mentioned in commit 0ad4044f
added workflowstaging label
added workflowcanary label and removed workflowstaging label
added workflowproduction label and removed workflowcanary label