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 barrel files from services collection (part 3) #3780

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

nicholas-codecov
Copy link
Contributor

Description

This PR is another in a series removing barrel files from across our application, in this PR we're removing them from services/repositoryToken, services/repoUploadToken, services/toast, services/toastNotification, services/tracking, and updating the relevant imports.

Ticket: codecov/engineering-team#3352

Notable Changes

  • Remove index from services/repositoryToken, services/repoUploadToken, services/toast, services/toastNotification, services/tracking
  • Update imports across app

Copy link

codecov bot commented Feb 26, 2025

Bundle Report

Changes will decrease total bundle size by 19.43kB (-0.16%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 6.12MB -11.77kB (-0.19%) ⬇️
gazebo-production-esm 6.2MB -7.66kB (-0.12%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-production-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js 3.73kB 37.24kB 11.12% ⚠️
assets/index.*.js 33 bytes 103.91kB 0.03%
assets/index.*.js -22 bytes 126.34kB -0.02%
assets/index.*.js 6 bytes 630.16kB 0.0%
assets/index.*.js -8.85kB 33.51kB -20.88%
assets/index.*.js 1 bytes 19.91kB 0.01%
assets/index.*.js -1 bytes 125.67kB -0.0%
assets/vendor_react_router.*.js -2.53kB 35.23kB -6.7%
assets/usePrefetchBranchDirEntry.*.js -22 bytes 7.85kB -0.28%

Files in assets/index.*.js:

  • ./src/layouts/BaseLayout/BaseLayout.tsx → Total Size: 3.41kB

  • ./src/layouts/ToastNotifications/NotificationItem.jsx → Total Size: 801 bytes

  • ./src/App.tsx → Total Size: 8.54kB

  • ./src/layouts/ToastNotifications/ToastNotifications.jsx → Total Size: 451 bytes

Files in assets/index.*.js:

  • ./src/pages/OwnerPage/OwnerPage.jsx → Total Size: 2.62kB
view changes for bundle: gazebo-production-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-legacy.*.js -22 bytes 113.76kB -0.02%
assets/index-legacy.*.js -5.02kB 35.7kB -12.32%
assets/index-legacy.*.js -1 bytes 114.38kB -0.0%
assets/index-legacy.*.js 88 bytes 98.41kB 0.09%
assets/index-legacy.*.js 1 bytes 18.86kB 0.01%
assets/vendor_react_router-legacy.*.js -6.8kB 30.18kB -18.38%
assets/usePrefetchBranchDirEntry-legacy.*.js -22 bytes 7.02kB -0.31%

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

  • ./src/pages/OwnerPage/OwnerPage.jsx → Total Size: 2.63kB

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (9136ccd) to head (4a0d5fe).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3780   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files         824      824           
  Lines       14786    14798   +12     
  Branches     4250     4249    -1     
=======================================
+ Hits        14597    14609   +12     
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
src/App.tsx 100.00% <ø> (ø)
src/layouts/BaseLayout/BaseLayout.tsx 100.00% <ø> (ø)
...rc/layouts/ToastNotifications/NotificationItem.jsx 100.00% <ø> (ø)
.../layouts/ToastNotifications/ToastNotifications.jsx 100.00% <ø> (ø)
...tings/tabs/Admin/DetailsSection/DetailsSection.jsx 100.00% <ø> (ø)
...ings/tabs/OktaAccess/hooks/useUpdateOktaConfig.tsx 100.00% <ø> (ø)
...ken/TokenlessSection/useSetUploadTokenRequired.tsx 100.00% <ø> (ø)
...s/tabs/OrgUploadToken/useGenerateOrgUploadToken.ts 100.00% <ø> (ø)
...tings/tabs/Profile/NameEmailCard/NameEmailCard.jsx 100.00% <ø> (ø)
src/pages/OwnerPage/OwnerPage.jsx 96.87% <ø> (ø)
... and 19 more

... and 2 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.29% <ø> (ø)
Services 99.36% <ø> (ø)
Shared 99.11% <ø> (+<0.01%) ⬆️
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 9136ccd...4a0d5fe. Read the comment docs.

@codecov-staging
Copy link

codecov-staging bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3780   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files         824      824           
  Lines       14786    14798   +12     
  Branches     4242     4257   +15     
=======================================
+ Hits        14597    14609   +12     
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
src/App.tsx 100.00% <ø> (ø)
src/layouts/BaseLayout/BaseLayout.tsx 100.00% <ø> (ø)
...rc/layouts/ToastNotifications/NotificationItem.jsx 100.00% <ø> (ø)
.../layouts/ToastNotifications/ToastNotifications.jsx 100.00% <ø> (ø)
...tings/tabs/Admin/DetailsSection/DetailsSection.jsx 100.00% <ø> (ø)
...ings/tabs/OktaAccess/hooks/useUpdateOktaConfig.tsx 100.00% <ø> (ø)
...ken/TokenlessSection/useSetUploadTokenRequired.tsx 100.00% <ø> (ø)
...s/tabs/OrgUploadToken/useGenerateOrgUploadToken.ts 100.00% <ø> (ø)
...tings/tabs/Profile/NameEmailCard/NameEmailCard.jsx 100.00% <ø> (ø)
src/pages/OwnerPage/OwnerPage.jsx 96.87% <ø> (ø)
... and 19 more

... and 2 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.29% <ø> (ø)
Services 99.36% <ø> (ø)
Shared 99.11% <ø> (+<0.01%) ⬆️
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 9136ccd...4a0d5fe. Read the comment docs.

Copy link

codecov-public-qa bot commented Feb 26, 2025

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
1760 2 1758 0
View the top 2 failed tests by shortest run time
src/services/trial/useStartTrial.test.tsx > useStartTrial > calling mutation > an unsuccessful mutation > internal server error > triggers toast
Stack Traces | 1.01s run time
AssertionError: expected "spy" to be called with arguments: [ { type: 'error', …(3) } ]

Received: 



Number of calls: 0


Ignored nodes: comments, script, style
<html>
  <head />
  <body>
    <div />
  </body>
</html>
 ❯ .../services/trial/useStartTrial.test.tsx:157:39runWithExpensiveErrorDiagnosticsDisabled node_modules/@.../dom/dist/config.js:47:12checkCallback node_modules/@.../dom/dist/wait-for.js:124:77Timeout.checkRealTimersCallback node_modules/@.../dom/dist/wait-for.js:118:16
src/services/trial/useStartTrial.test.tsx > useStartTrial > calling mutation > an unsuccessful mutation > handled server error > triggers render toast
Stack Traces | 1.01s run time
AssertionError: expected "spy" to be called with arguments: [ { type: 'error', …(3) } ]

Received: 



Number of calls: 0


Ignored nodes: comments, script, style
<html>
  <head />
  <body>
    <div />
  </body>
</html>
 ❯ .../services/trial/useStartTrial.test.tsx:135:39runWithExpensiveErrorDiagnosticsDisabled node_modules/@.../dom/dist/config.js:47:12checkCallback node_modules/@.../dom/dist/wait-for.js:124:77Timeout.checkRealTimersCallback node_modules/@.../dom/dist/wait-for.js:118:16

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@codecov-staging
Copy link

codecov-staging bot commented Feb 26, 2025

Bundle Report

Changes will decrease total bundle size by 19.43kB (-0.16%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-staging-system 6.12MB -11.77kB (-0.19%) ⬇️
gazebo-staging-esm 6.2MB -7.66kB (-0.12%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-staging-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js -1 bytes 125.67kB -0.0%
assets/index.*.js 1 bytes 19.91kB 0.01%
assets/index.*.js 33 bytes 103.91kB 0.03%
assets/index.*.js -5.12kB 37.24kB -12.09%
assets/index.*.js 6 bytes 630.16kB 0.0%
assets/index.*.js -22 bytes 126.34kB -0.02%
assets/vendor_react_router.*.js -2.53kB 35.23kB -6.7%
assets/usePrefetchBranchDirEntry.*.js -22 bytes 7.85kB -0.28%

Files in assets/index.*.js:

  • ./src/pages/OwnerPage/OwnerPage.jsx → Total Size: 2.62kB

Files in assets/index.*.js:

  • ./src/layouts/BaseLayout/BaseLayout.tsx → Total Size: 3.41kB

  • ./src/App.tsx → Total Size: 8.54kB

  • ./src/layouts/ToastNotifications/ToastNotifications.jsx → Total Size: 451 bytes

  • ./src/layouts/ToastNotifications/NotificationItem.jsx → Total Size: 801 bytes

view changes for bundle: gazebo-staging-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-legacy.*.js -1 bytes 114.38kB -0.0%
assets/index-legacy.*.js 2.61kB 35.7kB 7.88% ⚠️
assets/index-legacy.*.js 88 bytes 98.41kB 0.09%
assets/index-legacy.*.js -7.62kB 33.09kB -18.72%
assets/index-legacy.*.js 1 bytes 18.86kB 0.01%
assets/index-legacy.*.js -22 bytes 113.76kB -0.02%
assets/vendor_react_router-legacy.*.js -6.8kB 30.18kB -18.38%
assets/usePrefetchBranchDirEntry-legacy.*.js -22 bytes 7.02kB -0.31%

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

  • ./src/pages/OwnerPage/OwnerPage.jsx → Total Size: 2.63kB

@codecov-releaser
Copy link
Contributor

codecov-releaser commented Feb 26, 2025

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
c292d6b Wed, 26 Feb 2025 13:49:18 GMT Expired Expired
8d0388c Wed, 26 Feb 2025 14:06:46 GMT Expired Expired
4a0d5fe Wed, 26 Feb 2025 15:15:30 GMT Cloud Enterprise

@codecov-qa
Copy link

codecov-qa bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (9136ccd) to head (4a0d5fe).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3780   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files         824      824           
  Lines       14786    14798   +12     
  Branches     4242     4249    +7     
=======================================
+ Hits        14597    14609   +12     
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
src/App.tsx 100.00% <ø> (ø)
src/layouts/BaseLayout/BaseLayout.tsx 100.00% <ø> (ø)
...rc/layouts/ToastNotifications/NotificationItem.jsx 100.00% <ø> (ø)
.../layouts/ToastNotifications/ToastNotifications.jsx 100.00% <ø> (ø)
...tings/tabs/Admin/DetailsSection/DetailsSection.jsx 100.00% <ø> (ø)
...ings/tabs/OktaAccess/hooks/useUpdateOktaConfig.tsx 100.00% <ø> (ø)
...ken/TokenlessSection/useSetUploadTokenRequired.tsx 100.00% <ø> (ø)
...s/tabs/OrgUploadToken/useGenerateOrgUploadToken.ts 100.00% <ø> (ø)
...tings/tabs/Profile/NameEmailCard/NameEmailCard.jsx 100.00% <ø> (ø)
src/pages/OwnerPage/OwnerPage.jsx 96.87% <ø> (ø)
... and 19 more

... and 2 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.29% <ø> (ø)
Services 99.36% <ø> (ø)
Shared 99.11% <ø> (+<0.01%) ⬆️
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 9136ccd...4a0d5fe. Read the comment docs.

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