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,329
    • Merge requests 1,329
  • 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
  • #270102
Closed
Open
Issue created Oct 19, 2020 by James Heimbuck@jheimbuck_gl❗Developer

Group Code Coverage should use default instead of hardcoded branch name

Summary

Users who have default branch names that aren't master do not get any data in the .csv download for group code coverage.

Steps to reproduce

  1. create a project with a default branch name that is anything bug master
  2. merge to the branch with a code coverage job that calculates coverage
  3. Navigate to the Group Repository Analytics and download the .csv file for all projects.

Example Project

N/A at this time

What is the current bug behavior?

The project name with a default branch that is not master is not present in the report.

What is the expected correct behavior?

All projects should be present.

Relevant logs and/or screenshots

Output of checks

This bug happens on GitLab.com

Possible fixes

The team discussed doing batch queries grouped by default branch names, something like this:

where(project_id: [1,2,3,4,5], ref_path: 'refs/heads/main')
where(project_id: [6,7], ref_path: 'refs/heads/deployment-or-whatever')

Now that !45702 (merged) has been implemented, we should have the default branch name available for our query and this fix should be possible.

Ci::DailyBuildGroupReportResult.with_default_branch

Alternate Proposal

We could chain our new scope: with_default_branch (introduced in !45702 (merged)) to our existing finder to filter coverage only for the default branch. We might need to tweak our finder to make it ref_path agnostic in order to return the right data. I see here an opportunity to extend our existing finder to make it more flexible.

What would be the impact on the data returned if we were to chain it to the existing finder? (i.e. what does it return right now and what would it return with this change?)

Edited Nov 03, 2020 by Ricky Wiens
Assignee
Assign to
Time tracking