Skip to content

Fix group code coverage csv

Max Orefice requested to merge mo-fix-group-code-coverage-csv into master

Ref: #270102 (closed)

What does this MR do?

This MR fixes a bug to download the group code coverage data as a csv.

Why are we doing this?

After !49630 (merged) was shipped I was making sure we fixed our existing ~bug correctly and discovered something wrong with the way our params was structured with our HTTP request.

Before

[1] pry(#<Groups::Analytics::CoverageReportsController>)> params
=> <ActionController::Parameters {"controller"=>"groups/analytics/coverage_reports", "action"=>"index", "group_id"=>"gitlab-org", "format"=>"csv&start_date=2020-11-16&end_date=2020-12-16&project_ids[]=2"} permitted: false>

After

[1] pry(#<Groups::Analytics::CoverageReportsController>)> params
=> <ActionController::Parameters {"ref_path"=>"", "start_date"=>"2020-11-16", "end_date"=>"2020-12-16", "project_ids"=>["2"], "controller"=>"groups/analytics/coverage_reports", "action"=>"index", "group_id"=>"gitlab-org", "format"=>"csv"} permitted: false>

Screenshots (strongly suggested)

This MR make sure we are able to download raw group code coverage data as a csv.

Opening_coverage_reports.csv_2020-12-16_11-50-52

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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

Merge request reports