Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove/replace useCoverageWithFilters #2873

Conversation

nicholas-codecov
Copy link
Contributor

Description

This PR actually removes the useCoverageWithFilters hook instead replacing it's use with the original hook and extending it to support the features that were specific to useCoverageWithFilters reducing the chances of actually creating a bug and difference between the two (we weren't fetching the same info for the same use 😬)

GH codecov/engineering-team#355

Notable Changes

  • Remove useCoverageWithFilters
  • Remove associated utils
  • Update useFileWithMainCoverage to support new cases
  • Update useCommitBasedCoverageForFileViewer to use useFileWithMainCoverage ... twice
  • Update imports
  • Update tests

@codecov-qa
Copy link

codecov-qa bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.47%. Comparing base (059a9bc) to head (5a7e61a).

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2873      +/-   ##
==========================================
- Coverage   98.48%   98.47%   -0.01%     
==========================================
  Files         880      878       -2     
  Lines       13037    13026      -11     
  Branches     3491     3470      -21     
==========================================
- Hits        12839    12828      -11     
  Misses        194      194              
  Partials        4        4              
Files Coverage Δ
...rvices/file/useCommitBasedCoverageForFileViewer.ts 100.00% <100.00%> (ø)
...Contents/branch/file/usePrefetchBranchFileEntry.js 100.00% <ø> (ø)
...ontents/commit/file/usePrefetchCommitFileEntry.tsx 100.00% <ø> (ø)
src/services/pathContents/constants.ts 100.00% <ø> (ø)
...athContents/pull/file/usePrefetchPullFileEntry.tsx 100.00% <ø> (ø)
.../services/pathContents/useFileWithMainCoverage.tsx 100.00% <100.00%> (ø)
src/services/pathContents/utils.ts 100.00% <100.00%> (ø)
src/ui/CodeRenderer/SingleLine/SingleLine.jsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 54.54% <ø> (ø)
Layouts 97.26% <ø> (ø)
Pages 99.28% <ø> (ø)
Services 99.48% <100.00%> (-0.01%) ⬇️
Shared 99.68% <ø> (ø)
UI 94.53% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 059a9bc...5a7e61a. Read the comment docs.

Copy link

codecov-public-qa bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.47%. Comparing base (059a9bc) to head (5a7e61a).

✅ All tests successful. No failed tests found ☺️

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2873      +/-   ##
==========================================
- Coverage   98.48%   98.47%   -0.01%     
==========================================
  Files         880      878       -2     
  Lines       13037    13026      -11     
  Branches     3473     3425      -48     
==========================================
- Hits        12839    12828      -11     
  Misses        194      194              
  Partials        4        4              
Files Coverage Δ
...rvices/file/useCommitBasedCoverageForFileViewer.ts 100.00% <100.00%> (ø)
...Contents/branch/file/usePrefetchBranchFileEntry.js 100.00% <ø> (ø)
...ontents/commit/file/usePrefetchCommitFileEntry.tsx 100.00% <ø> (ø)
src/services/pathContents/constants.ts 100.00% <ø> (ø)
...athContents/pull/file/usePrefetchPullFileEntry.tsx 100.00% <ø> (ø)
.../services/pathContents/useFileWithMainCoverage.tsx 100.00% <100.00%> (ø)
src/services/pathContents/utils.ts 100.00% <100.00%> (ø)
src/ui/CodeRenderer/SingleLine/SingleLine.jsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 54.54% <ø> (ø)
Layouts 97.26% <ø> (ø)
Pages 99.28% <ø> (ø)
Services 99.48% <100.00%> (-0.01%) ⬇️
Shared 99.68% <ø> (ø)
UI 94.53% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 059a9bc...5a7e61a. Read the comment docs.

@codecov-notifications
Copy link

codecov-notifications bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2873      +/-   ##
==========================================
- Coverage   98.48%   98.47%   -0.01%     
==========================================
  Files         880      878       -2     
  Lines       13037    13026      -11     
  Branches     3496     3425      -71     
==========================================
- Hits        12839    12828      -11     
  Misses        194      194              
  Partials        4        4              
