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

feat: Update current usage of rejectNetworkError #3758

Merged

Conversation

nicholas-codecov
Copy link
Contributor

Description

This PR adjusts somethings in the new rejectNetworkError, remove the old rejectNetworkError implementation, and updates all current usage of rejectNetworkError to the new implementation.

Ticket: codecov/engineering-team#3329

Notable Changes

  • Rename caller to callingFn in errorDetails
  • Remove old implementation of rejectNetworkError
  • Update usage to the new implementation of rejectNetworkError

@codecov-staging
Copy link

❌ 45 Tests Failed:

Tests completed Failed Passed Skipped
4192 45 4147 2
View the top 3 failed test(s) by shortest run time
src/services/orgUploadToken/useRegenerateOrgUploadToken.test.tsx > src/services/orgUploadToken/useRegenerateOrgUploadToken.test.tsx
Stack Traces | 0s run time
Error: rejectNetworkError does not exist
 ❯ .../services/orgUploadToken/useRegenerateOrgUploadToken.test.tsx:14:26
src/services/bundleAnalysis/useUpdateBundleCache.test.tsx > useUpdateBundleCache > when the mutation fails > when the mutation fails with a parsing error > the mutation response fails to parse > returns a parsing error
Stack Traces | 0.0546s run time
AssertionError: expected { …(3) } to deeply equal { data: {}, …(2) }

- Expected
+ Received

  Object {
-   "data": Object {},
-   "dev": "useUpdateBundleCache - 400 failed to parse data",
+   "data": undefined,
+   "dev": "useUpdateBundleCache - Parsing Error",
    "status": 400,
  }

 ❯ .../services/bundleAnalysis/useUpdateBundleCache.test.tsx:170:40
src/services/bundleAnalysis/useUpdateBundleCache.test.tsx > useUpdateBundleCache > when the mutation fails > when the mutation fails with a parsing error > the mutation input fails to parse > returns a parsing error
Stack Traces | 0.0584s run time
AssertionError: expected { …(3) } to deeply equal { data: {}, …(2) }

- Expected
+ Received

  Object {
-   "data": Object {},
-   "dev": "useUpdateBundleCache - 400 failed to parse input",
+   "data": undefined,
+   "dev": "useUpdateBundleCache - Parsing Error",
    "status": 400,
  }

 ❯ .../services/bundleAnalysis/useUpdateBundleCache.test.tsx:142:40

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@codecov-qa
Copy link

codecov-qa bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.67%. Comparing base (3f72266) to head (dafd8d4).
Report is 5 commits behind head on main.

✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main    #3758      +/-   ##
==========================================
- Coverage   98.70%   98.67%   -0.03%     
==========================================
  Files         823      825       +2     
  Lines       14801    14836      +35     
  Branches     4228     4250      +22     
==========================================
+ Hits        14609    14640      +31     
- Misses        186      189       +3     
- Partials        6        7       +1     
Files with missing lines Coverage Δ
...layouts/BaseLayout/hooks/NavigatorDataQueryOpts.ts 100.00% <ø> (ø)
...ings/tabs/OktaAccess/hooks/useUpdateOktaConfig.tsx 100.00% <ø> (ø)
...gs/tabs/OktaAccess/queries/OktaConfigQueryOpts.tsx 100.00% <ø> (ø)
...ken/TokenlessSection/useSetUploadTokenRequired.tsx 100.00% <ø> (ø)
...eaderDefault/queries/CommitHeaderDataQueryOpts.tsx 100.00% <ø> (ø)
...aderTeam/queries/CommitHeaderDataTeamQueryOpts.tsx 100.00% <ø> (ø)
...mmitDetailPage/queries/CommitPageDataQueryOpts.tsx 100.00% <ø> (ø)
...rc/pages/PlanPage/queries/PlanPageDataQueryOpts.ts 100.00% <100.00%> (ø)
...gPlan/queries/EnterpriseAccountDetailsQueryOpts.ts 100.00% <ø> (ø)
...n/queries/InfiniteAccountOrganizationsQueryOpts.ts 100.00% <ø> (ø)
... and 42 more

... and 7 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.26% <100.00%> (ø)
Services 99.24% <ø> (ø)
Shared 99.11% <100.00%> (-0.26%) ⬇️
UI 99.07% <ø> (ø)

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 3f72266...dafd8d4. Read the comment docs.

