Skip to content

Swith coverage report with ObjectStorage

Max Orefice requested to merge mo-swith-coverage-repor-with-object-storage into master

Part of #211410 (closed)

Step 4 to make code coverage available for everyone.

This feature is behind a feature flag (coverage_report_view). The full feature has been developed on this POC branch.

What does this MR do?

This MR modifies our current logic to fetch our coverage report.

Before this MR After this MR
Loading the report in memory Loading the report from ObjectStorage

It implements the necessary logic in order to not alter the behaviour of our current feature:

It includes the following items:

  • Adds raw_report to read report from ObjectStorage
  • Adds fetch_coverage_for to render coverage only for modified files
  • Adds with_code_coverage to fetch pipeline artifact with associated code coverage

Why are we doing this?

Today our Code Coverage feature does not scale properly for large projects containing a lot of code to analyze.

Processing data in memory and parsing big chunk of data have some ~performance implication as explained on this issue.

This is the final step to improve the ~performance of our coverage report feature.

How the feature looks like?

You can visualize how this feature is showing up on the UI on our demo project.

Context

This MR represents a vertical slice of functionality for improving the ~performance of our Code coverate feature. This is slice 4/4.

This work will occur in 4 slices:

  1. Create data model - !37969 (merged)
  2. Introduce a new uploader - !38221 (merged)
  3. Process and persist reports when a pipeline is finished - !39236 (merged)
  4. Fetch report from new abstraction - !39721 (merged)

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
Edited by Max Orefice

Merge request reports