diff --git a/src/sentry/preprod/vcs/pr_comments/size_tasks.py b/src/sentry/preprod/vcs/pr_comments/size_tasks.py index 846f4a7f7579..78cec0a30b7d 100644 --- a/src/sentry/preprod/vcs/pr_comments/size_tasks.py +++ b/src/sentry/preprod/vcs/pr_comments/size_tasks.py @@ -44,7 +44,6 @@ def create_preprod_size_pr_comment_task( log_prefix="preprod.size_pr_comments", enabled_option_key=ENABLED_OPTION_KEY, caller=caller, - feature_flag="organizations:preprod-size-analysis-pr-comments", with_build_configuration=True, ) if ctx is None: diff --git a/src/sentry/preprod/vcs/pr_comments/snapshot_tasks.py b/src/sentry/preprod/vcs/pr_comments/snapshot_tasks.py index a2d2950f2a60..5016b059475c 100644 --- a/src/sentry/preprod/vcs/pr_comments/snapshot_tasks.py +++ b/src/sentry/preprod/vcs/pr_comments/snapshot_tasks.py @@ -137,7 +137,6 @@ def create_preprod_snapshot_pr_comment_task( log_prefix="preprod.snapshot_pr_comments", enabled_option_key=ENABLED_OPTION_KEY, caller=caller, - feature_flag=None, with_build_configuration=False, ) if ctx is None: diff --git a/src/sentry/preprod/vcs/pr_comments/tasks.py b/src/sentry/preprod/vcs/pr_comments/tasks.py index 6b3bd2582354..30a89b23e48c 100644 --- a/src/sentry/preprod/vcs/pr_comments/tasks.py +++ b/src/sentry/preprod/vcs/pr_comments/tasks.py @@ -8,7 +8,6 @@ from django.db import router, transaction from taskbroker_client.retry import Retry -from sentry import features from sentry.models.commitcomparison import CommitComparison from sentry.models.organization import Organization from sentry.preprod.build_distribution_utils import is_installable_artifact @@ -40,13 +39,12 @@ def resolve_pr_comment_context( log_prefix: str, enabled_option_key: str, caller: str | None = None, - feature_flag: str | None = None, with_build_configuration: bool = True, ) -> PrCommentContext | None: """Resolve common PR-comment inputs after applying the shared task guards. Returns ``None`` after logging when the artifact or required PR information - is missing, the project option is disabled, or the optional feature gate fails. + is missing, or the project option is disabled. """ def event_name(suffix: str) -> str: @@ -95,12 +93,6 @@ def event_name(suffix: str) -> str: return None organization = artifact.project.organization - if feature_flag is not None and not features.has(feature_flag, organization): - logger.info( - event_name("feature_disabled"), - extra={"preprod_artifact_id": artifact.id, "organization_id": organization.id}, - ) - return None return PrCommentContext( artifact, diff --git a/tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py b/tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py index afecc4444545..0726355b5284 100644 --- a/tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py +++ b/tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py @@ -12,10 +12,8 @@ from sentry.preprod.vcs.status_checks.size.types import StatusCheckRule, TriggeredRule from sentry.shared_integrations.exceptions import ApiError from sentry.testutils.cases import TestCase -from sentry.testutils.helpers.features import with_feature from sentry.testutils.silo import cell_silo_test -FEATURE = "organizations:preprod-size-analysis-pr-comments" ENABLED_OPTION_KEY = "sentry:preprod_size_pr_comments_enabled" RULES_OPTION_KEY = "sentry:preprod_size_pr_comments_rules" @@ -57,7 +55,6 @@ def _eval_result( @cell_silo_test -@with_feature(FEATURE) class CreatePreprodSizePrCommentTaskTest(TestCase): def setUp(self) -> None: super().setUp() @@ -309,19 +306,6 @@ def test_skips_when_no_client(self, mock_eval, mock_get_client) -> None: mock_eval.assert_not_called() - @patch(_CLIENT_PATH) - @patch(_EVAL_PATH) - def test_skips_when_feature_flag_disabled(self, mock_eval, mock_get_client) -> None: - self._enable() - self._set_rules() - artifact = self._create_artifact() - - with self.feature({FEATURE: False}): - self._import_task()(artifact.id) - - mock_get_client.assert_not_called() - mock_eval.assert_not_called() - @patch(_CLIENT_PATH) @patch(_EVAL_PATH) def test_skips_nonexistent_artifact(self, mock_eval, mock_get_client) -> None: