Skip to content

Commit 8cf43b7

Browse files
committed
reset
1 parent 8f191d6 commit 8cf43b7

File tree

314 files changed

+5591
-5169
lines changed

Some content is hidden

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

314 files changed

+5591
-5169
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,6 @@ static/app/components/events/eventStatisticalDetector/ @getse
495495
/src/sentry/tasks/post_process.py @getsentry/issues
496496
/src/sentry/tasks/unmerge.py @getsentry/issues
497497
/src/sentry/search/snuba/ @getsentry/issues
498-
/static/app/components/events/contexts/ @getsentry/issues
499-
/static/app/components/events/eventTags/ @getsentry/issues
500-
/static/app/components/events/highlights/ @getsentry/issues
501498
/static/app/views/issueList @getsentry/issues
502499
/static/app/views/issueDetails/ @getsentry/issues
503500
/static/app/views/organizationStats/teamInsights/ @getsentry/issues

babel.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const config: TransformOptions = {
1515
'@babel/preset-env',
1616
{
1717
useBuiltIns: 'usage',
18-
corejs: '3.37',
18+
corejs: '3.27',
1919
},
2020
],
2121
// TODO: Remove allowDeclareFields when we upgrade to Babel 8

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
},
1010
"dependencies": {
1111
"@acemarke/react-prod-sourcemaps": "^0.2.1",
12-
"@babel/core": "~7.24.5",
13-
"@babel/plugin-transform-react-jsx": "^7.23.4",
14-
"@babel/plugin-transform-react-jsx-source": "^7.24.1",
15-
"@babel/plugin-transform-runtime": "~7.24.3",
16-
"@babel/preset-env": "~7.24.5",
17-
"@babel/preset-react": "^7.24.1",
18-
"@babel/preset-typescript": "^7.24.1",
19-
"@babel/runtime": "~7.24.5",
12+
"@babel/core": "~7.23.2",
13+
"@babel/plugin-transform-react-jsx": "^7.22.15",
14+
"@babel/plugin-transform-react-jsx-source": "^7.22.5",
15+
"@babel/plugin-transform-runtime": "~7.23.2",
16+
"@babel/preset-env": "~7.23.2",
17+
"@babel/preset-react": "^7.22.15",
18+
"@babel/preset-typescript": "^7.23.2",
19+
"@babel/runtime": "~7.23.2",
2020
"@dnd-kit/core": "^3.1.1",
2121
"@dnd-kit/sortable": "^4.0.0",
2222
"@emotion/babel-plugin": "^11.11.0",
@@ -56,7 +56,7 @@
5656
"@sentry-internal/rrweb": "2.12.0",
5757
"@sentry-internal/rrweb-player": "2.12.0",
5858
"@sentry-internal/rrweb-snapshot": "2.12.0",
59-
"@sentry/babel-plugin-component-annotate": "^2.16.1",
59+
"@sentry/babel-plugin-component-annotate": "^2.16.0",
6060
"@sentry/core": "^8.0.0-beta.6",
6161
"@sentry/node": "^8.0.0-beta.6",
6262
"@sentry/react": "^8.0.0-beta.6",
@@ -93,7 +93,7 @@
9393
"@types/scroll-to-element": "^2.0.2",
9494
"@types/webpack-env": "^1.18.4",
9595
"ansi-to-react": "^6.1.6",
96-
"babel-loader": "^9.1.3",
96+
"babel-loader": "^9.1.2",
9797
"babel-plugin-add-react-displayname": "^0.0.5",
9898
"browserslist": "^4.22.2",
9999
"buffer": "^6.0.3",
@@ -102,7 +102,7 @@
102102
"color": "^4.2.3",
103103
"compression-webpack-plugin": "11.1.0",
104104
"copy-webpack-plugin": "^12.0.2",
105-
"core-js": "^3.37.0",
105+
"core-js": "^3.33.0",
106106
"cronstrue": "^2.26.0",
107107
"css-loader": "^7.1.1",
108108
"css-minimizer-webpack-plugin": "^6.0.0",

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,6 @@ module = [
604604
"sentry.utils.locking.backends.redis",
605605
"sentry.utils.migrations",
606606
"sentry.utils.otp",
607-
"sentry.utils.performance_issues.detectors.*",
608-
"sentry.utils.performance_issues.performance_detection",
609607
"sentry.utils.redis",
610608
"sentry.utils.redis_metrics",
611609
"sentry.utils.sms",

requirements-base.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ sentry-kafka-schemas>=0.1.79
6767
sentry-ophio==0.2.7
6868
sentry-redis-tools>=0.1.7
6969
sentry-relay>=0.8.60
70-
sentry-sdk==2.1.1
71-
snuba-sdk>=2.0.33
70+
sentry-sdk==2.0.0
71+
snuba-sdk>=2.0.32
7272
simplejson>=3.17.6
7373
sqlparse>=0.4.4
7474
statsd>=3.3

requirements-dev-frozen.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,12 @@ sentry-kafka-schemas==0.1.79
184184
sentry-ophio==0.2.7
185185
sentry-redis-tools==0.1.7
186186
sentry-relay==0.8.60
187-
sentry-sdk==2.1.1
187+
sentry-sdk==2.0.0
188188
sentry-usage-accountant==0.0.10
189189
simplejson==3.17.6
190190
six==1.16.0
191191
sniffio==1.2.0
192-
snuba-sdk==2.0.33
192+
snuba-sdk==2.0.32
193193
sortedcontainers==2.4.0
194194
soupsieve==2.3.2.post1
195195
sqlparse==0.4.4

requirements-frozen.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,12 @@ sentry-kafka-schemas==0.1.79
124124
sentry-ophio==0.2.7
125125
sentry-redis-tools==0.1.7
126126
sentry-relay==0.8.60
127-
sentry-sdk==2.1.1
127+
sentry-sdk==2.0.0
128128
sentry-usage-accountant==0.0.10
129129
simplejson==3.17.6
130130
six==1.16.0
131131
sniffio==1.3.0
132-
snuba-sdk==2.0.33
132+
snuba-sdk==2.0.32
133133
soupsieve==2.3.2.post1
134134
sqlparse==0.4.4
135135
statsd==3.3.0

src/flagpole/evaluation_context.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ def add_context_transformer(
7676
self.context_transformers.append(context_transformer)
7777
return self
7878

79-
def add_exception_handler(
80-
self, exception_handler: Callable[[Exception], None]
81-
) -> ContextBuilder:
79+
def add_exception_handler(self, exception_handler: Callable[[Exception], None]):
8280
"""
8381
Add a custom exception handler to the context builder if you need custom handling
8482
if any of the transformer functions raise an exception. This is useful for swallowing
@@ -90,7 +88,6 @@ def add_exception_handler(
9088
raise Exception("Exception handler is already defined")
9189

9290
self.exception_handler = exception_handler
93-
return self
9491

9592
def build(self, data: dict[str, Any] | None = None) -> EvaluationContext:
9693
builder_data: dict[str, Any] = data or dict()

src/flagpole/sentry_flagpole_context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ def user_context_transformer(data: dict[str, Any]) -> EvaluationContextDict:
7878
return context_data
7979

8080

81-
def get_sentry_flagpole_context_builder() -> ContextBuilder:
81+
def get_sentry_flagpole_context_builder():
8282
"""
8383
Creates and returns a new sentry flagpole context builder with Organization,
84-
User, and Project transformers appended to it.
84+
User, Team, and Project transformers appended to it.
8585
:return:
8686
"""
8787
return (

src/sentry/api/bases/group.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ class GroupEndpoint(Endpoint):
4040
owner = ApiOwner.ISSUES
4141
permission_classes = (GroupPermission,)
4242

43-
def convert_args(self, request: Request, issue_id, organization_slug=None, *args, **kwargs):
43+
def convert_args(
44+
self, request: Request, issue_id, organization_id_or_slug=None, *args, **kwargs
45+
):
4446
# TODO(tkaemming): Ideally, this would return a 302 response, rather
4547
# than just returning the data that is bound to the new group. (It
4648
# technically shouldn't be a 301, since the response could change again
@@ -51,17 +53,17 @@ def convert_args(self, request: Request, issue_id, organization_slug=None, *args
5153
# string replacement, or making the endpoint aware of the URL pattern
5254
# that caused it to be dispatched, and reversing it with the correct
5355
# `issue_id` keyword argument.
54-
if organization_slug:
56+
if organization_id_or_slug:
5557
try:
5658
if (
5759
id_or_slug_path_params_enabled(
58-
self.convert_args.__qualname__, str(organization_slug)
60+
self.convert_args.__qualname__, str(organization_id_or_slug)
5961
)
60-
and str(organization_slug).isdecimal()
62+
and str(organization_id_or_slug).isdecimal()
6163
):
62-
organization = Organization.objects.get_from_cache(id=organization_slug)
64+
organization = Organization.objects.get_from_cache(id=organization_id_or_slug)
6365
else:
64-
organization = Organization.objects.get_from_cache(slug=organization_slug)
66+
organization = Organization.objects.get_from_cache(slug=organization_id_or_slug)
6567
except Organization.DoesNotExist:
6668
raise ResourceDoesNotExist
6769

src/sentry/api/bases/organization.py

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -242,30 +242,42 @@ class ControlSiloOrganizationEndpoint(Endpoint):
242242
def convert_args(
243243
self,
244244
request: Request,
245-
organization_slug: str | int | None = None,
246245
*args: Any,
247246
**kwargs: Any,
248247
) -> tuple[tuple[Any, ...], dict[str, Any]]:
248+
organization_id_or_slug: int | str | None = None
249+
if args and args[0] is not None:
250+
organization_id_or_slug = args[0]
251+
# Required so it behaves like the original convert_args, where organization_id_or_slug was another parameter
252+
# TODO: Remove this once we remove the old `organization_slug` parameter from getsentry
253+
args = args[1:]
254+
else:
255+
organization_id_or_slug = kwargs.pop("organization_id_or_slug", None) or kwargs.pop(
256+
"organization_slug", None
257+
)
258+
249259
if not subdomain_is_region(request):
250260
subdomain = getattr(request, "subdomain", None)
251-
if subdomain is not None and subdomain != organization_slug:
261+
if subdomain is not None and subdomain != organization_id_or_slug:
252262
raise ResourceDoesNotExist
253263

254-
if not organization_slug:
264+
if not organization_id_or_slug:
255265
raise ResourceDoesNotExist
256266

257267
if (
258-
id_or_slug_path_params_enabled(self.convert_args.__qualname__, str(organization_slug))
259-
and str(organization_slug).isdecimal()
268+
id_or_slug_path_params_enabled(
269+
self.convert_args.__qualname__, str(organization_id_or_slug)
270+
)
271+
and str(organization_id_or_slug).isdecimal()
260272
):
261273
# It is ok that `get_organization_by_id` doesn't check for visibility as we
262274
# don't check the visibility in `get_organization_by_slug` either (only_active=False).
263275
organization_context = organization_service.get_organization_by_id(
264-
id=int(organization_slug), user_id=request.user.id
276+
id=int(organization_id_or_slug), user_id=request.user.id
265277
)
266278
else:
267279
organization_context = organization_service.get_organization_by_slug(
268-
slug=str(organization_slug), only_visible=False, user_id=request.user.id
280+
slug=str(organization_id_or_slug), only_visible=False, user_id=request.user.id
269281
)
270282
if organization_context is None:
271283
raise ResourceDoesNotExist
@@ -536,32 +548,42 @@ def get_filter_params(
536548
def convert_args(
537549
self,
538550
request: Request,
539-
organization_slug: str | int | None = None,
540551
*args: Any,
541552
**kwargs: Any,
542553
) -> tuple[tuple[Any, ...], dict[str, Any]]:
543554
"""
544-
We temporarily allow the organization_slug to be an integer as it actually can be both slug or id
555+
We temporarily allow the organization_id_or_slug to be an integer as it actually can be both slug or id
545556
Eventually, we will rename this method to organization_id_or_slug
546557
"""
558+
organization_id_or_slug: int | str | None = None
559+
if args and args[0] is not None:
560+
organization_id_or_slug = args[0]
561+
# Required so it behaves like the original convert_args, where organization_id_or_slug was another parameter
562+
# TODO: Remove this once we remove the old `organization_slug` parameter from getsentry
563+
args = args[1:]
564+
else:
565+
organization_id_or_slug = kwargs.pop("organization_id_or_slug", None) or kwargs.pop(
566+
"organization_slug", None
567+
)
568+
547569
if not subdomain_is_region(request):
548570
subdomain = getattr(request, "subdomain", None)
549-
if subdomain is not None and subdomain != organization_slug:
571+
if subdomain is not None and subdomain != organization_id_or_slug:
550572
raise ResourceDoesNotExist
551573

552-
if not organization_slug:
574+
if not organization_id_or_slug:
553575
raise ResourceDoesNotExist
554576

555577
try:
556578
if (
557579
id_or_slug_path_params_enabled(
558-
self.convert_args.__qualname__, str(organization_slug)
580+
self.convert_args.__qualname__, str(organization_id_or_slug)
559581
)
560-
and str(organization_slug).isdecimal()
582+
and str(organization_id_or_slug).isdecimal()
561583
):
562-
organization = Organization.objects.get_from_cache(id=organization_slug)
584+
organization = Organization.objects.get_from_cache(id=organization_id_or_slug)
563585
else:
564-
organization = Organization.objects.get_from_cache(slug=organization_slug)
586+
organization = Organization.objects.get_from_cache(slug=organization_id_or_slug)
565587
except Organization.DoesNotExist:
566588
raise ResourceDoesNotExist
567589

src/sentry/api/bases/organization_integrations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ class RegionOrganizationIntegrationBaseEndpoint(RegionIntegrationEndpoint):
7575
def convert_args(
7676
self,
7777
request: Request,
78-
organization_slug: str | int | None = None,
78+
organization_id_or_slug: int | str | None = None,
7979
integration_id: str | None = None,
8080
*args: Any,
8181
**kwargs: Any,
8282
) -> tuple[tuple[Any, ...], dict[str, Any]]:
83-
args, kwargs = super().convert_args(request, organization_slug, *args, **kwargs)
83+
args, kwargs = super().convert_args(request, organization_id_or_slug, *args, **kwargs)
8484

8585
kwargs["integration_id"] = self.validate_integration_id(integration_id or "")
8686
return args, kwargs

src/sentry/api/bases/organizationmember.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ class OrganizationMemberEndpoint(OrganizationEndpoint):
5353
def convert_args(
5454
self,
5555
request: Request,
56-
organization_slug: int | str | None = None,
56+
organization_id_or_slug: str | int | None = None,
5757
member_id: str = "me",
5858
*args: Any,
5959
**kwargs: Any,
6060
) -> tuple[tuple[Any, ...], dict[str, Any]]:
61-
args, kwargs = super().convert_args(request, organization_slug, *args, **kwargs)
61+
args, kwargs = super().convert_args(request, organization_id_or_slug, *args, **kwargs)
6262

6363
serializer = MemberSerializer(data={"id": member_id})
6464
if serializer.is_valid():

src/sentry/api/bases/project.py

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,19 @@ class ProjectEndpoint(Endpoint):
111111
def convert_args(
112112
self,
113113
request: Request,
114-
organization_slug: str | int,
115114
*args,
116115
**kwargs,
117116
):
117+
if args and args[0] is not None:
118+
organization_id_or_slug: int | str = args[0]
119+
# Required so it behaves like the original convert_args, where organization_id_or_slug was another parameter
120+
# TODO: Remove this once we remove the old `organization_slug` parameter from getsentry
121+
args = args[1:]
122+
else:
123+
organization_id_or_slug = kwargs.pop("organization_id_or_slug", None) or kwargs.pop(
124+
"organization_slug"
125+
)
126+
118127
if args and args[0] is not None:
119128
project_id_or_slug: int | str = args[0]
120129
# Required so it behaves like the original convert_args, where project_id_or_slug was another parameter
@@ -125,11 +134,11 @@ def convert_args(
125134
)
126135
try:
127136
if id_or_slug_path_params_enabled(
128-
self.convert_args.__qualname__, str(organization_slug)
137+
self.convert_args.__qualname__, str(organization_id_or_slug)
129138
):
130139
project = (
131140
Project.objects.filter(
132-
organization__slug__id_or_slug=organization_slug,
141+
organization__slug__id_or_slug=organization_id_or_slug,
133142
slug__id_or_slug=project_id_or_slug,
134143
)
135144
.select_related("organization")
@@ -139,7 +148,7 @@ def convert_args(
139148
else:
140149
project = (
141150
Project.objects.filter(
142-
organization__slug=organization_slug, slug=project_id_or_slug
151+
organization__slug=organization_id_or_slug, slug=project_id_or_slug
143152
)
144153
.select_related("organization")
145154
.prefetch_related("teams")
@@ -151,24 +160,24 @@ def convert_args(
151160
# This will only happen if the passed in project_id_or_slug is a slug and not an id
152161
redirect = ProjectRedirect.objects.select_related("project")
153162
if id_or_slug_path_params_enabled(
154-
self.convert_args.__qualname__, str(organization_slug)
163+
self.convert_args.__qualname__, str(organization_id_or_slug)
155164
):
156165
redirect = redirect.get(
157-
organization__slug__id_or_slug=organization_slug,
166+
organization__slug__id_or_slug=organization_id_or_slug,
158167
redirect_slug=project_id_or_slug,
159168
)
160169
else:
161170
redirect = redirect.get(
162-
organization__slug=organization_slug, redirect_slug=project_id_or_slug
171+
organization__slug=organization_id_or_slug, redirect_slug=project_id_or_slug
163172
)
164173
# Without object permissions don't reveal the rename
165174
self.check_object_permissions(request, redirect.project)
166175

167176
# get full path so that we keep query strings
168177
requested_url = request.get_full_path()
169178
new_url = requested_url.replace(
170-
f"projects/{organization_slug}/{project_id_or_slug}/",
171-
f"projects/{organization_slug}/{redirect.project.slug}/",
179+
f"projects/{organization_id_or_slug}/{project_id_or_slug}/",
180+
f"projects/{organization_id_or_slug}/{redirect.project.slug}/",
172181
)
173182

174183
# Resource was moved/renamed if the requested url is different than the new url

0 commit comments

Comments
 (0)