Skip to content

Coverage percentage in Overview page with flag selected differs from coverage of same flag on Flags tab #3590

@cstavitsky

Description

@cstavitsky

Describe the bug

Opening on behalf of a customer:

One of our engineers noticed some differences in coverage numbers between the Flags page and the Overview page with the flag selected. In the attached screenshot, the Flags page shows that there is 41.44% coverage for the flag my-flag. If I click on the flag name from that page, I'm brought to the overview page with the my-flag flag selected and a filtered set of directories. However, the tree view on the page shows 49.19% coverage. I went to our continuous integration pipeline and downloaded the coverage.out file that is being sent to Codecov. When I ran the following command on it:

$ go tool cover -func=coverage.out

I see that the total statement coverage is 49.9%, which roughly aligns with what we're seeing in the Codecov Overview page but not the Flags page. Could you let me know if there is a reason for the different numbers?

To Reproduce
Steps to reproduce the behavior:

(internal customer case contains link to customer instance, real flag name, and coverage.out file)

  1. Go to Overview page
  2. Select the my-flag flag, see 49.19% coverage
  3. Visit the Flags tab (radio button on Overview page)
  4. See that my-flag coverage shows as 41.44% for the same time interval
  5. Bonus: Clicking into my-flag coverage brings us back to the Overview page with the flag selected, and 49.19% coverage

Expected behavior
Coverage data to match between these two views:

  1. Overview page with my-flag selected
  2. my-flag coverage value on Flags tab

Screenshots

Image Image

Additional context
I was able to reproduce this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions