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

feat(issue-resolve): stop using feature flag organizations:resolve-in-upcoming-release on the backend #75901

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
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from rest_framework import serializers

from sentry import features
from sentry.models.release import Release

from . import InCommitValidator
Expand Down Expand Up @@ -60,10 +59,6 @@ def validate_inNextRelease(self, value: bool) -> "Release":
def validate_inUpcomingRelease(self, value: bool) -> "Release":
project = self.context["project"]

if not features.has("organizations:resolve-in-upcoming-release", project.organization):
raise serializers.ValidationError(
"Your organization does not have access to this feature."
)
try:
return (
Release.objects.filter(projects=project, organization_id=project.organization_id)
Expand Down
1 change: 1 addition & 0 deletions src/sentry/features/temporary.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ def register_temporary_features(manager: FeatureManager):
manager.add("organizations:reprocessing-v2", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, api_expose=False)
manager.add("organizations:required-email-verification", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable resolve in upcoming release
# TODO(steve): Remove when we remove the feature from the UI
manager.add("organizations:resolve-in-upcoming-release", OrganizationFeature, FeatureHandlerStrategy.OPTIONS, api_expose=True)
# Enable post create/edit rule confirmation notifications
manager.add("organizations:rule-create-edit-confirm-notification", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
Expand Down
24 changes: 1 addition & 23 deletions tests/snuba/api/endpoints/test_project_group_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from sentry.models.release import Release
from sentry.silo.base import SiloMode
from sentry.testutils.cases import APITestCase, SnubaTestCase
from sentry.testutils.helpers import parse_link_header, with_feature
from sentry.testutils.helpers import parse_link_header
from sentry.testutils.helpers.datetime import before_now, iso_format
from sentry.testutils.silo import assume_test_silo_mode
from sentry.types.activity import ActivityType
Expand Down Expand Up @@ -795,7 +795,6 @@ def test_set_resolved_in_next_release_legacy(self):
)
assert activity.data["version"] == ""

@with_feature("organizations:resolve-in-upcoming-release")
def test_set_resolved_in_upcoming_release(self):
release = Release.objects.create(organization_id=self.project.organization_id, version="a")
release.add_project(self.project)
Expand Down Expand Up @@ -834,27 +833,6 @@ def test_set_resolved_in_upcoming_release(self):
)
assert activity.data["version"] == ""

def test_upcoming_release_flag_validation(self):
release = Release.objects.create(organization_id=self.project.organization_id, version="a")
release.add_project(self.project)

group = self.create_group(status=GroupStatus.UNRESOLVED)

self.login_as(user=self.user)

url = f"{self.path}?id={group.id}"
response = self.client.put(
url,
data={"status": "resolved", "statusDetails": {"inUpcomingRelease": True}},
format="json",
)
assert response.status_code == 400
assert (
response.data["statusDetails"]["inUpcomingRelease"][0]
== "Your organization does not have access to this feature."
)

@with_feature("organizations:resolve-in-upcoming-release")
def test_upcoming_release_release_validation(self):
group = self.create_group(status=GroupStatus.UNRESOLVED)

Expand Down
Loading