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

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

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 650.39kB (3.71%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 6.0MB 325.09kB (5.73%) ⬆️
gazebo-production-system-esm 6.05MB 325.31kB (5.68%) ⬆️

@codecov-staging
Copy link

codecov-staging bot commented Dec 13, 2024

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-staging-system-esm 6.05MB 325.31kB (5.68%) ⬆️
gazebo-staging-system 6.0MB 325.09kB (5.73%) ⬆️

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.90%. Comparing base (c05416a) to head (ff5cd4f).
Report is 5 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3580      +/-   ##
==========================================
- Coverage   98.91%   98.90%   -0.01%     
==========================================
  Files         806      810       +4     
  Lines       14478    14568      +90     
  Branches     4105     4144      +39     
==========================================
+ Hits        14321    14409      +88     
- Misses        150      152       +2     
  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%> (ø)

... and 28 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <100.00%> (+<0.01%) ⬆️
Pages 98.58% <100.00%> (-0.01%) ⬇️
Services 99.36% <100.00%> (+<0.01%) ⬆️
Shared 99.32% <ø> (+<0.01%) ⬆️
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 c05416a...ff5cd4f. 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.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3580      +/-   ##
==========================================
- Coverage   98.91%   98.90%   -0.01%     
==========================================
  Files         806      810       +4     
  Lines       14478    14568      +90     
  Branches     4105     4144      +39     
==========================================
+ Hits        14321    14409      +88     
- Misses        150      152       +2     
  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%> (ø)

... and 28 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <100.00%> (+<0.01%) ⬆️
Pages 98.58% <100.00%> (-0.01%) ⬇️
Services 99.36% <100.00%> (+<0.01%) ⬆️
Shared 99.32% <ø> (+<0.01%) ⬆️
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 c05416a...ff5cd4f. 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.90%. Comparing base (c05416a) to head (ff5cd4f).
Report is 5 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3580      +/-   ##
==========================================
- Coverage   98.91%   98.90%   -0.01%     
==========================================
  Files         806      810       +4     
  Lines       14478    14568      +90     
  Branches     4112     4151      +39     
==========================================
+ Hits        14321    14409      +88     
- Misses        150      152       +2     
  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%> (ø)

... and 28 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <100.00%> (+<0.01%) ⬆️
Pages 98.58% <100.00%> (-0.01%) ⬇️
Services 99.36% <100.00%> (+<0.01%) ⬆️
Shared 99.32% <ø> (+<0.01%) ⬆️
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 c05416a...ff5cd4f. 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 Cloud Enterprise

Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.90%. Comparing base (c05416a) to head (ff5cd4f).
Report is 5 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3580      +/-   ##
==========================================
- Coverage   98.91%   98.90%   -0.01%     
==========================================
  Files         806      810       +4     
  Lines       14478    14568      +90     
  Branches     4105     4144      +39     
==========================================
+ Hits        14321    14409      +88     
- Misses        150      152       +2     
  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%> (ø)

... and 28 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <100.00%> (+<0.01%) ⬆️
Pages 98.58% <100.00%> (-0.01%) ⬇️
Services 99.36% <100.00%> (+<0.01%) ⬆️
Shared 99.32% <ø> (+<0.01%) ⬆️
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 c05416a...ff5cd4f. 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.

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