Copy link

codecov bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.67%. Comparing base (3f72266) to head (dafd8d4).
Report is 5 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3758      +/-   ##
==========================================
- Coverage   98.70%   98.67%   -0.03%     
==========================================
  Files         823      825       +2     
  Lines       14801    14836      +35     
  Branches     4220     4242      +22     
==========================================
+ Hits        14609    14640      +31     
- Misses        186      189       +3     
- Partials        6        7       +1     
Files with missing lines Coverage Δ
...layouts/BaseLayout/hooks/NavigatorDataQueryOpts.ts 100.00% <ø> (ø)
...ings/tabs/OktaAccess/hooks/useUpdateOktaConfig.tsx 100.00% <ø> (ø)
...gs/tabs/OktaAccess/queries/OktaConfigQueryOpts.tsx 100.00% <ø> (ø)
...ken/TokenlessSection/useSetUploadTokenRequired.tsx 100.00% <ø> (ø)
...eaderDefault/queries/CommitHeaderDataQueryOpts.tsx 100.00% <ø> (ø)
...aderTeam/queries/CommitHeaderDataTeamQueryOpts.tsx 100.00% <ø> (ø)
...mmitDetailPage/queries/CommitPageDataQueryOpts.tsx 100.00% <ø> (ø)
...rc/pages/PlanPage/queries/PlanPageDataQueryOpts.ts 100.00% <100.00%> (ø)
...gPlan/queries/EnterpriseAccountDetailsQueryOpts.ts 100.00% <ø> (ø)
...n/queries/InfiniteAccountOrganizationsQueryOpts.ts 100.00% <ø> (ø)
... and 42 more

... and 7 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.26% <100.00%> (ø)
Services 99.24% <ø> (ø)
Shared 99.11% <100.00%> (-0.26%) ⬇️
UI 99.07% <ø> (ø)

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 3f72266...dafd8d4. Read the comment docs.

Copy link

codecov-public-qa bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.67%. Comparing base (3f72266) to head (dafd8d4).
Report is 5 commits behind head on main.

✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main    #3758      +/-   ##
==========================================
- Coverage   98.70%   98.67%   -0.03%     
==========================================
  Files         823      825       +2     
  Lines       14801    14836      +35     
  Branches     4220     4250      +30     
==========================================
+ Hits        14609    14640      +31     
- Misses        186      189       +3     
- Partials        6        7       +1     
Files with missing lines Coverage Δ
...layouts/BaseLayout/hooks/NavigatorDataQueryOpts.ts 100.00% <ø> (ø)
...ings/tabs/OktaAccess/hooks/useUpdateOktaConfig.tsx 100.00% <ø> (ø)
...gs/tabs/OktaAccess/queries/OktaConfigQueryOpts.tsx 100.00% <ø> (ø)
...ken/TokenlessSection/useSetUploadTokenRequired.tsx 100.00% <ø> (ø)
...eaderDefault/queries/CommitHeaderDataQueryOpts.tsx 100.00% <ø> (ø)
...aderTeam/queries/CommitHeaderDataTeamQueryOpts.tsx 100.00% <ø> (ø)
...mmitDetailPage/queries/CommitPageDataQueryOpts.tsx 100.00% <ø> (ø)
...rc/pages/PlanPage/queries/PlanPageDataQueryOpts.ts 100.00% <100.00%> (ø)
...gPlan/queries/EnterpriseAccountDetailsQueryOpts.ts 100.00% <ø> (ø)
...n/queries/InfiniteAccountOrganizationsQueryOpts.ts 100.00% <ø> (ø)
... and 42 more

... and 7 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.26% <100.00%> (ø)
Services 99.24% <ø> (ø)
Shared 99.11% <100.00%> (-0.26%) ⬇️
UI 99.07% <ø> (ø)

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 3f72266...dafd8d4. Read the comment docs.

Copy link

