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

ref: Migrate off "Plan" object from accountDetails REST endpoint to GQL Plan #3597

Merged
merged 23 commits into from
Dec 19, 2024

Conversation

ajay-sentry
Copy link
Contributor

Description

This PR aims to remove all the instances of accountDetails?.plan and similar, as well as removing that object from the accountDetails zod schema as well; to effectively prevent folks in Gazebo from continuing to use that as a SOT for plan data moving forward.

This needs to be done prior to us doing the API side of removing the plan object from the REST endpoint to avoid breaking Gazebo otherwise.

Closes codecov/engineering-team#3126

Screenshots

Link to Sample Entry

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

planAutoActivate: z.boolean().nullable(),
planProvider: z.string().nullable(),
repoTotalCredits: z.number(),
rootOrganization: z
.object({
plan: PlanSchema,
username: z.string().nullish(),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@codecov-staging
Copy link

codecov-staging bot commented Dec 19, 2024

Bundle Report

Changes will decrease total bundle size by 452 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

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

@codecov-notifications
Copy link

codecov-notifications bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main    #3597      +/-   ##
==========================================
- Coverage   99.01%   99.01%   -0.01%     
==========================================
  Files         809      809              
  Lines       14549    14548       -1     
  Branches     4140     4146       +6     
==========================================
- Hits        14406    14405       -1     
  Misses        136      136              
  Partials        7        7              
Files with missing lines Coverage Δ
...anPage/subRoutes/CancelPlanPage/CancelPlanPage.tsx 100.00% <100.00%> (ø)
...anPage/subRoutes/CurrentOrgPlan/CurrentOrgPlan.tsx 100.00% <100.00%> (ø)
src/services/account/useAccountDetails.ts 95.23% <ø> (-0.22%) ⬇️
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.78% <100.00%> (ø)
Services 99.36% <ø> (-0.01%) ⬇️
Shared 99.31% <ø> (ø)
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 0d1dd11...91efa0a. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.01%. Comparing base (0d1dd11) to head (91efa0a).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main    #3597      +/-   ##
==========================================
- Coverage   99.01%   99.01%   -0.01%     
==========================================
  Files         809      809              
  Lines       14549    14548       -1     
  Branches     4147     4139       -8     
==========================================
- Hits        14406    14405       -1     
  Misses        136      136              
  Partials        7        7              
Files with missing lines Coverage Δ
...anPage/subRoutes/CancelPlanPage/CancelPlanPage.tsx 100.00% <100.00%> (ø)
...anPage/subRoutes/CurrentOrgPlan/CurrentOrgPlan.tsx 100.00% <100.00%> (ø)
src/services/account/useAccountDetails.ts 95.23% <ø> (-0.22%) ⬇️
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.78% <100.00%> (ø)
Services 99.36% <ø> (-0.01%) ⬇️
Shared 99.31% <ø> (ø)
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 0d1dd11...91efa0a. Read the comment docs.

Copy link

codecov-public-qa bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.01%. Comparing base (0d1dd11) to head (91efa0a).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main    #3597      +/-   ##
==========================================
- Coverage   99.01%   99.01%   -0.01%     
==========================================
  Files         809      809              
  Lines       14549    14548       -1     
  Branches     4140     4146       +6     
==========================================
- Hits        14406    14405       -1     
  Misses        136      136              
  Partials        7        7              
Files with missing lines Coverage Δ
...anPage/subRoutes/CancelPlanPage/CancelPlanPage.tsx 100.00% <100.00%> (ø)
...anPage/subRoutes/CurrentOrgPlan/CurrentOrgPlan.tsx 100.00% <100.00%> (ø)
src/services/account/useAccountDetails.ts 95.23% <ø> (-0.22%) ⬇️
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.78% <100.00%> (ø)
Services 99.36% <ø> (-0.01%) ⬇️
Shared 99.31% <ø> (ø)
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 0d1dd11...91efa0a. Read the comment docs.

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.01%. Comparing base (0d1dd11) to head (91efa0a).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3597      +/-   ##
==========================================
- Coverage   99.01%   99.01%   -0.01%     
==========================================
  Files         809      809              
  Lines       14549    14548       -1     
  Branches     4140     4139       -1     
==========================================
- Hits        14406    14405       -1     
  Misses        136      136              
  Partials        7        7              
Files with missing lines Coverage Δ
...anPage/subRoutes/CancelPlanPage/CancelPlanPage.tsx 100.00% <100.00%> (ø)
...anPage/subRoutes/CurrentOrgPlan/CurrentOrgPlan.tsx 100.00% <100.00%> (ø)
src/services/account/useAccountDetails.ts 95.23% <ø> (-0.22%) ⬇️
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.78% <100.00%> (ø)
Services 99.36% <ø> (-0.01%) ⬇️
Shared 99.31% <ø> (ø)
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 0d1dd11...91efa0a. Read the comment docs.

@codecov-releaser
Copy link
Contributor

codecov-releaser commented Dec 19, 2024

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
f065b32 Thu, 19 Dec 2024 16:31:35 GMT Expired Expired
91efa0a Thu, 19 Dec 2024 17:41:18 GMT Cloud Enterprise

Copy link

codecov bot commented Dec 19, 2024

Bundle Report

Changes will decrease total bundle size by 452 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

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

const accountDetails = {
plan: { value: Plans.USERS_BASIC, quantity: 1 },
} as z.infer<typeof AccountDetailsSchema>
const accountDetails = {} as z.infer<typeof AccountDetailsSchema>
Copy link
Contributor

Choose a reason for hiding this comment

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

could just define this once in the top of the file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point, cleaned it up in 91efa0a

@ajay-sentry ajay-sentry added this pull request to the merge queue Dec 19, 2024
Merged via the queue into main with commit 4021528 Dec 19, 2024
62 checks passed
@ajay-sentry ajay-sentry deleted the Ajay/migrate-off-account-details-plan branch December 19, 2024 17:47
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.

Migrate Account Details Plans -> GraphQL Plans and remove from Zod schema
3 participants