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
4 changes: 0 additions & 4 deletions src/sentry/features/temporary.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,6 @@ def register_temporary_features(manager: FeatureManager) -> None:
manager.add("organizations:visibility-explore-range-medium", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Update action status when integration is installed/deleted
manager.add("organizations:update-action-status", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable single processing through workflow engine for issue alerts
manager.add("organizations:workflow-engine-single-process-workflows", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable logging to debug workflow engine process workflows
manager.add("organizations:workflow-engine-process-workflows-logs", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Enable logging workflow evaluations (bypasses sample rate when enabled)
Expand All @@ -610,8 +608,6 @@ def register_temporary_features(manager: FeatureManager) -> None:
manager.add("organizations:workflow-engine-ui", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Disable redirects from alert rules to the new workflow_engine UI
manager.add("organizations:workflow-engine-redirect-opt-out", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Create links to the new UI when sending notifications in the workflow_engine
manager.add("organizations:workflow-engine-ui-links", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Use workflow engine serializers to return data for old rule / incident endpoints
manager.add("organizations:workflow-engine-rule-serializers", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Enable metric detector limits by plan type
Expand Down
14 changes: 0 additions & 14 deletions src/sentry/options/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -3463,13 +3463,6 @@
flags=FLAG_AUTOMATOR_MODIFIABLE,
)

register(
"workflow_engine.issue_alert.group.type_id.rollout",
type=Sequence,
default=[],
flags=FLAG_AUTOMATOR_MODIFIABLE,
)

register(
"workflow_engine.group.type_id.disable_issue_stream_detector",
type=Sequence,
Expand All @@ -3484,13 +3477,6 @@
flags=FLAG_AUTOMATOR_MODIFIABLE,
)

register(
"workflow_engine.issue_alert.group.type_id.ga",
type=Sequence,
default=[],
flags=FLAG_AUTOMATOR_MODIFIABLE,
)

register(
"workflow_engine.num_cohorts",
type=Int,
Expand Down
11 changes: 0 additions & 11 deletions tests/sentry/api/endpoints/test_project_rule_actions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from unittest import mock

import pytest
import sentry_sdk

from sentry.integrations.jira.integration import JiraIntegration
Expand All @@ -23,7 +22,6 @@
from sentry.shared_integrations.exceptions import IntegrationFormError
from sentry.silo.base import SiloMode
from sentry.testutils.cases import APITestCase
from sentry.testutils.helpers.options import override_options
from sentry.testutils.silo import assume_test_silo_mode
from sentry.testutils.skips import requires_snuba
from tests.sentry.workflow_engine.test_base import BaseWorkflowTest
Expand All @@ -40,15 +38,6 @@ def setUp(self) -> None:
self.login_as(self.user)
self.workflow = self.create_workflow()

@pytest.fixture(autouse=True)
def with_feature_flags(self):
with override_options(
{
"workflow_engine.issue_alert.group.type_id.ga": [1],
}
):
yield

def setup_pd_service(self) -> PagerDutyServiceDict:
service_info = {
"type": "service",
Expand Down
2 changes: 0 additions & 2 deletions tests/sentry/integrations/opsgenie/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
assert_slo_metric,
)
from sentry.testutils.cases import APITestCase
from sentry.testutils.helpers.options import override_options
from sentry.testutils.skips import requires_snuba

pytestmark = [requires_snuba]
Expand Down Expand Up @@ -117,7 +116,6 @@ def test_send_notification(self, mock_record: MagicMock) -> None:

@responses.activate
@patch("sentry.integrations.utils.metrics.EventLifecycle.record_event")
@override_options({"workflow_engine.issue_alert.group.type_id.ga": [1]})
def test_send_notification_with_workflow_engine_trigger_actions(
self, mock_record: MagicMock
) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from sentry.silo.base import SiloMode
from sentry.testutils.asserts import assert_failure_metric
from sentry.testutils.cases import RuleTestCase
from sentry.testutils.helpers.options import override_options
from sentry.testutils.silo import assume_test_silo_mode
from sentry.types.rules import RuleFuture

Expand Down Expand Up @@ -84,7 +83,6 @@ def test_when_rule_fire_history_is_none(self) -> None:
)
assert instance.rule_fire_history is None

@override_options({"workflow_engine.issue_alert.group.type_id.ga": [1]})
@patch("sentry.integrations.utils.metrics.EventLifecycle.record_event")
@patch("sentry.integrations.slack.sdk_client.SlackSdkClient.chat_postMessage")
@patch("slack_sdk.web.client.WebClient._perform_urllib_http_request")
Expand Down Expand Up @@ -126,7 +124,6 @@ def test_after_noa(
assert send_notification_start.args[0] == EventLifecycleOutcome.STARTED
assert send_notification_success.args[0] == EventLifecycleOutcome.SUCCESS

@override_options({"workflow_engine.issue_alert.group.type_id.ga": [1]})
@patch("sentry.integrations.utils.metrics.EventLifecycle.record_event")
@patch("sentry.integrations.slack.sdk_client.SlackSdkClient.chat_postMessage")
def test_after_noa_slo_halt(self, mock_post: MagicMock, mock_record: MagicMock) -> None:
Expand Down Expand Up @@ -174,7 +171,6 @@ def test_after_noa_slo_halt(self, mock_post: MagicMock, mock_record: MagicMock)
assert send_notification_start.args[0] == EventLifecycleOutcome.STARTED
assert send_notification_success.args[0] == EventLifecycleOutcome.HALTED

@override_options({"workflow_engine.issue_alert.group.type_id.ga": [1]})
@patch("sentry.integrations.utils.metrics.EventLifecycle.record_event")
@patch("sentry.integrations.slack.sdk_client.SlackSdkClient.chat_postMessage")
def test_after_noa_error(
Expand Down Expand Up @@ -218,7 +214,6 @@ def test_after_noa_error(
assert send_notification_failure.args[0] == EventLifecycleOutcome.FAILURE
assert_failure_metric(mock_record, IntegrationError())

@override_options({"workflow_engine.issue_alert.group.type_id.ga": [1]})
@patch("sentry.integrations.utils.metrics.EventLifecycle.record_event")
@patch("sentry.integrations.slack.sdk_client.SlackSdkClient.chat_postMessage")
@patch("slack_sdk.web.client.WebClient._perform_urllib_http_request")
Expand Down Expand Up @@ -259,7 +254,6 @@ def test_after_noa_test_action(
assert thread_ts_start.args[0] == EventLifecycleOutcome.STARTED
assert thread_ts_success.args[0] == EventLifecycleOutcome.SUCCESS

@override_options({"workflow_engine.issue_alert.group.type_id.ga": [1]})
@patch("sentry.integrations.utils.metrics.EventLifecycle.record_event")
@patch("sentry.integrations.slack.sdk_client.SlackSdkClient.chat_postMessage")
@patch("slack_sdk.web.client.WebClient._perform_urllib_http_request")
Expand Down Expand Up @@ -303,7 +297,6 @@ def test_after_noa_new_ui(
assert send_notification_start.args[0] == EventLifecycleOutcome.STARTED
assert send_notification_success.args[0] == EventLifecycleOutcome.SUCCESS

@override_options({"workflow_engine.issue_alert.group.type_id.ga": [1]})
@patch("sentry.integrations.utils.metrics.EventLifecycle.record_event")
@patch("sentry.integrations.slack.sdk_client.SlackSdkClient.chat_postMessage")
@patch("slack_sdk.web.client.WebClient._perform_urllib_http_request")
Expand Down Expand Up @@ -345,7 +338,6 @@ def test_after_with_threads_noa(
assert send_notification_start.args[0] == EventLifecycleOutcome.STARTED
assert send_notification_success.args[0] == EventLifecycleOutcome.SUCCESS

@override_options({"workflow_engine.issue_alert.group.type_id.ga": [1]})
@patch("sentry.integrations.utils.metrics.EventLifecycle.record_event")
@patch("sentry.integrations.slack.sdk_client.SlackSdkClient.chat_postMessage")
@patch("slack_sdk.web.client.WebClient._perform_urllib_http_request")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from unittest.mock import MagicMock, patch

import orjson
import pytest
import responses

import sentry
Expand Down Expand Up @@ -32,7 +31,6 @@
from sentry.tasks.digests import deliver_digest
from sentry.testutils.cases import PerformanceIssueTestCase, SlackActivityNotificationTest
from sentry.testutils.helpers.notifications import TEST_ISSUE_OCCURRENCE, TEST_PERF_ISSUE_OCCURRENCE
from sentry.testutils.helpers.options import override_options
from sentry.testutils.silo import assume_test_silo_mode
from sentry.testutils.skips import requires_snuba
from sentry.users.models.identity import Identity, IdentityStatus
Expand Down Expand Up @@ -61,15 +59,6 @@ def setUp(self) -> None:
action_data=[action_data],
)

@pytest.fixture(autouse=True)
def with_feature_flags(self):
with override_options(
{
"workflow_engine.issue_alert.group.type_id.ga": [1],
}
):
yield

def test_issue_alert_user_block(self) -> None:
"""
Test that issues alert are sent to a Slack user with the proper payload when block kit is
Expand Down
13 changes: 0 additions & 13 deletions tests/sentry/integrations/slack/service/test_slack_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from sentry.testutils.cases import TestCase
from sentry.testutils.helpers import with_feature
from sentry.testutils.helpers.datetime import freeze_time
from sentry.testutils.helpers.options import override_options
from sentry.testutils.silo import assume_test_silo_mode
from sentry.types.activity import ActivityType
from sentry.uptime.grouptype import UptimeDomainCheckFailure
Expand Down Expand Up @@ -125,15 +124,6 @@ def setUp(self) -> None:
group=self.group,
)

@pytest.fixture(autouse=True)
def with_feature_flags(self):
with override_options(
{
"workflow_engine.issue_alert.group.type_id.ga": [1, 7001],
}
):
yield

def test_none_group(self) -> None:
self.activity.update(group=None)

Expand Down Expand Up @@ -402,7 +392,6 @@ def test_none_user_id_uptime_resolved(self) -> None:
self.service.notify_all_threads_for_activity(activity=self.activity)
mock_notify.assert_called_once()

@override_options({"workflow_engine.issue_alert.group.type_id.ga": [1]})
@mock.patch("sentry.integrations.utils.metrics.EventLifecycle.record_event")
@mock.patch(
"sentry.integrations.slack.service.SlackService._send_notification_to_slack_channel"
Expand Down Expand Up @@ -451,8 +440,6 @@ def test_handle_parent_notification_with_notification_action(
)

@with_feature("organizations:slack-threads-refactor-uptime")
@with_feature("organizations:workflow-engine-single-process-workflows")
@override_options({"workflow_engine.issue_alert.group.type_id.rollout": [7001]})
@mock.patch("sentry.integrations.utils.metrics.EventLifecycle.record_event")
@mock.patch(
"sentry.integrations.slack.service.SlackService._send_notification_to_slack_channel"
Expand Down
1 change: 0 additions & 1 deletion tests/sentry/integrations/slack/test_message_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ def test_build_group_block(self) -> None:

assert SlackIssuesMessageBuilder(group).build() == test_message

@override_options({"workflow_engine.issue_alert.group.type_id.ga": [1]})
def test_build_group_block_noa(self) -> None:
rule = self.create_project_rule(project=self.project)

Expand Down
11 changes: 0 additions & 11 deletions tests/sentry/integrations/slack/test_notify_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from unittest.mock import MagicMock, patch

import orjson
import pytest
import responses
from slack_sdk.errors import SlackApiError
from slack_sdk.web.slack_response import SlackResponse
Expand All @@ -20,7 +19,6 @@
assert_any_analytics_event,
assert_last_analytics_event,
)
from sentry.testutils.helpers.options import override_options
from sentry.testutils.silo import assume_test_silo_mode
from sentry.testutils.skips import requires_snuba
from sentry.workflow_engine.models import Action
Expand All @@ -35,15 +33,6 @@
class SlackNotifyActionTest(RuleTestCase):
rule_cls = SlackNotifyServiceAction

@pytest.fixture(autouse=True)
def with_feature_flags(self):
with override_options(
{
"workflow_engine.issue_alert.group.type_id.ga": [1],
}
):
yield

def mock_list(self, list_type, channels, result_name="channels"):
return mock_slack_response(f"{list_type}_list", body={"ok": True, result_name: channels})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
from sentry.silo.safety import unguarded_write
from sentry.testutils.cases import PerformanceIssueTestCase
from sentry.testutils.helpers.datetime import before_now, freeze_time
from sentry.testutils.helpers.features import with_feature
from sentry.testutils.helpers.options import override_options
from sentry.testutils.hybrid_cloud import HybridCloudTestMixin
from sentry.testutils.silo import assume_test_silo_mode
from sentry.testutils.skips import requires_snuba
Expand Down Expand Up @@ -738,8 +736,6 @@ def test_resolve_issue(self, mock_tags: MagicMock, mock_record: MagicMock) -> No
assert blocks[3]["text"]["text"] == expect_status
assert ":white_circle:" in blocks[0]["text"]["text"]

@with_feature("organizations:workflow-engine-single-process-workflows")
@override_options({"workflow_engine.issue_alert.group.type_id.rollout": [1]})
@patch("sentry.integrations.utils.metrics.EventLifecycle.record_event")
@patch("sentry.integrations.slack.message_builder.issues.get_tags", return_value=[])
def test_resolve_issue_during_aci_rollout(
Expand Down
22 changes: 0 additions & 22 deletions tests/sentry/mail/test_actions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest
from django.core import mail

from sentry.eventstream.types import EventStreamEventType
Expand All @@ -15,8 +14,6 @@
from sentry.testutils.cases import PerformanceIssueTestCase, RuleTestCase, TestCase
from sentry.testutils.helpers.datetime import before_now
from sentry.testutils.helpers.eventprocessing import write_event_to_cache
from sentry.testutils.helpers.features import with_feature
from sentry.testutils.helpers.options import override_options
from sentry.testutils.skips import requires_snuba
from sentry.workflow_engine.typings.grouptype import IssueStreamGroupType
from sentry.workflow_engine.typings.notification_action import (
Expand Down Expand Up @@ -135,15 +132,6 @@ def test_none_target_identifier(self) -> None:
class NotifyEmailTest(RuleTestCase, PerformanceIssueTestCase, BaseWorkflowTest):
rule_cls = NotifyEmailAction

@pytest.fixture(autouse=True)
def with_feature_flags(self):
with override_options(
{
"workflow_engine.issue_alert.group.type_id.ga": [1],
}
):
yield

def setUp(self):
self.one_min_ago = before_now(minutes=1).isoformat()
self.event = self.store_event(
Expand Down Expand Up @@ -179,8 +167,6 @@ def setUp(self):
type=IssueStreamGroupType.slug,
)

@with_feature("organizations:workflow-engine-single-process-workflows")
@override_options({"workflow_engine.issue_alert.group.type_id.rollout": [1]})
def test_full_integration(self) -> None:
action_config = {
"target_type": ActionTarget.USER.value,
Expand All @@ -206,8 +192,6 @@ def test_full_integration(self) -> None:
assert sent.to == [self.user.email]
assert "uh oh" in sent.subject

@with_feature("organizations:workflow-engine-single-process-workflows")
@override_options({"workflow_engine.issue_alert.group.type_id.rollout": [1]})
def test_full_integration_all_members_fallthrough(self) -> None:
action_data = {"fallthrough_type": FallthroughChoiceType.ALL_MEMBERS.value}
action = self.create_action(
Expand All @@ -231,8 +215,6 @@ def test_full_integration_all_members_fallthrough(self) -> None:
assert sent.to == [self.user.email]
assert "uh oh" in sent.subject

@with_feature("organizations:workflow-engine-single-process-workflows")
@override_options({"workflow_engine.issue_alert.group.type_id.rollout": [1]})
def test_full_integration_noone_fallthrough(self) -> None:
action_data = {"fallthrough_type": FallthroughChoiceType.NO_ONE.value}
action = self.create_action(
Expand All @@ -253,8 +235,6 @@ def test_full_integration_noone_fallthrough(self) -> None:

assert len(mail.outbox) == 0

@with_feature("organizations:workflow-engine-single-process-workflows")
@override_options({"workflow_engine.issue_alert.group.type_id.rollout": [1]})
def test_full_integration_fallthrough_not_provided(self) -> None:
action = self.create_action(config=self.issue_owners_action_config, type="email", data={})
self.create_data_condition_group_action(condition_group=self.condition_group, action=action)
Expand All @@ -276,8 +256,6 @@ def test_full_integration_fallthrough_not_provided(self) -> None:
assert sent.to == [self.user.email]
assert "uh oh" in sent.subject

@with_feature("organizations:workflow-engine-single-process-workflows")
@override_options({"workflow_engine.issue_alert.group.type_id.rollout": [1]})
def test_hack_mail_workflow(self) -> None:
colleen_workflow = self.create_user(email="[email protected]", is_active=True)
michelle_workflow = self.create_user(email="[email protected]", is_active=True)
Expand Down
8 changes: 0 additions & 8 deletions tests/sentry/rules/actions/test_notify_event_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from sentry.tasks.post_process import post_process_group
from sentry.testutils.cases import RuleTestCase
from sentry.testutils.helpers.eventprocessing import write_event_to_cache
from sentry.testutils.helpers.features import with_feature
from sentry.testutils.helpers.options import override_options
from sentry.testutils.silo import assume_test_silo_mode
from sentry.testutils.skips import requires_snuba
from sentry.utils import json
Expand Down Expand Up @@ -74,8 +72,6 @@ def setUp(self):
}

@responses.activate
@with_feature("organizations:workflow-engine-single-process-workflows")
@override_options({"workflow_engine.issue_alert.group.type_id.rollout": [1]})
def test_applies_correctly_for_legacy_webhooks_aci(self):
responses.add(responses.POST, "http://my-fake-webhook.io")

Expand Down Expand Up @@ -131,8 +127,6 @@ def test_applies_correctly_for_legacy_webhooks_aci(self):
assert payload["triggering_rules"] == ["error_detector"]

@responses.activate
@with_feature("organizations:workflow-engine-single-process-workflows")
@override_options({"workflow_engine.issue_alert.group.type_id.rollout": [1]})
def test_legacy_webhooks_uneven_dual_write_aci(self):
"""
Test that if a dual written Rule has it's Action updated to email instead that we do not fire a response to the webhook
Expand Down Expand Up @@ -170,8 +164,6 @@ def test_legacy_webhooks_uneven_dual_write_aci(self):
assert len(responses.calls) == 0

@responses.activate
@with_feature("organizations:workflow-engine-single-process-workflows")
@override_options({"workflow_engine.issue_alert.group.type_id.rollout": [1]})
@patch("sentry.plugins.sentry_webhooks.plugin.WebHooksPlugin.notify_users")
def test_error_for_legacy_webhooks_dual_write_aci(self, mock_notify_users):
responses.add(method=responses.POST, url="http://my-fake-webhook.io", json={}, status=408)
Expand Down
Loading
Loading