codecov bot commented Feb 21, 2025

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-production-system 6.14MB 2.36kB (0.04%) ⬆️
gazebo-production-esm 6.2MB 2.66kB (0.04%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-production-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js 20 bytes 9.62kB 0.21%
assets/index.*.js 6 bytes 7.57kB 0.08%
assets/index.*.js 105 bytes 125.77kB 0.08%
assets/index.*.js 6 bytes 3.59kB 0.17%
assets/index.*.js 517 bytes 630.1kB 0.08%
assets/index.*.js 61 bytes 48.49kB 0.13%
assets/index.*.js 32 bytes 55.21kB 0.06%
assets/index.*.js 48 bytes 42.36kB 0.11%
assets/index.*.js 6 bytes 9.46kB 0.06%
assets/index.*.js 445 bytes 19.91kB 2.29%
assets/index.*.js 163 bytes 125.5kB 0.13%
assets/index.*.js 42 bytes 104.1kB 0.04%
assets/index.*.js 5 bytes 17.22kB 0.03%
assets/index.*.js 142 bytes 53.91kB 0.26%
assets/RawFileViewer.*.js 29 bytes 127.11kB 0.02%
assets/ReposTable.*.js 995 bytes 11.24kB 9.71% ⚠️
assets/ConfigureCachedBundleModal.*.js 26 bytes 8.42kB 0.31%
assets/useOrgUploadToken.*.js 15 bytes 695 bytes 2.21%

Files in assets/index.*.js:

  • ./src/pages/AccountSettings/tabs/OktaAccess/hooks/useUpdateOktaConfig.tsx → Total Size: 2.85kB

Files in assets/index.*.js:

  • ./src/pages/PullRequestPage/queries/PullPageDataQueryOpts.tsx → Total Size: 5.75kB

  • ./src/pages/PullRequestPage/PullCoverage/routes/ComponentsTab/queries/ComponentComparisonQueryOpts.tsx → Total Size: 4.31kB

Files in assets/index.*.js:

  • ./src/layouts/BaseLayout/hooks/NavigatorDataQueryOpts.ts → Total Size: 1.65kB

  • ./src/pages/AccountSettings/tabs/OktaAccess/queries/OktaConfigQueryOpts.tsx → Total Size: 1.45kB

Files in assets/index.*.js:

  • ./src/pages/PlanPage/subRoutes/CurrentOrgPlan/useCurrentOrgPlanPageData.tsx → Total Size: 1.36kB

  • ./src/pages/PlanPage/subRoutes/CurrentOrgPlan/queries/InfiniteAccountOrganizationsQueryOpts.ts → Total Size: 2.64kB

  • ./src/pages/PlanPage/subRoutes/CurrentOrgPlan/queries/EnterpriseAccountDetailsQueryOpts.ts → Total Size: 1.26kB

Files in assets/index.*.js:

  • ./src/pages/RepoPage/ConfigTab/tabs/ConfigurationManager/hooks/useRepoConfigurationStatus/RepoConfigurationStatusQueryOpts.tsx → Total Size: 3.08kB

  • ./src/pages/RepoPage/ConfigTab/tabs/GeneralTab/queries/RepoForTokensTeamQueryOpts.tsx → Total Size: 2.27kB

Files in assets/index.*.js:

  • ./src/pages/AccountSettings/tabs/OrgUploadToken/TokenlessSection/useSetUploadTokenRequired.tsx → Total Size: 2.45kB

Files in assets/index.*.js:

  • ./src/pages/CommitDetailPage/Header/HeaderTeam/queries/CommitHeaderDataTeamQueryOpts.tsx → Total Size: 4.1kB

  • ./src/pages/CommitDetailPage/queries/CommitPageDataQueryOpts.tsx → Total Size: 4.71kB

  • ./src/pages/CommitDetailPage/Header/HeaderDefault/queries/CommitHeaderDataQueryOpts.tsx → Total Size: 2.85kB

Files in assets/index.*.js:

  • ./src/pages/PlanPage/queries/PlanPageDataQueryOpts.ts → Total Size: 1.02kB
view changes for bundle: gazebo-production-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-legacy.*.js 61 bytes 44.91kB 0.14%
assets/index-legacy.*.js 6 bytes 9.47kB 0.06%
assets/index-legacy.*.js 32 bytes 52.17kB 0.06%
assets/index-legacy.*.js 5 bytes 16.8kB 0.03%
assets/index-legacy.*.js 163 bytes 114.18kB 0.14%
assets/index-legacy.*.js 454 bytes 709.67kB 0.06%
assets/index-legacy.*.js 142 bytes 49.74kB 0.29%
assets/index-legacy.*.js 105 bytes 113.19kB 0.09%
assets/index-legacy.*.js 6 bytes 7.53kB 0.08%
assets/index-legacy.*.js 42 bytes 98.55kB 0.04%
assets/index-legacy.*.js 48 bytes 40.71kB 0.12%
assets/index-legacy.*.js 374 bytes 18.86kB 2.02%
assets/index-legacy.*.js 20 bytes 9.51kB 0.21%
assets/index-legacy.*.js 6 bytes 3.58kB 0.17%
assets/RawFileViewer-legacy.*.js 29 bytes 127.34kB 0.02%
assets/ReposTable-legacy.*.js 826 bytes 10.49kB 8.55% ⚠️
assets/ConfigureCachedBundleModal-legacy.*.js 26 bytes 7.99kB 0.33%
assets/useOrgUploadToken-legacy.*.js 15 bytes 701 bytes 2.19%

Files in assets/index-legacy.*.js:

  • ./src/pages/AccountSettings/tabs/OrgUploadToken/TokenlessSection/useSetUploadTokenRequired.tsx → Total Size: 2.45kB

Files in assets/index-legacy.*.js:

  • ./src/pages/PlanPage/subRoutes/CurrentOrgPlan/queries/InfiniteAccountOrganizationsQueryOpts.ts → Total Size: 2.64kB

  • ./src/pages/PlanPage/subRoutes/CurrentOrgPlan/queries/EnterpriseAccountDetailsQueryOpts.ts → Total Size: 1.26kB

  • ./src/pages/PlanPage/subRoutes/CurrentOrgPlan/useCurrentOrgPlanPageData.tsx → Total Size: 1.36kB

Files in assets/index-legacy.*.js:

  • ./src/pages/PlanPage/queries/PlanPageDataQueryOpts.ts → Total Size: 1.02kB

Files in assets/index-legacy.*.js:

  • ./src/pages/CommitDetailPage/Header/HeaderTeam/queries/CommitHeaderDataTeamQueryOpts.tsx → Total Size: 4.1kB

  • ./src/pages/CommitDetailPage/queries/CommitPageDataQueryOpts.tsx → Total Size: 4.71kB

  • ./src/pages/CommitDetailPage/Header/HeaderDefault/queries/CommitHeaderDataQueryOpts.tsx → Total Size: 2.85kB

Files in assets/index-legacy.*.js:

  • ./src/pages/AccountSettings/tabs/OktaAccess/queries/OktaConfigQueryOpts.tsx → Total Size: 1.45kB

  • ./src/layouts/BaseLayout/hooks/NavigatorDataQueryOpts.ts → Total Size: 1.65kB

Files in assets/index-legacy.*.js:

  • ./src/pages/PullRequestPage/queries/PullPageDataQueryOpts.tsx → Total Size: 5.75kB

  • ./src/pages/PullRequestPage/PullCoverage/routes/ComponentsTab/queries/ComponentComparisonQueryOpts.tsx → Total Size: 4.31kB

Files in assets/index-legacy.*.js:

  • ./src/pages/AccountSettings/tabs/OktaAccess/hooks/useUpdateOktaConfig.tsx → Total Size: 2.85kB

Files in assets/index-legacy.*.js:

  • ./src/pages/RepoPage/ConfigTab/tabs/GeneralTab/queries/RepoForTokensTeamQueryOpts.tsx → Total Size: 2.27kB

  • ./src/pages/RepoPage/ConfigTab/tabs/ConfigurationManager/hooks/useRepoConfigurationStatus/RepoConfigurationStatusQueryOpts.tsx → Total Size: 3.08kB

@codecov-releaser
Copy link
Contributor

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
dafd8d4 Fri, 21 Feb 2025 11:53:49 GMT Cloud Enterprise

@nicholas-codecov nicholas-codecov added this pull request to the merge queue Feb 21, 2025
Merged via the queue into main with commit 67df9ca Feb 21, 2025
51 of 54 checks passed
@nicholas-codecov nicholas-codecov deleted the gh-eng-3329-update-current-usage-of-rejectNetworkError branch February 21, 2025 16:03
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