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
2 changes: 0 additions & 2 deletions src/sentry/api/serializers/models/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,6 @@ class DetailedProjectResponse(ProjectWithTeamResponseDict):
symbolSources: str
isDynamicallySampled: bool
tempestFetchScreenshots: NotRequired[bool]
tempestFetchDumps: NotRequired[bool]
autofixAutomationTuning: NotRequired[str]
seerScannerAutomation: NotRequired[bool]
debugFilesRole: NotRequired[str | None]
Expand Down Expand Up @@ -1122,7 +1121,6 @@ def serialize(
data["tempestFetchScreenshots"] = attrs["options"].get(
"sentry:tempest_fetch_screenshots", False
)
data["tempestFetchDumps"] = attrs["options"].get("sentry:tempest_fetch_dumps", False)

return data

Expand Down
1 change: 0 additions & 1 deletion src/sentry/apidocs/examples/project_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@
],
"symbolSources": "[]",
"tempestFetchScreenshots": False,
"tempestFetchDumps": False,
"debugFilesRole": None,
"isDynamicallySampled": True,
"autofixAutomationTuning": "off",
Expand Down
13 changes: 0 additions & 13 deletions src/sentry/core/endpoints/project_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ class ProjectMemberSerializer(serializers.Serializer):
"targetSampleRate",
"dynamicSamplingBiases",
"tempestFetchScreenshots",
"tempestFetchDumps",
"autofixAutomationTuning",
"seerScannerAutomation",
"debugFilesRole",
Expand Down Expand Up @@ -229,7 +228,6 @@ class ProjectAdminSerializer(ProjectMemberSerializer):
targetSampleRate = serializers.FloatField(required=False, min_value=0, max_value=1)
dynamicSamplingBiases = DynamicSamplingBiasSerializer(required=False, many=True)
tempestFetchScreenshots = serializers.BooleanField(required=False)
tempestFetchDumps = serializers.BooleanField(required=False)

# DO NOT ADD MORE TO OPTIONS
# Each param should be a field in the serializer like above.
Expand Down Expand Up @@ -446,14 +444,6 @@ def validate_tempestFetchScreenshots(self, value):
)
return value

def validate_tempestFetchDumps(self, value):
organization = self.context["project"].organization
if not has_tempest_access(organization):
raise serializers.ValidationError(
"Organization does not have the tempest feature enabled."
)
return value

def validate_debugFilesRole(self, value):
if value is None:
return value
Expand Down Expand Up @@ -738,9 +728,6 @@ def put(self, request: Request, project) -> Response:
changed_proj_settings["sentry:tempest_fetch_screenshots"] = result[
"tempestFetchScreenshots"
]
if result.get("tempestFetchDumps") is not None:
if project.update_option("sentry:tempest_fetch_dumps", result["tempestFetchDumps"]):
changed_proj_settings["sentry:tempest_fetch_dumps"] = result["tempestFetchDumps"]
if result.get("targetSampleRate") is not None:
if project.update_option(
"sentry:target_sample_rate", round(result["targetSampleRate"], 4)
Expand Down
1 change: 0 additions & 1 deletion src/sentry/models/options/project_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"sentry:dynamic_sampling_biases",
"sentry:target_sample_rate",
"sentry:tempest_fetch_screenshots",
"sentry:tempest_fetch_dumps",
"sentry:breakdowns",
"sentry:transaction_name_cluster_rules",
"sentry:uptime_autodetection",
Expand Down
3 changes: 0 additions & 3 deletions src/sentry/projectoptions/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,6 @@
# Should tempest fetch screenshots for this project
register(key="sentry:tempest_fetch_screenshots", default=False)

# Should tempest fetch dumps for this project
register(key="sentry:tempest_fetch_dumps", default=False)

# Should autofix run automatically on new issues
register(key="sentry:autofix_automation_tuning", default=AutofixAutomationTuningSettings.OFF)

Expand Down
7 changes: 3 additions & 4 deletions src/sentry/tempest/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,8 @@ def poll_tempest_crashes(credentials_id: int, **kwargs) -> None:
project_id=project_id, trigger="tempest:poll_tempest_crashes"
)

