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: Results array for impacted files is nullable #3422

Merged

Conversation

nicholas-codecov
Copy link
Contributor

@nicholas-codecov nicholas-codecov commented Oct 22, 2024

Description

This PR fixes some zod schema issues where a field was being marked as non-nullable, however it is in fact nullable. This was most likely the root cause for: #3371. I've gone through and updated all instances of this results field to be nullable, and all the places where it's used. This should resolve the issue raised in #3371, so i've gone ahead and removed that error boundary so we start collecting these network errors up in the NetworkErrorBoundary again.

Notable Changes

  • Update zod schemas in hooks calling impactedFiles.results from the API to be nullable
  • Update code using this field to handle if it is null
  • Update CoverageObjSchema in useCompareTotals to be coverage not percentCovered
  • Remove error boundary from FilesChangedTab

Copy link

codecov bot commented Oct 22, 2024

Bundle Report

Changes will increase total bundle size by 1.11kB (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 5.5MB 500 bytes (0.01%) ⬆️
gazebo-production-system-esm 5.55MB 613 bytes (0.01%) ⬆️

@codecov-staging
Copy link

codecov-staging bot commented Oct 22, 2024

Bundle Report

Changes will increase total bundle size by 1.11kB (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-staging-system-esm 5.55MB 613 bytes (0.01%) ⬆️
gazebo-staging-system 5.5MB 500 bytes (0.01%) ⬆️

@codecov-staging
Copy link

codecov-staging bot commented Oct 22, 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    #3422   +/-   ##
=======================================
  Coverage   99.15%   99.15%           
=======================================
  Files         809      809           
  Lines       14239    14275   +36     
  Branches     3923     3947   +24     
=======================================
+ Hits        14118    14154   +36     
  Misses        112      112           
  Partials        9        9           
Files with missing lines Coverage Δ
...overage/routes/FilesChangedTab/FilesChangedTab.tsx 100.00% <ø> (ø)
...ChangedTab/FilesChangedTable/FilesChangedTable.tsx 100.00% <100.00%> (ø)
...ab/FilesChangedTableTeam/FilesChangedTableTeam.tsx 100.00% <100.00%> (ø)
...sTab/IndirectChangesTable/IndirectChangesTable.tsx 100.00% <100.00%> (ø)
...lesChanged/FilesChangedTable/FilesChangedTable.tsx 100.00% <100.00%> (ø)
...lesChangedTab/FilesChanged/TableTeam/TableTeam.tsx 100.00% <100.00%> (ø)
src/services/commit/useCommit.tsx 100.00% <ø> (ø)
src/services/commit/useCommitTeam.tsx 100.00% <ø> (ø)
src/services/commit/useCompareTotals.tsx 100.00% <ø> (ø)
src/services/commit/useCompareTotalsTeam.tsx 100.00% <ø> (ø)
... and 3 more

... and 3 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.89% <100.00%> (+<0.01%) ⬆️
Services 99.45% <ø> (ø)
Shared 99.80% <ø> (ø)
UI 99.06% <ø> (ø)

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 34c9ae8...05b48de. Read the comment docs.

Copy link

codecov-public-qa bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.15%. Comparing base (34c9ae8) to head (05b48de).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3422   +/-   ##
=======================================
  Coverage   99.15%   99.15%           
=======================================
  Files         809      809           
  Lines       14239    14275   +36     
  Branches     3923     3940   +17     
=======================================
+ Hits        14118    14154   +36     
  Misses        112      112           
  Partials        9        9           
Files Coverage Δ
...overage/routes/FilesChangedTab/FilesChangedTab.tsx 100.00% <ø> (ø)
...ChangedTab/FilesChangedTable/FilesChangedTable.tsx 100.00% <100.00%> (ø)
...ab/FilesChangedTableTeam/FilesChangedTableTeam.tsx 100.00% <100.00%> (ø)
...sTab/IndirectChangesTable/IndirectChangesTable.tsx 100.00% <100.00%> (ø)
...lesChanged/FilesChangedTable/FilesChangedTable.tsx 100.00% <100.00%> (ø)
...lesChangedTab/FilesChanged/TableTeam/TableTeam.tsx 100.00% <100.00%> (ø)
src/services/commit/useCommit.tsx 100.00% <ø> (ø)
src/services/commit/useCommitTeam.tsx 100.00% <ø> (ø)
src/services/commit/useCompareTotals.tsx 100.00% <ø> (ø)
src/services/commit/useCompareTotalsTeam.tsx 100.00% <ø> (ø)
... and 3 more

... and 3 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.89% <100.00%> (+<0.01%) ⬆️
Services 99.45% <ø> (ø)
Shared 99.80% <ø> (ø)
UI 99.06% <ø> (ø)

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 34c9ae8...05b48de. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.15%. Comparing base (34c9ae8) to head (05b48de).
Report is 3 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3422   +/-   ##
=======================================
  Coverage   99.15%   99.15%           
=======================================
  Files         809      809           
  Lines       14239    14275   +36     
  Branches     3928     3940   +12     
=======================================
+ Hits        14118    14154   +36     
  Misses        112      112           
  Partials        9        9           
Files with missing lines Coverage Δ
...overage/routes/FilesChangedTab/FilesChangedTab.tsx 100.00% <ø> (ø)
...ChangedTab/FilesChangedTable/FilesChangedTable.tsx 100.00% <100.00%> (ø)
...ab/FilesChangedTableTeam/FilesChangedTableTeam.tsx 100.00% <100.00%> (ø)
...sTab/IndirectChangesTable/IndirectChangesTable.tsx 100.00% <100.00%> (ø)
...lesChanged/FilesChangedTable/FilesChangedTable.tsx 100.00% <100.00%> (ø)
...lesChangedTab/FilesChanged/TableTeam/TableTeam.tsx 100.00% <100.00%> (ø)
src/services/commit/useCommit.tsx 100.00% <ø> (ø)
src/services/commit/useCommitTeam.tsx 100.00% <ø> (ø)
src/services/commit/useCompareTotals.tsx 100.00% <ø> (ø)
src/services/commit/useCompareTotalsTeam.tsx 100.00% <ø> (ø)
... and 3 more

... and 3 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.89% <100.00%> (+<0.01%) ⬆️
Services 99.45% <ø> (ø)
Shared 99.80% <ø> (ø)
UI 99.06% <ø> (ø)

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 34c9ae8...05b48de. Read the comment docs.

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.15%. Comparing base (34c9ae8) to head (05b48de).
Report is 3 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3422   +/-   ##
=======================================
  Coverage   99.15%   99.15%           
=======================================
  Files         809      809           
  Lines       14239    14275   +36     
  Branches     3923     3940   +17     
=======================================
+ Hits        14118    14154   +36     
  Misses        112      112           
  Partials        9        9           
Files with missing lines Coverage Δ
...overage/routes/FilesChangedTab/FilesChangedTab.tsx 100.00% <ø> (ø)
...ChangedTab/FilesChangedTable/FilesChangedTable.tsx 100.00% <100.00%> (ø)
...ab/FilesChangedTableTeam/FilesChangedTableTeam.tsx 100.00% <100.00%> (ø)
...sTab/IndirectChangesTable/IndirectChangesTable.tsx 100.00% <100.00%> (ø)
...lesChanged/FilesChangedTable/FilesChangedTable.tsx 100.00% <100.00%> (ø)
...lesChangedTab/FilesChanged/TableTeam/TableTeam.tsx 100.00% <100.00%> (ø)
src/services/commit/useCommit.tsx 100.00% <ø> (ø)
src/services/commit/useCommitTeam.tsx 100.00% <ø> (ø)
src/services/commit/useCompareTotals.tsx 100.00% <ø> (ø)
src/services/commit/useCompareTotalsTeam.tsx 100.00% <ø> (ø)
... and 3 more

... and 3 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.89% <100.00%> (+<0.01%) ⬆️
Services 99.45% <ø> (ø)
Shared 99.80% <ø> (ø)
UI 99.06% <ø> (ø)

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 34c9ae8...05b48de. Read the comment docs.

@codecov-releaser
Copy link
Contributor

codecov-releaser commented Oct 22, 2024

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
b883508 Tue, 22 Oct 2024 13:12:38 GMT Expired Expired
05b48de Tue, 22 Oct 2024 15:55:19 GMT Cloud Enterprise

Copy link
Contributor

@suejung-sentry suejung-sentry left a comment

Choose a reason for hiding this comment

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

thanks for looking over that

@nicholas-codecov nicholas-codecov added this pull request to the merge queue Oct 22, 2024
Merged via the queue into main with commit c79614d Oct 22, 2024
62 checks passed
@nicholas-codecov nicholas-codecov deleted the fix-underlying-impacted-files-incorrect-zod-schemas branch October 22, 2024 17:59
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.

3 participants