codecov / engineering-team

This is a general repo to use with GH Projects
1 stars 1 forks source link

Fix lines covered mismatch on Pull Table #2084

Open ajay-sentry opened 2 months ago

ajay-sentry commented 2 months ago

Missing Lines doesn't include Partial lines for the Pull or Coverage Table rows

Image

In the above screenshot we can see "2" lines missing in the header, but only 1 line cumulative on all the rows in the table. This is because those rows don't account for partials.

Example Header Code: https://github.com/codecov/gazebo/blob/d07c62597eca9069cae26b6ed8e5f4e6af59bd3b/src/pages/CommitDetailPage/Dropdowns/CommitCoverageDropdown.tsx#L49-L51

Pull Table Query: https://github.com/codecov/gazebo/blob/cc3e20cecd1b9cb39f4227b4573f76cf0806ae08/src/services/pull/fragments.ts#L344-L361

API Resolver for MissesCount: https://github.com/codecov/codecov-api/blob/232d97ad4bcfdd221694b6c63924daf9330ef247/graphql_api/types/impacted_file/impacted_file.py#L127-L129

But we can see there's a separate attribute for partials: https://github.com/codecov/codecov-api/blob/232d97ad4bcfdd221694b6c63924daf9330ef247/services/comparison.py#L834

TO FIX:

Adal3n3 commented 2 months ago

Design changes:

  1. Add the "Partial" column on pull and commit tables.
  2. tweak the copy "2 lines in your changes are missing and partially missing coverage"