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

fix: Hide sunburst on very large repos #2850

Merged
merged 12 commits into from May 22, 2024

Conversation

nicholas-codecov
Copy link
Contributor

@nicholas-codecov nicholas-codecov commented May 7, 2024

Description

This PR contains a temp fix that hides the sunburst chart if there are more than 200,000 files in a given repo, until we have some more time to further investigate and come up with a solution for this.

Notable Changes

  • Grab file count in new useCoverageTabData hook
  • Hide Sunburst currently if file count is less than or equal to 200_000
  • Update/add in tests

@codecov-qa
Copy link

codecov-qa bot commented May 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.46%. Comparing base (66f3413) to head (534b907).

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2850      +/-   ##
==========================================
- Coverage   98.46%   98.46%   -0.01%     
==========================================
  Files         877      878       +1     
  Lines       12998    13033      +35     
  Branches     3420     3432      +12     
==========================================
+ Hits        12799    12833      +34     
- Misses        195      196       +1     
  Partials        4        4              
Files Coverage Δ
src/pages/RepoPage/CoverageTab/CoverageTab.jsx 100.00% <100.00%> (ø)
.../RepoPage/CoverageTab/hooks/useCoverageTabData.tsx 100.00% <100.00%> (ø)
...verageTab/subroute/CoverageChart/CoverageChart.jsx 100.00% <100.00%> (ø)
src/services/repo/useRepoCoverage.tsx 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Components Coverage Δ
Assets 54.54% <ø> (ø)
Layouts 97.26% <ø> (ø)
Pages 99.27% <100.00%> (-0.02%) ⬇️
Services 99.48% <100.00%> (ø)
Shared 99.68% <ø> (ø)
UI 94.37% <ø> (ø)

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 66f3413...534b907. Read the comment docs.

Copy link

codecov bot commented May 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.46%. Comparing base (66f3413) to head (534b907).

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2850   +/-   ##
=====================================
  Coverage   98.46   98.46           
=====================================
  Files        877     878    +1     
  Lines      12998   13033   +35     
  Branches    3484    3432   -52     
=====================================
+ Hits       12799   12833   +34     
- Misses       195     196    +1     
  Partials       4       4           
Files Coverage Δ
src/pages/RepoPage/CoverageTab/CoverageTab.jsx 100.00% <100.00%> (ø)
.../RepoPage/CoverageTab/hooks/useCoverageTabData.tsx 100.00% <100.00%> (ø)
...verageTab/subroute/CoverageChart/CoverageChart.jsx 100.00% <100.00%> (ø)
src/services/repo/useRepoCoverage.tsx 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Components Coverage Δ
Assets 54.54% <ø> (ø)
Layouts 97.26% <ø> (ø)
Pages 99.27% <100.00%> (-0.02%) ⬇️
Services 99.48% <100.00%> (ø)
Shared 99.68% <ø> (ø)
UI 94.37% <ø> (ø)

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 66f3413...534b907. Read the comment docs.

Copy link

codecov-public-qa bot commented May 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.46%. Comparing base (66f3413) to head (534b907).

✅ All tests successful. No failed tests found ☺️

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2850      +/-   ##
==========================================
- Coverage   98.46%   98.46%   -0.01%     
==========================================
  Files         877      878       +1     
  Lines       12998    13033      +35     
  Branches     3489     3496       +7     
==========================================
+ Hits        12799    12833      +34     
- Misses        195      196       +1     
  Partials        4        4              
Files Coverage Δ
src/pages/RepoPage/CoverageTab/CoverageTab.jsx 100.00% <100.00%> (ø)
.../RepoPage/CoverageTab/hooks/useCoverageTabData.tsx 100.00% <100.00%> (ø)
...verageTab/subroute/CoverageChart/CoverageChart.jsx 100.00% <100.00%> (ø)
src/services/repo/useRepoCoverage.tsx 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Components Coverage Δ
Assets 54.54% <ø> (ø)
Layouts 97.26% <ø> (ø)
Pages 99.27% <100.00%> (-0.02%) ⬇️
Services 99.48% <100.00%> (ø)
Shared 99.68% <ø> (ø)
UI 94.37% <ø> (ø)

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 66f3413...534b907. Read the comment docs.

