Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/sentry/features/temporary.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,6 @@ def register_temporary_features(manager: FeatureManager) -> None:
manager.add("organizations:preprod-artifact-webhooks", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable preprod PR comments for build distribution
manager.add("organizations:preprod-build-distribution-pr-comments", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable enforcement of preprod size quota checks (when disabled, size quota checks always return True)
manager.add("organizations:preprod-enforce-size-quota", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Enable enforcement of preprod distribution quota checks (when disabled, distribution quota checks always return True)
manager.add("organizations:preprod-enforce-distribution-quota", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Enable preprod size monitors frontend
Expand Down
6 changes: 0 additions & 6 deletions src/sentry/preprod/quotas.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ def get_size_retention_cutoff(organization: Organization) -> datetime:


def has_size_quota(organization: Organization, actor: User | AnonymousUser | None = None) -> bool:
if not features.has("organizations:preprod-enforce-size-quota", organization, actor=actor):
logger.info(
"has_size_quota",
extra={"organization_id": organization.id, "result": True, "reason": "not_enforced"},
)
return True
result = quotas.backend.has_usage_quota(organization.id, DataCategory.SIZE_ANALYSIS)
logger.info(
"has_size_quota",
Expand Down
4 changes: 0 additions & 4 deletions tests/sentry/preprod/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,6 @@ def test_create_preprod_artifact_succeeds_with_both_quotas_available(self) -> No

with self.feature(
[
"organizations:preprod-enforce-size-quota",
"organizations:preprod-enforce-distribution-quota",
]
):
Expand All @@ -487,7 +486,6 @@ def quota_side_effect(org_id, data_category):

with self.feature(
[
"organizations:preprod-enforce-size-quota",
"organizations:preprod-enforce-distribution-quota",
]
):
Expand All @@ -513,7 +511,6 @@ def quota_side_effect(org_id, data_category):

with self.feature(
[
"organizations:preprod-enforce-size-quota",
"organizations:preprod-enforce-distribution-quota",
]
):
Expand All @@ -536,7 +533,6 @@ def test_create_preprod_artifact_raises_no_quota_exception(self) -> None:

with self.feature(
[
"organizations:preprod-enforce-size-quota",
"organizations:preprod-enforce-distribution-quota",
]
):
Expand Down
Loading