Skip to content

Commit 85ac09d

Browse files
authored
Merge branch 'master' into jb/ref/topbar-actions
2 parents 5351eae + b62f69f commit 85ac09d

File tree

115 files changed

+3514
-638
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+3514
-638
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
439439
/static/app/components/loading/ @getsentry/app-frontend
440440
/static/app/components/events/interfaces/ @getsentry/app-frontend
441441
/static/app/components/forms/ @getsentry/app-frontend
442+
/static/app/components/featureShowcase.mdx @getsentry/app-frontend
443+
/static/app/components/featureShowcase.spec.tsx @getsentry/app-frontend
444+
/static/app/components/featureShowcase.tsx @getsentry/app-frontend
442445
/static/app/components/markdownTextArea.tsx @getsentry/app-frontend
443446
/static/app/locale.tsx @getsentry/app-frontend
444447
## End of Frontend

knip.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ const productionEntryPoints = [
2525
'static/app/components/pipeline/**/*.{js,ts,tsx}',
2626
// TODO: Remove when used
2727
'static/app/views/seerExplorer/contexts/**/*.{js,ts,tsx}',
28+
// TODO: Remove when used
29+
'static/app/components/featureShowcase.tsx',
2830
];
2931

3032
const testingEntryPoints = [

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ module = [
474474
"sentry.identity.vsts_extension.*",
475475
"sentry.incidents.endpoints.bases",
476476
"sentry.incidents.handlers.*",
477+
"sentry.incidents.metric_issue_detector",
477478
"sentry.incidents.utils.*",
478479
"sentry.ingest.slicing",
479480
"sentry.insights.migrations.*",

src/sentry/api/endpoints/organization_events.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from sentry.apidocs.parameters import GlobalParams, OrganizationParams, VisibilityParams
2626
from sentry.apidocs.utils import inline_sentry_response_serializer
2727
from sentry.discover.models import DiscoverSavedQuery, DiscoverSavedQueryTypes
28-
from sentry.exceptions import InvalidParams
2928
from sentry.models.dashboard_widget import DashboardWidget, DashboardWidgetTypes
3029
from sentry.models.organization import Organization
3130
from sentry.ratelimits.config import RateLimitConfig
@@ -194,8 +193,6 @@ def get(self, request: Request, organization: Organization) -> Response:
194193
},
195194
}
196195
)
197-
except InvalidParams as err:
198-
raise ParseError(detail=str(err))
199196

200197
batch_features = self.get_features(organization, request)
201198

src/sentry/api/endpoints/source_map_debug_blue_thunder_edition.py

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from typing import Literal, TypedDict
22

33
import sentry_sdk
4+
from django.db.models import Exists, OuterRef
45
from django.utils.encoding import force_bytes, force_str
56
from drf_spectacular.utils import extend_schema
67
from packaging.version import Version
@@ -20,6 +21,7 @@
2021
ArtifactBundle,
2122
ArtifactBundleArchive,
2223
DebugIdArtifactBundle,
24+
ProjectArtifactBundle,
2325
ReleaseArtifactBundle,
2426
SourceFileType,
2527
)
@@ -179,11 +181,6 @@ def get(self, request: Request, project: Project, event_id: str) -> Response:
179181
has_uploaded_artifact_bundle_with_release = ReleaseArtifactBundle.objects.filter(
180182
organization_id=project.organization_id, release_name=release.version
181183
).exists()
182-
has_uploaded_some_artifact_with_a_debug_id = DebugIdArtifactBundle.objects.filter(
183-
organization_id=project.organization_id,
184-
artifact_bundle__projectartifactbundle__project_id=project.id,
185-
).exists()
186-
187184
debug_images = get_path(event_data, "debug_meta", "images")
188185
debug_images = debug_images if debug_images is not None else []
189186

@@ -212,6 +209,23 @@ def get(self, request: Request, project: Project, event_id: str) -> Response:
212209
):
213210
debug_ids_with_uploaded_source_map.add(str(debug_id_artifact_bundle.debug_id))
214211

212+
has_uploaded_some_artifact_with_a_debug_id = bool(
213+
debug_ids_with_uploaded_source_file or debug_ids_with_uploaded_source_map
214+
) or (
215+
DebugIdArtifactBundle.objects.filter(
216+
organization_id=project.organization_id,
217+
)
218+
.filter(
219+
Exists(
220+
ProjectArtifactBundle.objects.filter(
221+
artifact_bundle_id=OuterRef("artifact_bundle_id"),
222+
project_id=project.id,
223+
)
224+
)
225+
)
226+
.exists()
227+
)
228+
215229
# Get all abs paths and query for their existence so that we can match release artifacts
216230
release_process_abs_path_data = {}
217231
if release is not None:

