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 useSelfHostedSeatsConfig to TS Query V5 #3580

Conversation

nicholas-codecov
Copy link
Contributor

Description

This PR migrates the useSelfHostedSeatsConfig to the TS Query V5 queryOptions version SelfHostedSeatsConfigQueryOpts

Ticket: codecov/engineering-team#2961

Notable Changes

  • Migrate useSelfHostedSeatsConfig to SelfHostedSeatsConfigQueryOpts
  • Update usage in SeatDetails, ActivationBanner, ActivationRequiredSelfHosted, ActivationRequiredSelfHosted
  • Fix issue in Profile tests

Copy link

codecov bot commented Dec 13, 2024

Bundle Report

Changes will increase total bundle size by 481 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 6.0MB 233 bytes (0.0%) ⬆️
gazebo-production-system-esm 6.05MB 248 bytes (0.0%) ⬆️

@codecov-staging
Copy link

codecov-staging bot commented Dec 13, 2024

Bundle Report

Changes will increase total bundle size by 481 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-staging-system-esm 6.05MB 248 bytes (0.0%) ⬆️
gazebo-staging-system 6.0MB 233 bytes (0.0%) ⬆️

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.00%. Comparing base (c87e433) to head (5909ba2).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3580   +/-   ##
=======================================
  Coverage   99.00%   99.00%           
=======================================
  Files         810      810           
  Lines       14549    14554    +5     
  Branches     4150     4149    -1     
=======================================
+ Hits        14404    14409    +5     
  Misses        138      138           
  Partials        7        7           
Files with missing lines Coverage Δ
...outs/Header/components/SeatDetails/SeatDetails.tsx 100.00% <100.00%> (ø)
...tabs/Profile/ActivationBanner/ActivationBanner.jsx 100.00% <100.00%> (ø)
...file/ActivationBanner/useSelfActivationMutation.js 100.00% <100.00%> (ø)
...equiredSelfHosted/ActivationRequiredSelfHosted.tsx 100.00% <100.00%> (ø)
...equiredSelfHosted/ActivationRequiredSelfHosted.tsx 100.00% <100.00%> (ø)
...vices/selfHosted/SelfHostedSeatsConfigQueryOpts.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <100.00%> (+<0.01%) ⬆️
Pages 98.73% <100.00%> (+<0.01%) ⬆️
Services 99.36% <100.00%> (-0.01%) ⬇️
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 c87e433...5909ba2. Read the comment docs.

@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    #3580   +/-   ##
=======================================
  Coverage   99.00%   99.00%           
=======================================
  Files         810      810           
  Lines       14549    14554    +5     
  Branches     4143     4142    -1     
=======================================
+ Hits        14404    14409    +5     
  Misses        138      138           
  Partials        7        7           
Files with missing lines Coverage Δ
...outs/Header/components/SeatDetails/SeatDetails.tsx 100.00% <100.00%> (ø)
...tabs/Profile/ActivationBanner/ActivationBanner.jsx 100.00% <100.00%> (ø)
...file/ActivationBanner/useSelfActivationMutation.js 100.00% <100.00%> (ø)
...equiredSelfHosted/ActivationRequiredSelfHosted.tsx 100.00% <100.00%> (ø)
...equiredSelfHosted/ActivationRequiredSelfHosted.tsx 100.00% <100.00%> (ø)
...vices/selfHosted/SelfHostedSeatsConfigQueryOpts.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <100.00%> (+<0.01%) ⬆️
Pages 98.73% <100.00%> (+<0.01%) ⬆️
Services 99.36% <100.00%> (-0.01%) ⬇️
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 c87e433...5909ba2. 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 99.00%. Comparing base (c87e433) to head (5909ba2).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3580   +/-   ##
=======================================
  Coverage   99.00%   99.00%           
=======================================
  Files         810      810           
  Lines       14549    14554    +5     
  Branches     4150     4149    -1     
=======================================
+ Hits        14404    14409    +5     
  Misses        138      138           
  Partials        7        7           
Files with missing lines Coverage Δ
...outs/Header/components/SeatDetails/SeatDetails.tsx 100.00% <100.00%> (ø)
...tabs/Profile/ActivationBanner/ActivationBanner.jsx 100.00% <100.00%> (ø)
...file/ActivationBanner/useSelfActivationMutation.js 100.00% <100.00%> (ø)
...equiredSelfHosted/ActivationRequiredSelfHosted.tsx 100.00% <100.00%> (ø)
...equiredSelfHosted/ActivationRequiredSelfHosted.tsx 100.00% <100.00%> (ø)
...vices/selfHosted/SelfHostedSeatsConfigQueryOpts.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <100.00%> (+<0.01%) ⬆️
Pages 98.73% <100.00%> (+<0.01%) ⬆️
Services 99.36% <100.00%> (-0.01%) ⬇️
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 c87e433...5909ba2. 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
48293e1 Fri, 13 Dec 2024 16:29:14 GMT Expired Expired
ff5cd4f Tue, 17 Dec 2024 12:03:24 GMT Expired Expired
5909ba2 Fri, 27 Dec 2024 13:32:17 GMT Cloud Enterprise

Copy link

codecov-public-qa bot commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.00%. Comparing base (c87e433) to head (5909ba2).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3580   +/-   ##
=======================================
  Coverage   99.00%   99.00%           
=======================================
  Files         810      810           
  Lines       14549    14554    +5     
  Branches     4150     4142    -8     
=======================================
+ Hits        14404    14409    +5     
  Misses        138      138           
  Partials        7        7           
Files with missing lines Coverage Δ
...outs/Header/components/SeatDetails/SeatDetails.tsx 100.00% <100.00%> (ø)
...tabs/Profile/ActivationBanner/ActivationBanner.jsx 100.00% <100.00%> (ø)
...file/ActivationBanner/useSelfActivationMutation.js 100.00% <100.00%> (ø)
...equiredSelfHosted/ActivationRequiredSelfHosted.tsx 100.00% <100.00%> (ø)
...equiredSelfHosted/ActivationRequiredSelfHosted.tsx 100.00% <100.00%> (ø)
...vices/selfHosted/SelfHostedSeatsConfigQueryOpts.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <100.00%> (+<0.01%) ⬆️
Pages 98.73% <100.00%> (+<0.01%) ⬆️
Services 99.36% <100.00%> (-0.01%) ⬇️
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 c87e433...5909ba2. Read the comment docs.

},
onSettled: () => {
queryClient.invalidateQueries(['SelfHostedCurrentUser'])
queryClient.invalidateQueries(['Seats'])
queryClientV5.invalidateQueries(
SelfHostedSeatsConfigQueryOpts({ provider }).queryKey
Copy link
Contributor

Choose a reason for hiding this comment

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

just making sure - is this provider key used in the lookup case-sensitive at all? Just in case that misses hits between like GITHUB, github, .. Oh and I guess also the shorthand like gh.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes it would be case sensitive, however the data fetching query key is also case sensitive so they would align on that level and ensure that the correct value in the cache gets cleared.

@nicholas-codecov nicholas-codecov force-pushed the gh-eng-2961-chore-migrate-useSelfHostedSeatsConfig-to-tsqv5 branch from ff5cd4f to 5909ba2 Compare December 27, 2024 13:26
@nicholas-codecov nicholas-codecov added this pull request to the merge queue Dec 27, 2024
Merged via the queue into main with commit 0e34c4d Dec 27, 2024
62 checks passed
@nicholas-codecov nicholas-codecov deleted the gh-eng-2961-chore-migrate-useSelfHostedSeatsConfig-to-tsqv5 branch December 27, 2024 14:11
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