Skip to content

Conversation

@vbro
Copy link
Contributor

@vbro vbro commented Nov 10, 2025

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 10, 2025
export type RetentionSettings = {
downsampled: number | null;
standard: number | null;
};
Copy link
Contributor

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.

Fix in Cursor Fix in Web

Comment on lines +161 to +162
downsampled: number | null;
standard: number | null;
Copy link
Member

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

Copy link
Contributor Author

@vbro vbro Nov 18, 2025

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:

Copy link
Contributor Author

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

@vbro vbro requested review from a team and isabellaenriquez November 18, 2025 22:06
@vbro vbro merged commit b53aa30 into master Nov 20, 2025
47 of 48 checks passed
@vbro vbro deleted the vbro_add_orgretention_to_subscription branch November 20, 2025 22:04
@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants