Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,761
    • Issues 44,761
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,332
    • Merge requests 1,332
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #363301
Closed
Open
Issue created May 24, 2022 by Albert Salim@alberts-gitlab2️⃣Maintainer

Support report from child pipeline for MR coverage report

Implement support for report for child pipeline for MR coverage report, as part of #362876 (closed).

Proposal

In http://gitlab.com/gitlab-org/gitlab/blob/dde3a70e1d9c21f0f5698d16f3f0f239b0836a4a/app/controllers/projects/merge_requests_controller.rb#L132-L132, we expose coverage path to the frontend using merge_request.has_coverage_reports?, which in turn checks if the head pipeline has code coverage pipeline artifacts. http://gitlab.com/gitlab-org/gitlab/blob/dde3a70e1d9c21f0f5698d16f3f0f239b0836a4a/app/models/ci/pipeline.rb#L1072-L1074

This in turn is used to return the actual coverage report in http://gitlab.com/gitlab-org/gitlab/blob/dde3a70e1d9c21f0f5698d16f3f0f239b0836a4a/app/services/ci/generate_coverage_reports_service.rb#L15-L15.

So to support the reports from child pipeline, we need to

  1. Introduce Pipeline#has_reports_in_self_and_descendants? and Pipeline#latest_report_builds_in_self_and_descendants which accounts for reports in the descendant pipelines.
  2. Generate coverage report pipeline artifact from pipeline and descendants in http://gitlab.com/gitlab-org/gitlab/blob/dde3a70e1d9c21f0f5698d16f3f0f239b0836a4a/app/services/ci/pipeline_artifacts/coverage_report_service.rb#L4-L4. using the inclusive methods added above.
Edited May 25, 2022 by Albert Salim
Assignee
Assign to
Time tracking