Skip to content

Commit

Permalink
Merge branch 'master' into wmak/feat/add-stubs-for-rpc-querybuilding
Browse files Browse the repository at this point in the history
  • Loading branch information
wmak authored Oct 4, 2024
2 parents 1c106d7 + c6dbdab commit b8d2902
Show file tree
Hide file tree
Showing 495 changed files with 11,492 additions and 7,019 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ module.exports = {
name: 'qs',
message: 'Please use query-string instead of qs',
},
{
name: 'moment',
message: 'Please import moment-timezone instead of moment',
},
],
},
],
Expand Down
6 changes: 0 additions & 6 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,6 @@ tests/sentry/api/endpoints/test_organization_dashboard_widget_details.py @ge
## End of Profiling


## Configurations
/src/sentry/remote_config/ @getsentry/replay-backend
/tests/sentry/remote_config/ @getsentry/replay-backend
## End of Configurations


## Flags
/src/sentry/flags/ @getsentry/replay-backend
/tests/sentry/flags/ @getsentry/replay-backend
Expand Down
14 changes: 7 additions & 7 deletions api-docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,25 +135,25 @@
"/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/issues/": {
"$ref": "paths/events/project-issues.json"
},
"/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/tags/{key}/values/": {
"/api/0/issues/{issue_id}/tags/{key}/values/": {
"$ref": "paths/events/tag-values.json"
},
"/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/tags/{key}/": {
"/api/0/issues/{issue_id}/tags/{key}/": {
"$ref": "paths/events/tag-details.json"
},
"/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/hashes/": {
"/api/0/issues/{issue_id}/hashes/": {
"$ref": "paths/events/issue-hashes.json"
},
"/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/events/oldest/": {
"/api/0/issues/{issue_id}/events/oldest/": {
"$ref": "paths/events/oldest-event.json"
},
"/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/events/latest/": {
"/api/0/issues/{issue_id}/events/latest/": {
"$ref": "paths/events/latest-event.json"
},
"/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/events/": {
"/api/0/issues/{issue_id}/events/": {
"$ref": "paths/events/issue-events.json"
},
"/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/": {
"/api/0/issues/{issue_id}/": {
"$ref": "paths/events/issue-details.json"
},
"/api/0/organizations/{organization_id_or_slug}/releases/": {
Expand Down
9 changes: 0 additions & 9 deletions api-docs/paths/events/issue-events.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@
"description": "This endpoint lists an issue's events.",
"operationId": "List an Issue's Events",
"parameters": [
{
"name": "organization_id_or_slug",
"in": "path",
"description": "The ID or slug of the organization the issues belongs to.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "issue_id",
"in": "path",
Expand Down
9 changes: 0 additions & 9 deletions api-docs/paths/events/issue-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@
"description": "This endpoint lists an issue's hashes, which are the generated checksums used to aggregate individual events.",
"operationId": "List an Issue's Hashes",
"parameters": [
{
"name": "organization_id_or_slug",
"in": "path",
"description": "The ID or slug of the organization the issue belong to.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "issue_id",
"in": "path",
Expand Down
9 changes: 0 additions & 9 deletions api-docs/paths/events/latest-event.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@
"description": "Retrieves the details of the latest event for an issue.",
"operationId": "Retrieve the Latest Event for an Issue",
"parameters": [
{
"name": "organization_id_or_slug",
"in": "path",
"description": "The ID or slug of the organization the issue belong to.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "issue_id",
"in": "path",
Expand Down
9 changes: 0 additions & 9 deletions api-docs/paths/events/oldest-event.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@
"description": "Retrieves the details of the oldest event for an issue.",
"operationId": "Retrieve the Oldest Event for an Issue",
"parameters": [
{
"name": "organization_id_or_slug",
"in": "path",
"description": "The ID or slug of the organization the issue belong to.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "issue_id",
"in": "path",
Expand Down
9 changes: 0 additions & 9 deletions api-docs/paths/events/tag-details.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@
"description": "Returns details for given tag key related to an issue.",
"operationId": "Retrieve Tag Details",
"parameters": [
{
"name": "organization_id_or_slug",
"in": "path",
"description": "The ID or slug of the organization the issue belongs to.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "issue_id",
"in": "path",
Expand Down
9 changes: 0 additions & 9 deletions api-docs/paths/events/tag-values.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@
"description": "Returns details for given tag key related to an issue. \n\nWhen [paginated](/api/pagination) can return at most 1000 values.",
"operationId": "List a Tag's Values Related to an Issue",
"parameters": [
{
"name": "organization_id_or_slug",
"in": "path",
"description": "The ID or slug of the organization the issue belongs to.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "issue_id",
"in": "path",
Expand Down
6 changes: 3 additions & 3 deletions migrations_lockfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ hybridcloud: 0016_add_control_cacheversion
nodestore: 0002_nodestore_no_dictfield
remote_subscriptions: 0003_drop_remote_subscription
replays: 0004_index_together
sentry: 0770_increase_project_slug_max_length
sentry: 0772_backfill_grouphash_metadata_grouping_config
social_auth: 0002_default_auto_field
uptime: 0014_add_uptime_enviromnet
workflow_engine: 0008_detector_state
uptime: 0016_translate_uptime_object_headers_to_lists
workflow_engine: 0009_detector_type
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"@react-types/shared": "^3.24.1",
"@rsdoctor/webpack-plugin": "0.4.4",
"@sentry-internal/global-search": "^1.0.0",
"@sentry-internal/react-inspector": "6.0.1-4",
"@sentry-internal/rrweb": "2.26.0",
"@sentry-internal/rrweb-player": "2.26.0",
"@sentry-internal/rrweb-snapshot": "2.26.0",
Expand Down Expand Up @@ -142,7 +141,7 @@
"papaparse": "^5.3.2",
"pegjs": "^0.10.0",
"pegjs-loader": "^0.5.8",
"platformicons": "^6.0.1",
"platformicons": "^6.0.3",
"po-catalog-loader": "2.1.0",
"prettier": "3.3.2",
"prismjs": "^1.29.0",
Expand Down
7 changes: 1 addition & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ module = [
"sentry.api.bases.organizationmember",
"sentry.api.bases.project",
"sentry.api.bases.project_request_change",
"sentry.api.bases.sentryapps",
"sentry.api.bases.team",
"sentry.api.endpoints.accept_organization_invite",
"sentry.api.endpoints.auth_config",
Expand Down Expand Up @@ -206,8 +205,6 @@ module = [
"sentry.db.router",
"sentry.discover.endpoints.discover_key_transactions",
"sentry.eventstore.models",
"sentry.features.handler",
"sentry.features.manager",
"sentry.grouping.strategies.legacy",
"sentry.identity.bitbucket.provider",
"sentry.identity.github_enterprise.provider",
Expand Down Expand Up @@ -344,13 +341,11 @@ module = [
"sentry.tasks.auth",
"sentry.tasks.base",
"sentry.tasks.process_buffer",
"sentry.tasks.sentry_apps",
"sentry.templatetags.sentry_assets",
"sentry.templatetags.sentry_helpers",
"sentry.templatetags.sentry_plugins",
"sentry.testutils.cases",
"sentry.testutils.fixtures",
"sentry.testutils.helpers.features",
"sentry.testutils.helpers.notifications",
"sentry.testutils.helpers.slack",
"sentry.utils.auth",
Expand Down Expand Up @@ -381,7 +376,6 @@ module = [
"sentry_plugins.jira.plugin",
"tests.sentry.api.bases.test_organization",
"tests.sentry.api.bases.test_project",
"tests.sentry.api.bases.test_sentryapps",
"tests.sentry.api.bases.test_team",
"tests.sentry.api.endpoints.notifications.test_notification_actions_details",
"tests.sentry.api.endpoints.notifications.test_notification_actions_index",
Expand Down Expand Up @@ -548,6 +542,7 @@ module = [
"sentry.web.frontend.auth_provider_login",
"sentry.web.frontend.csv",
"sentry_plugins.base",
"tests.sentry.deletions.test_group",
"tests.sentry.event_manager.test_event_manager",
"tests.sentry.grouping.test_fingerprinting",
"tests.sentry.hybridcloud.*",
Expand Down
6 changes: 3 additions & 3 deletions requirements-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ rfc3986-validator>=0.1.1
sentry-arroyo>=2.16.5
sentry-kafka-schemas>=0.1.111
sentry-ophio==1.0.0
sentry-protos>=0.1.21
sentry-protos>=0.1.23
sentry-redis-tools>=0.1.7
sentry-relay>=0.9.2
sentry-sdk>=2.12.0
sentry-sdk>=2.15.0
slack-sdk>=3.27.2
snuba-sdk>=3.0.38
snuba-sdk>=3.0.40
simplejson>=3.17.6
sqlparse>=0.4.4
statsd>=3.3
Expand Down
8 changes: 4 additions & 4 deletions requirements-dev-frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ confluent-kafka==2.3.0
covdefaults==2.3.0
coverage==7.4.1
croniter==1.3.10
cryptography==42.0.4
cryptography==43.0.1
cssselect==1.0.3
cssutils==2.9.0
datadog==0.49.1
Expand Down Expand Up @@ -184,16 +184,16 @@ sentry-forked-django-stubs==5.1.0.post1
sentry-forked-djangorestframework-stubs==3.15.1.post1
sentry-kafka-schemas==0.1.111
sentry-ophio==1.0.0
sentry-protos==0.1.21
sentry-protos==0.1.23
sentry-redis-tools==0.1.7
sentry-relay==0.9.2
sentry-sdk==2.12.0
sentry-sdk==2.15.0
sentry-usage-accountant==0.0.10
simplejson==3.17.6
six==1.16.0
slack-sdk==3.27.2
sniffio==1.2.0
snuba-sdk==3.0.39
snuba-sdk==3.0.40
sortedcontainers==2.4.0
soupsieve==2.3.2.post1
sqlparse==0.5.0
Expand Down
8 changes: 4 additions & 4 deletions requirements-frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ click-plugins==1.1.1
click-repl==0.3.0
confluent-kafka==2.3.0
croniter==1.3.10
cryptography==42.0.4
cryptography==43.0.1
cssselect==1.0.3
cssutils==2.9.0
datadog==0.49.1
Expand Down Expand Up @@ -125,16 +125,16 @@ s3transfer==0.10.0
sentry-arroyo==2.16.5
sentry-kafka-schemas==0.1.111
sentry-ophio==1.0.0
sentry-protos==0.1.21
sentry-protos==0.1.23
sentry-redis-tools==0.1.7
sentry-relay==0.9.2
sentry-sdk==2.12.0
sentry-sdk==2.15.0
sentry-usage-accountant==0.0.10
simplejson==3.17.6
six==1.16.0
slack-sdk==3.27.2
sniffio==1.3.0
snuba-sdk==3.0.39
snuba-sdk==3.0.40
soupsieve==2.3.2.post1
sqlparse==0.5.0
statsd==3.3.0
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/api/api_owners.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class ApiOwner(Enum):
ECOSYSTEM = "ecosystem"
ENTERPRISE = "enterprise"
FEEDBACK = "feedback-backend"
FLAG = "replay-backend"
HYBRID_CLOUD = "hybrid-cloud"
INTEGRATIONS = "product-owners-settings-integrations"
ISSUES = "issues"
Expand All @@ -27,4 +28,3 @@ class ApiOwner(Enum):
TELEMETRY_EXPERIENCE = "telemetry-experience"
UNOWNED = "unowned"
WEB_FRONTEND_SDKS = "team-web-sdk-frontend"
REMOTE_CONFIG = "replay-backend"
12 changes: 6 additions & 6 deletions src/sentry/api/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def dispatch(self, request: Request, *args, **kwargs) -> Response:
Identical to rest framework's dispatch except we add the ability
to convert arguments (for common URL params).
"""
with sentry_sdk.start_span(op="base.dispatch.setup", description=type(self).__name__):
with sentry_sdk.start_span(op="base.dispatch.setup", name=type(self).__name__):
self.args = args
self.kwargs = kwargs
request = self.initialize_request(request, *args, **kwargs)
Expand All @@ -415,7 +415,7 @@ def dispatch(self, request: Request, *args, **kwargs) -> Response:
origin = None

try:
with sentry_sdk.start_span(op="base.dispatch.request", description=type(self).__name__):
with sentry_sdk.start_span(op="base.dispatch.request", name=type(self).__name__):
if origin:
if request.auth:
allowed_origins = request.auth.get_allowed_origins()
Expand Down Expand Up @@ -449,7 +449,7 @@ def dispatch(self, request: Request, *args, **kwargs) -> Response:

with sentry_sdk.start_span(
op="base.dispatch.execute",
description=".".join(
name=".".join(
getattr(part, "__name__", None) or str(part) for part in (type(self), handler)
),
) as span:
Expand All @@ -469,7 +469,7 @@ def dispatch(self, request: Request, *args, **kwargs) -> Response:
if duration < (settings.SENTRY_API_RESPONSE_DELAY / 1000.0):
with sentry_sdk.start_span(
op="base.dispatch.sleep",
description=type(self).__name__,
name=type(self).__name__,
) as span:
span.set_data("SENTRY_API_RESPONSE_DELAY", settings.SENTRY_API_RESPONSE_DELAY)
time.sleep(settings.SENTRY_API_RESPONSE_DELAY / 1000.0 - duration)
Expand Down Expand Up @@ -556,7 +556,7 @@ def paginate(
cursor = self.get_cursor_from_request(request, cursor_cls)
with sentry_sdk.start_span(
op="base.paginate.get_result",
description=type(self).__name__,
name=type(self).__name__,
) as span:
annotate_span_with_pagination_args(span, per_page)
paginator = get_paginator(paginator, paginator_cls, paginator_kwargs)
Expand All @@ -576,7 +576,7 @@ def paginate(
if on_results:
with sentry_sdk.start_span(
op="base.paginate.on_results",
description=type(self).__name__,
name=type(self).__name__,
):
results = on_results(cursor_result.results)
else:
Expand Down
1 change: 0 additions & 1 deletion src/sentry/api/bases/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
from .organizationmember import * # NOQA
from .project import * # NOQA
from .project_transaction_threshold_override import * # NOQA
from .sentryapps import * # NOQA
from .team import * # NOQA
Loading

0 comments on commit b8d2902

Please sign in to comment.