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
15 changes: 5 additions & 10 deletions src/sentry/api/endpoints/chunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
)

Expand Down Expand Up @@ -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,
Expand All @@ -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,
}
)

Expand Down
3 changes: 2 additions & 1 deletion tests/sentry/api/endpoints/test_chunk_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 `[email protected]` we added a support for relative chunk-uploads urls
Expand Down