diff --git a/src/sentry/features/temporary.py b/src/sentry/features/temporary.py index 79f9b5b8b87b67..e8020fc74ab524 100644 --- a/src/sentry/features/temporary.py +++ b/src/sentry/features/temporary.py @@ -128,7 +128,6 @@ def register_temporary_features(manager: FeatureManager) -> None: manager.add("organizations:indexed-spans-extraction", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, api_expose=False) # These flags follow the pattern expected by IntegrationProvider.requires_feature_flag's usage on the config endpoint manager.add("organizations:integrations-claude-code", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True) - manager.add("organizations:integrations-github-copilot-agent", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True) manager.add("organizations:integrations-github-platform-detection", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True) manager.add("organizations:github-repo-auto-sync-webhook", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False) manager.add("organizations:integrations-slack-staging", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True) diff --git a/src/sentry/integrations/api/endpoints/organization_coding_agents.py b/src/sentry/integrations/api/endpoints/organization_coding_agents.py index 705f021a7e02b2..cf76dd46ef4dfe 100644 --- a/src/sentry/integrations/api/endpoints/organization_coding_agents.py +++ b/src/sentry/integrations/api/endpoints/organization_coding_agents.py @@ -8,7 +8,6 @@ from rest_framework.request import Request from rest_framework.response import Response -from sentry import features from sentry.api.api_owners import ApiOwner from sentry.api.api_publish_status import ApiPublishStatus from sentry.api.base import cell_silo_endpoint @@ -94,9 +93,7 @@ def get(self, request: Request, organization: Organization) -> Response: ] github_copilot_installed = any(i.provider == "github_copilot" for i in integrations) - if github_copilot_installed and features.has( - "organizations:integrations-github-copilot-agent", organization - ): + if github_copilot_installed: has_identity = False if request.user and request.user.id: try: diff --git a/src/sentry/integrations/github_copilot/integration.py b/src/sentry/integrations/github_copilot/integration.py index b2c713ee8b9191..d9abecce6dac65 100644 --- a/src/sentry/integrations/github_copilot/integration.py +++ b/src/sentry/integrations/github_copilot/integration.py @@ -53,7 +53,7 @@ class GithubCopilotIntegrationProvider(CodingAgentIntegrationProvider): name = "GitHub Copilot" metadata = metadata integration_cls = GithubCopilotIntegration - feature_flag_name = "organizations:integrations-github-copilot-agent" + requires_feature_flag = False def get_agent_name(self) -> str: return "GitHub Copilot" diff --git a/src/sentry/seer/agent/coding_agent_handoff.py b/src/sentry/seer/agent/coding_agent_handoff.py index efa8b73d4f568c..9516d477edb99f 100644 --- a/src/sentry/seer/agent/coding_agent_handoff.py +++ b/src/sentry/seer/agent/coding_agent_handoff.py @@ -13,7 +13,6 @@ from requests import HTTPError from rest_framework.exceptions import PermissionDenied, ValidationError -from sentry import features from sentry.integrations.coding_agent.client import CodingAgentClient from sentry.integrations.coding_agent.integration import CodingAgentIntegration from sentry.integrations.coding_agent.models import CodingAgentLaunchRequest @@ -50,8 +49,6 @@ def _resolve_client( Tuple of (client, installation). Exactly one will be non-None. """ if provider == "github_copilot": - if not features.has("organizations:integrations-github-copilot-agent", organization): - raise PermissionDenied("GitHub Copilot is not enabled for this organization") user_access_token: str | None = None if user_id is not None: user_access_token = github_copilot_identity_service.get_access_token_for_user( diff --git a/src/sentry/seer/autofix/coding_agent.py b/src/sentry/seer/autofix/coding_agent.py index 21f26e0fde657e..3df3eff98e0a02 100644 --- a/src/sentry/seer/autofix/coding_agent.py +++ b/src/sentry/seer/autofix/coding_agent.py @@ -11,7 +11,7 @@ from requests import HTTPError from rest_framework.exceptions import APIException, NotFound, PermissionDenied, ValidationError -from sentry import analytics, features +from sentry import analytics from sentry.models.project import Project @@ -476,8 +476,6 @@ def launch_coding_agents_for_run( is_github_copilot = provider == "github_copilot" if is_github_copilot: - if not features.has("organizations:integrations-github-copilot-agent", organization): - raise PermissionDenied("GitHub Copilot is not enabled for this organization") user_access_token: str | None = None if user_id is not None: user_access_token = github_copilot_identity_service.get_access_token_for_user( diff --git a/static/app/components/events/autofix/githubCopilotIntegrationCta.tsx b/static/app/components/events/autofix/githubCopilotIntegrationCta.tsx index eb6c22b2950ff0..d6b5ee1842549a 100644 --- a/static/app/components/events/autofix/githubCopilotIntegrationCta.tsx +++ b/static/app/components/events/autofix/githubCopilotIntegrationCta.tsx @@ -34,15 +34,8 @@ export function GithubCopilotIntegrationCta() { integration => integration.provider === 'github_copilot' ); - const hasGithubCopilotFeatureFlag = organization.features.includes( - 'integrations-github-copilot-agent' - ); const hasGithubCopilotIntegration = Boolean(githubCopilotIntegration); - if (!hasGithubCopilotFeatureFlag) { - return null; - } - if (isLoadingIntegrations) { return ( None: - """Test GET endpoint does not show GitHub Copilot without feature flag.""" - with ( - self.feature({"organizations:integrations-github-copilot-agent": False}), - self.mock_integration_service_calls(integrations=[]), - ): - response = self.get_success_response(self.organization.slug) - - integrations = response.data["integrations"] - assert len(integrations) == 0 - class OrganizationCodingAgentsPostCodingDisabledTest(BaseOrganizationCodingAgentsTest): """Test that the endpoint returns 403 when code generation is disabled. @@ -1118,10 +1092,7 @@ def test_copilot_403_returns_github_app_permissions_failure_type( data = {"provider": "github_copilot", "run_id": 123} - with ( - self.feature("organizations:integrations-github-copilot-agent"), - patch("sentry.seer.autofix.coding_agent.store_coding_agent_states_to_seer"), - ): + with patch("sentry.seer.autofix.coding_agent.store_coding_agent_states_to_seer"): response = self.get_success_response(self.organization.slug, method="post", **data) assert response.data["success"] is False assert response.data["failed_count"] >= 1 @@ -1161,10 +1132,7 @@ def test_copilot_not_licensed_403_returns_github_copilot_not_licensed_failure_ty data = {"provider": "github_copilot", "run_id": 123} - with ( - self.feature("organizations:integrations-github-copilot-agent"), - patch("sentry.seer.autofix.coding_agent.store_coding_agent_states_to_seer"), - ): + with patch("sentry.seer.autofix.coding_agent.store_coding_agent_states_to_seer"): response = self.get_success_response(self.organization.slug, method="post", **data) assert response.data["success"] is False assert response.data["failed_count"] >= 1 diff --git a/tests/sentry/integrations/api/endpoints/test_organization_integration_direct_enable.py b/tests/sentry/integrations/api/endpoints/test_organization_integration_direct_enable.py index 67569163aa7c54..eabf1502ca3c2a 100644 --- a/tests/sentry/integrations/api/endpoints/test_organization_integration_direct_enable.py +++ b/tests/sentry/integrations/api/endpoints/test_organization_integration_direct_enable.py @@ -14,8 +14,7 @@ def setUp(self): self.login_as(self.user) def test_enables_github_copilot(self): - with self.feature("organizations:integrations-github-copilot-agent"): - response = self.get_success_response(self.organization.slug, "github_copilot") + response = self.get_success_response(self.organization.slug, "github_copilot") integration = Integration.objects.get(provider="github_copilot") assert OrganizationIntegration.objects.filter( @@ -34,15 +33,11 @@ def test_returns_400_for_provider_without_direct_enable(self): self.get_error_response(self.organization.slug, "cursor", status_code=400) def test_prevents_duplicate_installation(self): - with self.feature("organizations:integrations-github-copilot-agent"): - self.get_success_response(self.organization.slug, "github_copilot") - self.get_error_response(self.organization.slug, "github_copilot", status_code=400) + self.get_success_response(self.organization.slug, "github_copilot") + self.get_error_response(self.organization.slug, "github_copilot", status_code=400) assert Integration.objects.filter(provider="github_copilot").count() == 1 - def test_returns_404_when_feature_flag_disabled(self): - self.get_error_response(self.organization.slug, "github_copilot", status_code=404) - def test_requires_org_write_permission(self): member = self.create_user() self.create_member(organization=self.organization, user=member, role="member") diff --git a/tests/sentry/integrations/github_copilot/test_integration.py b/tests/sentry/integrations/github_copilot/test_integration.py index 08fed5330d3a42..ae6ee363862530 100644 --- a/tests/sentry/integrations/github_copilot/test_integration.py +++ b/tests/sentry/integrations/github_copilot/test_integration.py @@ -10,11 +10,8 @@ def setUp(self): def test_key(self): assert self.provider.key == "github_copilot" - def test_requires_feature_flag_true(self): - assert self.provider.requires_feature_flag is True - - def test_feature_flag_name(self): - assert self.provider.feature_flag_name == "organizations:integrations-github-copilot-agent" + def test_requires_feature_flag_false(self): + assert self.provider.requires_feature_flag is False def test_no_pipeline_views(self): assert self.provider.get_pipeline_views() == []