Files Coverage Δ
...rvices/file/useCommitBasedCoverageForFileViewer.ts 100.00% <100.00%> (ø)
...Contents/branch/file/usePrefetchBranchFileEntry.js 100.00% <ø> (ø)
...ontents/commit/file/usePrefetchCommitFileEntry.tsx 100.00% <ø> (ø)
src/services/pathContents/constants.ts 100.00% <ø> (ø)
...athContents/pull/file/usePrefetchPullFileEntry.tsx 100.00% <ø> (ø)
.../services/pathContents/useFileWithMainCoverage.tsx 100.00% <100.00%> (ø)
src/services/pathContents/utils.ts 100.00% <100.00%> (ø)
src/ui/CodeRenderer/SingleLine/SingleLine.jsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 54.54% <ø> (ø)
Layouts 97.26% <ø> (ø)
Pages 99.28% <ø> (ø)
Services 99.48% <100.00%> (-0.01%) ⬇️
Shared 99.68% <ø> (ø)
UI 94.53% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 059a9bc...5a7e61a. Read the comment docs.

@codecov-staging
Copy link

codecov-staging bot commented May 13, 2024

Bundle Report

Changes will decrease total bundle size by 599 bytes ⬇️

Bundle name Size Change
gazebo-staging-array-push 6.61MB 599 bytes ⬇️

Copy link

codecov bot commented May 13, 2024

Bundle Report

Changes will decrease total bundle size by 599 bytes ⬇️

Bundle name Size Change
gazebo-production-array-push 6.61MB 599 bytes ⬇️

Copy link

codecov bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.48%. Comparing base (059a9bc) to head (5a7e61a).

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2873   +/-   ##
=====================================
  Coverage   98.48   98.48           
=====================================
  Files        880     878    -2     
  Lines      13037   13026   -11     
  Branches    3429    3493   +64     
=====================================
- Hits       12839   12828   -11     
  Misses       194     194           
  Partials       4       4           
Files Coverage Δ
...rvices/file/useCommitBasedCoverageForFileViewer.ts 100.00% <100.00%> (ø)
...Contents/branch/file/usePrefetchBranchFileEntry.js 100.00% <ø> (ø)
...ontents/commit/file/usePrefetchCommitFileEntry.tsx 100.00% <ø> (ø)
src/services/pathContents/constants.ts 100.00% <ø> (ø)
...athContents/pull/file/usePrefetchPullFileEntry.tsx 100.00% <ø> (ø)
.../services/pathContents/useFileWithMainCoverage.tsx 100.00% <100.00%> (ø)
src/services/pathContents/utils.ts 100.00% <100.00%> (ø)
src/ui/CodeRenderer/SingleLine/SingleLine.jsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 54.54% <ø> (ø)
Layouts 97.26% <ø> (ø)
Pages 99.28% <ø> (ø)
Services 99.48% <100.00%> (-0.01%) ⬇️
Shared 99.68% <ø> (ø)
UI 94.53% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 059a9bc...5a7e61a. Read the comment docs.

@codecov-releaser
Copy link
Contributor

codecov-releaser commented May 13, 2024

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Commit Created Cloud Enterprise
eb9eca4 Mon, 13 May 2024 19:08:54 GMT Expired Expired
5a7e61a Thu, 16 May 2024 11:36:03 GMT Cloud Enterprise

@@ -14,7 +14,7 @@ export function extractCoverageFromResponse(
if (!coverageFile) return null
const lineWithCoverage = keyBy(coverageFile?.coverage, 'line')
const fileCoverage = mapValues(lineWithCoverage, 'coverage')
const coverageTotal = coverageFile?.totals?.coverage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this a bug fix too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, i had originally aliased the field in GQL, this is me removing it now and updating it, with TS makes it easier to find the errors

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! love it

Copy link
Contributor

@ajay-sentry ajay-sentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems legit, send it

@nicholas-codecov nicholas-codecov force-pushed the gh-eng-355-remove-repository-deprecated-from-use-coverage-with-filters branch from eb9eca4 to 5a7e61a Compare May 16, 2024 11:24
@nicholas-codecov nicholas-codecov added this pull request to the merge queue May 16, 2024
Merged via the queue into main with commit c1a8e81 May 16, 2024
57 of 60 checks passed
@nicholas-codecov nicholas-codecov deleted the gh-eng-355-remove-repository-deprecated-from-use-coverage-with-filters branch May 16, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants