-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(billing): add orgRetention to Subscription type #103118
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
Conversation
| export type RetentionSettings = { | ||
| downsampled: number | null; | ||
| standard: number | null; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Nullability Mismatch: Inconsistent Retention Type Definitions
The new RetentionSettings type defines standard: number | null, but BillingMetricHistory.retention at line 730 still uses an inline type with standard: number (non-nullable). This creates a type inconsistency where semantically similar retention fields have different nullability constraints, which could cause runtime errors when standard is null in contexts expecting the BillingMetricHistory type.
| downsampled: number | null; | ||
| standard: number | null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you confirm these two can both be null? i'm not seeing where in the serialization on the backend they could be null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. Yes both can be null, and if so they default to the plan item's retention policy.
I merged these 2 PRs last week that make the BMH.retention_days nullable:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a linear project for it if you want to find out more
https://linear.app/getsentry/project/retention-settings-f26a1652b356/overview
This is a follow up to https://github.com/getsentry/getsentry/pull/18799 and https://github.com/getsentry/getsentry/pull/18800