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: Migrate useSelfHostedCurrentUser to TS Query V5 #3582

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

Conversation

nicholas-codecov
Copy link
Contributor

@nicholas-codecov nicholas-codecov commented Dec 13, 2024

Description

This PR migrates the useSelfHostedCurrentUser to the TS Query V5 queryOptions API version SelfHostedCurrentUserQueryOpts

Ticket: codecov/engineering-team#2961

Notable Changes

  • Migrate useSelfHostedCurrentUser to SelfHostedCurrentUserQueryOpts
  • Migrate useSelfActivationMutation to TS Query V5
  • Update usage in AdminLink, Profile, ActivationBanner, useSelfActivationMutation, AdminSettings, ActivationRequiredSelfHosted` x 2

@codecov-staging
Copy link

codecov-staging bot commented Dec 13, 2024

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-staging-system-esm 6.06MB 3.08kB (0.05%) ⬆️
gazebo-staging-system 6.0MB 2.25kB (0.04%) ⬆️

Copy link

codecov bot commented Dec 13, 2024

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-production-system 6.0MB 2.25kB (0.04%) ⬆️
gazebo-production-system-esm 6.06MB 3.08kB (0.05%) ⬆️

@codecov-notifications
Copy link

codecov-notifications bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main    #3582      +/-   ##
==========================================
- Coverage   99.00%   98.99%   -0.01%     
==========================================
  Files         810      810              
  Lines       14554    14556       +2     
  Branches     4142     4143       +1     
==========================================
+ Hits        14409    14410       +1     
- Misses        138      139       +1     
  Partials        7        7              
Files with missing lines Coverage Δ
.../layouts/Header/components/AdminLink/AdminLink.tsx 100.00% <100.00%> (ø)
...tabs/Profile/ActivationBanner/ActivationBanner.jsx 100.00% <100.00%> (ø)
...file/ActivationBanner/useSelfActivationMutation.js 100.00% <100.00%> (ø)
src/pages/AccountSettings/tabs/Profile/Profile.jsx 88.88% <100.00%> (-11.12%) ⬇️
src/pages/AdminSettings/AdminSettings.jsx 100.00% <100.00%> (ø)
...equiredSelfHosted/ActivationRequiredSelfHosted.tsx 100.00% <100.00%> (ø)
...equiredSelfHosted/ActivationRequiredSelfHosted.tsx 100.00% <100.00%> (ø)
...vices/selfHosted/SelfHostedCurrentUserQueryOpts.ts 88.88% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <100.00%> (+<0.01%) ⬆️
Pages 98.72% <100.00%> (-0.02%) ⬇️
Services 99.36% <100.00%> (ø)
Shared 99.44% <ø> (ø)
UI 99.14% <ø> (ø)

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 0e34c4d...6d8af86. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.99%. Comparing base (0e34c4d) to head (6d8af86).

✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main    #3582      +/-   ##
==========================================
- Coverage   99.00%   98.99%   -0.01%     
==========================================
  Files         810      810              
  Lines       14554    14556       +2     
  Branches     4142     4143       +1     
==========================================
+ Hits        14409    14410       +1     
- Misses        138      139       +1     
  Partials        7        7              
Files with missing lines Coverage Δ
.../layouts/Header/components/AdminLink/AdminLink.tsx 100.00% <100.00%> (ø)
...tabs/Profile/ActivationBanner/ActivationBanner.jsx 100.00% <100.00%> (ø)
...file/ActivationBanner/useSelfActivationMutation.js 100.00% <100.00%> (ø)
src/pages/AccountSettings/tabs/Profile/Profile.jsx 88.88% <100.00%> (-11.12%) ⬇️
src/pages/AdminSettings/AdminSettings.jsx 100.00% <100.00%> (ø)
...equiredSelfHosted/ActivationRequiredSelfHosted.tsx 100.00% <100.00%> (ø)
...equiredSelfHosted/ActivationRequiredSelfHosted.tsx 100.00% <100.00%> (ø)
...vices/selfHosted/SelfHostedCurrentUserQueryOpts.ts 88.88% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <100.00%> (+<0.01%) ⬆️
Pages 98.72% <100.00%> (-0.02%) ⬇️
Services 99.36% <100.00%> (ø)
Shared 99.44% <ø> (ø)
UI 99.14% <ø> (ø)

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 0e34c4d...6d8af86. Read the comment docs.

Copy link

codecov-public-qa bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.99%. Comparing base (0e34c4d) to head (6d8af86).

✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main    #3582      +/-   ##
==========================================
- Coverage   99.00%   98.99%   -0.01%     
==========================================
  Files         810      810              
  Lines       14554    14556       +2     
  Branches     4142     4143       +1     
==========================================
+ Hits        14409    14410       +1     
- Misses        138      139       +1     
  Partials        7        7              
Files with missing lines Coverage Δ
.../layouts/Header/components/AdminLink/AdminLink.tsx 100.00% <100.00%> (ø)
...tabs/Profile/ActivationBanner/ActivationBanner.jsx 100.00% <100.00%> (ø)
...file/ActivationBanner/useSelfActivationMutation.js 100.00% <100.00%> (ø)
src/pages/AccountSettings/tabs/Profile/Profile.jsx 88.88% <100.00%> (-11.12%) ⬇️
src/pages/AdminSettings/AdminSettings.jsx 100.00% <100.00%> (ø)
...equiredSelfHosted/ActivationRequiredSelfHosted.tsx 100.00% <100.00%> (ø)
...equiredSelfHosted/ActivationRequiredSelfHosted.tsx 100.00% <100.00%> (ø)
...vices/selfHosted/SelfHostedCurrentUserQueryOpts.ts 88.88% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <100.00%> (+<0.01%) ⬆️
Pages 98.72% <100.00%> (-0.02%) ⬇️
Services 99.36% <100.00%> (ø)
Shared 99.44% <ø> (ø)
UI 99.14% <ø> (ø)

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 0e34c4d...6d8af86. Read the comment docs.

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.99%. Comparing base (0e34c4d) to head (6d8af86).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3582      +/-   ##
==========================================
- Coverage   99.00%   98.99%   -0.01%     
==========================================
  Files         810      810              
  Lines       14554    14556       +2     
  Branches     4142     4150       +8     
==========================================
+ Hits        14409    14410       +1     
- Misses        138      139       +1     
  Partials        7        7              
Files with missing lines Coverage Δ
.../layouts/Header/components/AdminLink/AdminLink.tsx 100.00% <100.00%> (ø)
...tabs/Profile/ActivationBanner/ActivationBanner.jsx 100.00% <100.00%> (ø)
...file/ActivationBanner/useSelfActivationMutation.js 100.00% <100.00%> (ø)
src/pages/AccountSettings/tabs/Profile/Profile.jsx 88.88% <100.00%> (-11.12%) ⬇️
src/pages/AdminSettings/AdminSettings.jsx 100.00% <100.00%> (ø)
...equiredSelfHosted/ActivationRequiredSelfHosted.tsx 100.00% <100.00%> (ø)
...equiredSelfHosted/ActivationRequiredSelfHosted.tsx 100.00% <100.00%> (ø)
...vices/selfHosted/SelfHostedCurrentUserQueryOpts.ts 88.88% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <100.00%> (+<0.01%) ⬆️
Pages 98.72% <100.00%> (-0.02%) ⬇️
Services 99.36% <100.00%> (ø)
Shared 99.44% <ø> (ø)
UI 99.14% <ø> (ø)

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 0e34c4d...6d8af86. Read the comment docs.

@codecov-releaser
Copy link
Contributor

codecov-releaser commented Dec 13, 2024

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
1cca9c1 Fri, 13 Dec 2024 18:33:23 GMT Expired Expired
6d8af86 Fri, 27 Dec 2024 14:45:02 GMT Cloud Enterprise

const { data } = useSelfHostedCurrentUser()
const { provider } = useParams<URLParams>()
const { data } = useSuspenseQueryV5(
SelfHostedCurrentUserQueryOpts({ provider })
Copy link
Contributor

Choose a reason for hiding this comment

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

same Q re: provider is case-sensitive here? - #3580 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Answer in the previous thread

@nicholas-codecov nicholas-codecov force-pushed the gh-eng-2961-chore-migrate-useSelfHostedCurrentUser-to-tsqv5 branch from 1cca9c1 to 6d8af86 Compare December 27, 2024 14:39
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