@codecov-staging
Copy link

codecov-staging bot commented May 7, 2024

Bundle Report

Changes will increase total bundle size by 5.2kB ⬆️

Bundle name Size Change
gazebo-staging-array-push 6.61MB 5.2kB ⬆️

Copy link

codecov bot commented May 7, 2024

Bundle Report

Changes will increase total bundle size by 5.2kB ⬆️

Bundle name Size Change
gazebo-production-array-push 6.61MB 5.2kB ⬆️

@codecov-releaser
Copy link
Contributor

codecov-releaser commented May 7, 2024

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Commit Created Cloud Enterprise
a056dcf Tue, 07 May 2024 12:51:16 GMT Expired Expired
87a5a8e Tue, 07 May 2024 19:33:59 GMT Expired Expired
48eafc3 Thu, 16 May 2024 16:15:51 GMT Expired Expired
d1306dc Thu, 16 May 2024 16:55:51 GMT Expired Expired
9d5cdc4 Thu, 16 May 2024 17:09:43 GMT Expired Expired
e28dde5 Thu, 16 May 2024 18:02:08 GMT Expired Expired
315e138 Fri, 17 May 2024 10:45:02 GMT Expired Expired
1fe004c Fri, 17 May 2024 13:21:21 GMT Expired Expired
efb4c5d Fri, 17 May 2024 13:46:03 GMT Expired Expired
7b81ba7 Wed, 22 May 2024 10:51:28 GMT Expired Expired
534b907 Wed, 22 May 2024 14:53:36 GMT Cloud Enterprise

@codecov-staging
Copy link

codecov-staging bot commented May 16, 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    #2850      +/-   ##
==========================================
- Coverage   98.46%   98.46%   -0.01%     
==========================================
  Files         877      878       +1     
  Lines       12998    13033      +35     
  Branches     3484     3432      -52     
==========================================
+ Hits        12799    12833      +34     
- Misses        195      196       +1     
  Partials        4        4              
Files Coverage Δ
src/pages/RepoPage/CoverageTab/CoverageTab.jsx 100.00% <100.00%> (ø)
.../RepoPage/CoverageTab/hooks/useCoverageTabData.tsx 100.00% <100.00%> (ø)
...verageTab/subroute/CoverageChart/CoverageChart.jsx 100.00% <100.00%> (ø)
src/services/repo/useRepoCoverage.tsx 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Components Coverage Δ
Assets 54.54% <ø> (ø)
Layouts 97.26% <ø> (ø)
Pages 99.27% <100.00%> (-0.02%) ⬇️
Services 99.48% <100.00%> (ø)
Shared 99.68% <ø> (ø)
UI 94.37% <ø> (ø)

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 66f3413...534b907. Read the comment docs.


let displaySunburst = false
const fileCount = data?.branch?.head?.totals?.fileCount
if (typeof fileCount === 'number' && fileCount <= 200_000) {
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be 10_000? And maybe we can set to a const to avoid having magic numbers; like MAX_FILES_FOR_SUNBURST

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.

looks good

@nicholas-codecov nicholas-codecov force-pushed the gh-int-472-hide-sunburst-on-very-large-repos branch from 7b81ba7 to 534b907 Compare May 22, 2024 14:41
@nicholas-codecov nicholas-codecov added this pull request to the merge queue May 22, 2024
Merged via the queue into main with commit 6a5f330 May 22, 2024
57 of 60 checks passed
@nicholas-codecov nicholas-codecov deleted the gh-int-472-hide-sunburst-on-very-large-repos branch May 22, 2024 15:49
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