src/sentry/api/serializers/rest_framework/dashboard.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,19 @@ def update_widgets(self, instance, widget_data):
862862
# Create a new widget.
863863
self.create_widget(instance, data)
864864
else:
865+
sentry_sdk.set_context(
866+
"dashboard",
867+
{
868+
"org_slug": instance.organization.slug,
869+
"dashboard_id": instance.id,
870+
"widget_id": widget_id,
871+
"existing_widget_ids": list(existing_map.keys()),
872+
"requested_widget_ids": widget_ids,
873+
},
874+
)
875+
sentry_sdk.capture_message(
876+
"Attempted to update widget not belonging to dashboard."
877+
)
865878
raise serializers.ValidationError(
866879
"You cannot update widgets that are not part of this dashboard."
867880
)

src/sentry/charts/types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class ChartType(Enum):
2424
SLACK_PERFORMANCE_FUNCTION_REGRESSION = "slack:performance.functionRegression"
2525
SLACK_METRIC_DETECTOR_EVENTS = "slack:metricDetector.events"
2626
SLACK_METRIC_DETECTOR_SESSIONS = "slack:metricDetector.sessions"
27+
SLACK_EXPLORE_LINE = "slack:explore.line"
2728

2829

2930
class ChartSize(TypedDict):

src/sentry/event_manager.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
from sentry.grouping.ingest.hashing import (
6666
find_grouphash_with_group,
6767
get_or_create_grouphashes,
68-
maybe_run_background_grouping,
6968
maybe_run_secondary_grouping,
7069
run_primary_grouping,
7170
)
@@ -1358,11 +1357,6 @@ def assign_event_to_group(
13581357

13591358
# From here on out, we're just doing housekeeping
13601359

1361-
# Background grouping is a way for us to get performance metrics for a new
1362-
# config without having it actually affect on how events are grouped. It runs
1363-
# either before or after the main grouping logic, depending on the option value.
1364-
maybe_run_background_grouping(project, job)
1365-
13661360
record_hash_calculation_metrics(
13671361
project, primary.config, primary.hashes, secondary.config, secondary.hashes, result
13681362
)

src/sentry/exceptions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from django.core.exceptions import SuspiciousOperation
2+
from rest_framework.exceptions import ParseError
23

34

45
class InvalidData(Exception):
@@ -89,5 +90,8 @@ def __init__(
8990
self.tombstone_id = tombstone_id
9091

9192

92-
class InvalidParams(Exception):
93+
class InvalidParams(ParseError):
94+
"""Inherits from ParseError so DRF automatically returns a 400 response
95+
when this exception is unhandled in a view."""
96+
9397
pass

src/sentry/features/temporary.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,8 @@ def register_temporary_features(manager: FeatureManager) -> None:
317317
manager.add("organizations:seer-explorer-context-engine-fe-override-ui-flag", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
318318
# Enable code editing tools in Seer Explorer chat
319319
manager.add("organizations:seer-explorer-chat-coding", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
320+
# Enable code mode tools (sentry_api_search/execute) in Seer Explorer
321+
manager.add("organizations:seer-explorer-code-mode-tools", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
320322
# Enable structured LLM context (JSON snapshot) instead of ASCII DOM snapshot
321323
manager.add("organizations:context-engine-structured-page-context", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
322324
# Enable the Seer Overview sections for Seat-Based users
@@ -382,6 +384,8 @@ def register_temporary_features(manager: FeatureManager) -> None:
382384
manager.add("organizations:data-browsing-widget-unfurl", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
383385
# Enable dual-write of Seer project preferences to Sentry DB and Seer API
384386
manager.add("organizations:seer-project-settings-dual-write", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
387+
# Enable reading of Seer project preferences from Sentry DB instead of Seer API
388+
manager.add("organizations:seer-project-settings-read-from-sentry", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
385389
# Enable public RPC endpoint for local seer development
386390
manager.add("organizations:seer-public-rpc", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
387391
# Organizations on the old usage-based (v0) Seer plan

0 commit comments

Comments
 (0)