# Check if we should attach screenshots and or dumps (opt-in features)
# Check if we should attach screenshots (opt-in feature)
attach_screenshot = credentials.project.get_option("sentry:tempest_fetch_screenshots")
attach_dump = credentials.project.get_option("sentry:tempest_fetch_dumps")

response = fetch_items_from_tempest(
org_id=org_id,
Expand All @@ -159,7 +158,7 @@ def poll_tempest_crashes(credentials_id: int, **kwargs) -> None:
offset=int(credentials.latest_fetched_item_id),
limit=options.get("tempest.poll-limit"),
attach_screenshot=attach_screenshot,
attach_dump=attach_dump,
attach_dump=True, # Always fetch for symbolication
)
else:
raise ValueError(
Expand Down Expand Up @@ -227,7 +226,7 @@ def fetch_items_from_tempest(
offset: int,
limit: int = 10,
attach_screenshot: bool = False,
attach_dump: bool = False,
attach_dump: bool = True,
time_out: int = 50, # Since there is a timeout of 45s in the middleware anyways
) -> Response:
payload = {
Expand Down
28 changes: 0 additions & 28 deletions tests/sentry/core/endpoints/test_project_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -2147,34 +2147,6 @@ def test_get_tempest_fetch_screenshots_options_without_feature_flag(self) -> Non
)
assert "tempestFetchScreenshots" not in response.data

def test_put_tempest_fetch_dumps(self) -> None:
self.organization.update_option("sentry:enabled_console_platforms", ["playstation"])
assert self.project.get_option("sentry:tempest_fetch_dumps") is False
response = self.get_success_response(
self.organization.slug, self.project.slug, method="put", tempestFetchDumps=True
)
assert response.data["tempestFetchDumps"] is True
assert self.project.get_option("sentry:tempest_fetch_dumps") is True

def test_put_tempest_fetch_dumps_without_feature_flag(self) -> None:
self.get_error_response(
self.organization.slug, self.project.slug, method="put", tempestFetchDumps=True
)

def test_get_tempest_fetch_dumps_options(self) -> None:
self.organization.update_option("sentry:enabled_console_platforms", ["playstation"])
response = self.get_success_response(
self.organization.slug, self.project.slug, method="get"
)
assert "tempestFetchDumps" in response.data
assert response.data["tempestFetchDumps"] is False

def test_get_tempest_fetch_dumps_options_without_enabled_playstation_in_options(self) -> None:
response = self.get_success_response(
self.organization.slug, self.project.slug, method="get"
)
assert "tempestFetchDumps" not in response.data


class TestSeerProjectDetails(TestProjectDetailsBase):
endpoint = "sentry-api-0-project-details"
Expand Down
10 changes: 0 additions & 10 deletions tests/sentry/tempest/test_tempest.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,16 +211,6 @@ def test_tempest_screenshot_option(self) -> None:
self.project.update_option("sentry:tempest_fetch_screenshots", False)
assert self.project.get_option("sentry:tempest_fetch_screenshots") is False

def test_tempest_dump_option(self) -> None:
# Default should be False
assert self.project.get_option("sentry:tempest_fetch_dumps") is False

self.project.update_option("sentry:tempest_fetch_dumps", True)
assert self.project.get_option("sentry:tempest_fetch_dumps") is True

self.project.update_option("sentry:tempest_fetch_dumps", False)
assert self.project.get_option("sentry:tempest_fetch_dumps") is False

@patch("sentry.tempest.tasks.schedule_invalidate_project_config")
@patch("sentry.tempest.tasks.fetch_items_from_tempest")
def test_poll_tempest_crashes_invalidates_config(
Expand Down
Loading