diff --git a/src/sentry/api/endpoints/chunk.py b/src/sentry/api/endpoints/chunk.py index f84f55c1bad76d..460d02161852f1 100644 --- a/src/sentry/api/endpoints/chunk.py +++ b/src/sentry/api/endpoints/chunk.py @@ -9,7 +9,7 @@ from rest_framework.request import Request from rest_framework.response import Response -from sentry import features, options +from sentry import options from sentry.api.base import pending_silo_endpoint from sentry.api.bases.organization import OrganizationEndpoint, OrganizationReleasePermission from sentry.models import FileBlob @@ -31,7 +31,9 @@ "bcsymbolmaps", # BCSymbolMaps and associated PLists/UuidMaps "il2cpp", # Il2cpp LineMappingJson files "portablepdbs", # Portable PDB debug file - # TODO: This is currently turned on by a feature flag + # TODO: at a later point when we return artifact bundles here + # users will by default upload artifact bundles as this is what + # sentry-cli looks for. # "artifact_bundles", # Artifact bundles containing source maps. ) @@ -81,13 +83,6 @@ def get(self, request: Request, organization) -> Response: # If user overridden upload url prefix, we want an absolute, versioned endpoint, with user-configured prefix url = absolute_uri(relative_url, endpoint) - # TODO: artifact bundles are still feature flagged. - accept = CHUNK_UPLOAD_ACCEPT - if features.has( - "organizations:artifact-bundles", organization=organization, actor=request.user - ): - accept += ("artifact_bundles",) - return Response( { "url": url, @@ -98,7 +93,7 @@ def get(self, request: Request, organization) -> Response: "concurrency": MAX_CONCURRENCY, "hashAlgorithm": HASH_ALGORITHM, "compression": ["gzip"], - "accept": accept, + "accept": CHUNK_UPLOAD_ACCEPT, } ) diff --git a/tests/sentry/api/endpoints/test_chunk_upload.py b/tests/sentry/api/endpoints/test_chunk_upload.py index ca6b30db26d408..7c73705f5a5bc1 100644 --- a/tests/sentry/api/endpoints/test_chunk_upload.py +++ b/tests/sentry/api/endpoints/test_chunk_upload.py @@ -55,11 +55,12 @@ def test_accept_with_feature_flag_enabled_and_disabled(self): ) assert "artifact_bundles" not in response.data["accept"] + # This currently should not flip the flag! with self.feature({"organizations:artifact-bundles": True}): response = self.client.get( self.url, HTTP_AUTHORIZATION=f"Bearer {self.token.token}", format="json" ) - assert "artifact_bundles" in response.data["accept"] + assert "artifact_bundles" not in response.data["accept"] def test_relative_url_support(self): # Starting `sentry-cli@1.70.1` we added a support for relative chunk-uploads urls