Skip to content

Commit 8217a27

Browse files
authored
Merge branch 'master' into sessions-discover
2 parents 2a90488 + 3ae6392 commit 8217a27

File tree

174 files changed

+3156
-2589
lines changed

Some content is hidden

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

174 files changed

+3156
-2589
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
*.d.ts
66
config/chartcuterie/config.js
77
fixtures/profiles/embedded.js
8+
fixtures/artifact_bundle_debug_ids/**/*
9+
fixtures/artifact_bundle_duplicated_debug_ids/**/*

.github/workflows/acceptance.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
outputs:
3030
acceptance: ${{ steps.changes.outputs.acceptance }}
3131
backend_all: ${{ steps.changes.outputs.backend_all }}
32+
frontend_all: ${{ steps.changes.outputs.frontend_all }}
3233
steps:
3334
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3435

@@ -92,6 +93,8 @@ jobs:
9293
# this is fine to not have for forks, it shouldn't fail
9394
SENTRY_WEBPACK_WEBHOOK_SECRET: ${{ secrets.SENTRY_WEBPACK_WEBHOOK_SECRET }}
9495
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
96+
# should set value either as `true` or `false`
97+
CODECOV_ENABLE_BA: ${{ needs.files-changed.outputs.frontend_all == 'true'}}
9598
run: |
9699
yarn build-acceptance
97100

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ repos:
3131
name: black
3232
entry: black
3333
language: system
34-
types: [python]
34+
types_or: [python, pyi]
3535
require_serial: true
3636
# Configuration for isort exists in pyproject.toml,
3737
# but we let pre-commit take care of the file filtering.

.prettierignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.devenv/bin/**/*
2+
**/*.min.js
13
**/tests/**/fixtures/**/*
2-
fixtures/**/*
4+
fixtures/profiles/embedded.js
5+
fixtures/artifact_bundle_debug_ids/**/*
6+
fixtures/artifact_bundle_duplicated_debug_ids/**/*
37
tests/relay_integration/**/*

devenv/sync.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ def main(context: dict[str, str]) -> int:
6969
repo = context["repo"]
7070
reporoot = context["reporoot"]
7171

72+
FRONTEND_ONLY = os.environ.get("SENTRY_DEVENV_FRONTEND_ONLY") is not None
73+
74+
# venv's still needed for frontend because repo-local devenv and pre-commit
75+
# exist inside it
7276
venv_dir, python_version, requirements, editable_paths, bins = venv.get(reporoot, repo)
7377
url, sha256 = config.get_python(reporoot, python_version)
7478
print(f"ensuring {repo} venv at {venv_dir}...")
@@ -113,6 +117,8 @@ def main(context: dict[str, str]) -> int:
113117
venv_dir,
114118
(
115119
("javascript dependencies", ("make", "install-js-dev")),
120+
# could opt out of syncing python if FRONTEND_ONLY but only if repo-local devenv
121+
# and pre-commit were moved to inside devenv and not the sentry venv
116122
("python dependencies", ("make", "install-py-dev")),
117123
),
118124
):
@@ -125,7 +131,7 @@ def main(context: dict[str, str]) -> int:
125131
(
126132
(
127133
"git and precommit",
128-
# this can't be done in paralell with python dependencies
134+
# this can't be done in parallel with python dependencies
129135
# as multiple pips cannot act on the same venv
130136
("make", "setup-git"),
131137
),
@@ -138,6 +144,12 @@ def main(context: dict[str, str]) -> int:
138144
):
139145
proc.run((f"{venv_dir}/bin/sentry", "init", "--dev"))
140146

147+
# Frontend engineers don't necessarily always have devservices running and
148+
# can configure to skip them to save on local resources
149+
if FRONTEND_ONLY:
150+
print("Skipping python migrations since SENTRY_DEVENV_FRONTEND_ONLY is set.")
151+
return 0
152+
141153
# TODO: check healthchecks for redis and postgres to short circuit this
142154
proc.run(
143155
(

fixtures/backup/model_dependencies/detailed.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3222,6 +3222,11 @@
32223222
"model": "sentry.organization",
32233223
"nullable": false
32243224
},
3225+
"owner_user_id": {
3226+
"kind": "HybridCloudForeignKey",
3227+
"model": "sentry.user",
3228+
"nullable": true
3229+
},
32253230
"project_id": {
32263231
"kind": "ImplicitForeignKey",
32273232
"model": "sentry.project",

fixtures/backup/model_dependencies/flat.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,8 @@
446446
"sentry.metricskeyindexer": [],
447447
"sentry.monitor": [
448448
"sentry.organization",
449-
"sentry.project"
449+
"sentry.project",
450+
"sentry.user"
450451
],
451452
"sentry.monitorcheckin": [
452453
"sentry.monitor",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from amqp.channel import Channel
22
from amqp.connection import Connection
33

4-
__all__ = ('Channel', 'Connection')
4+
__all__ = ("Channel", "Connection")

fixtures/stubs-for-mypy/brotli.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ MODE_TEXT = _Mode._MODE_TEXT
1212
MODE_FONT = _Mode._MODE_FONT
1313

1414
class Compressor: ...
15-
1615
class Decompressor: ...
1716

18-
def compress(string: bytes, mode: _Mode = ..., quality: int = ..., lgwin: int = ..., lgblock: int = ...) -> bytes: ...
19-
17+
def compress(
18+
string: bytes, mode: _Mode = ..., quality: int = ..., lgwin: int = ..., lgblock: int = ...
19+
) -> bytes: ...
2020
def decompress(string: bytes) -> bytes: ...
2121

2222
class error(Exception): ...

fixtures/stubs-for-mypy/csp/middleware.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@ from django.utils.deprecation import MiddlewareMixin
44

55
class CSPMiddleware(MiddlewareMixin):
66
def process_request(self, request: HttpRequest) -> None: ...
7-
def process_response(self, request: HttpRequest, response: HttpResponseBase) -> HttpResponseBase: ...
7+
def process_response(
8+
self, request: HttpRequest, response: HttpResponseBase
9+
) -> HttpResponseBase: ...
810
def build_policy(self, request: HttpRequest, response: HttpResponseBase) -> str: ...
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# TODO: can remove this after https://github.com/googleapis/python-crc32c/pull/211
2+
def value(bts: bytes, /) -> int: ...

fixtures/stubs-for-mypy/isodate/duration.pyi

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,17 @@ class Duration:
88
tdelta: datetime.timedelta
99

1010
def __init__(
11-
self,
12-
days: int,
13-
seconds: int,
14-
microseconds: int,
15-
milliseconds: int,
16-
minutes: int,
17-
hours: int,
18-
weeks: int,
19-
months: int | decimal.Decimal,
20-
years: int | decimal.Decimal,
21-
) -> None:
22-
...
23-
11+
self,
12+
days: int,
13+
seconds: int,
14+
microseconds: int,
15+
milliseconds: int,
16+
minutes: int,
17+
hours: int,
18+
weeks: int,
19+
months: int | decimal.Decimal,
20+
years: int | decimal.Decimal,
21+
) -> None: ...
2422
@overload
2523
def __add__(self, other: datetime.datetime) -> datetime.datetime: ...
2624
@overload
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from .widgets import Percentage as Percentage, Bar as Bar, ETA as ETA
2+
from .bar import ProgressBar as ProgressBar
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from typing import Sequence
2+
3+
from .widgets import WidgetBase
4+
5+
class ProgressBar:
6+
def __init__(
7+
self,
8+
widgets: Sequence[str | WidgetBase] = ...,
9+
max_value: int = ...,
10+
min_poll_interval: float = ...,
11+
) -> None: ...
12+
def start(self) -> None: ...
13+
def update(self, value: int) -> None: ...
14+
def finish(self) -> None: ...
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
class WidgetBase: ...
2+
class Percentage(WidgetBase): ...
3+
class Bar(WidgetBase): ...
4+
class ETA(WidgetBase): ...

fixtures/stubs-for-mypy/rapidjson.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from typing import Any
22

33
class JSONDecodeError(ValueError): ...
4+
45
def dumps(o: object) -> str: ...
56
def loads(s: str | bytes) -> Any: ...
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from .client import RedisCluster
22

3-
__all__ = ('RedisCluster',)
3+
__all__ = ("RedisCluster",)

migrations_lockfile.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ feedback: 0004_index_together
99
hybridcloud: 0016_add_control_cacheversion
1010
nodestore: 0002_nodestore_no_dictfield
1111
replays: 0004_index_together
12-
sentry: 0693_add_monitors_ownership_actor_id
12+
sentry: 0695_add_monitors_ownership_owner_user_id_team_id
1313
social_auth: 0002_default_auto_field

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
},
179179
"devDependencies": {
180180
"@biomejs/biome": "^1.6.0",
181-
"@codecov/webpack-plugin": "^0.0.1-beta.4",
181+
"@codecov/webpack-plugin": "^0.0.1-beta.6",
182182
"@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
183183
"@sentry/jest-environment": "^4.0.0",
184184
"@sentry/profiling-node": "^7.109.0",

pyproject.toml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,12 @@ module = [
9696
"google.cloud.*",
9797
"google.resumable_media.common.*",
9898
"google.rpc.status_pb2.*",
99-
"google_crc32c.*",
10099
"kombu.*",
101100
"mistune.*",
102101
"onelogin.saml2.auth.*",
103102
"onelogin.saml2.constants.*",
104103
"onelogin.saml2.idp_metadata_parser.*",
105104
"phabricator.*",
106-
"progressbar.*",
107105
"rb.*",
108106
"requests_oauthlib.*",
109107
"sqlparse.*",
@@ -538,22 +536,9 @@ module = [
538536
"sentry.web.frontend.shared_group_details",
539537
"sentry.web.frontend.twofactor",
540538
"sentry_plugins.bitbucket.client",
541-
"sentry_plugins.bitbucket.endpoints.webhook",
542539
"sentry_plugins.bitbucket.mixins",
543-
"sentry_plugins.client",
544-
"sentry_plugins.github.client",
545540
"sentry_plugins.github.plugin",
546-
"sentry_plugins.github.webhooks.base",
547-
"sentry_plugins.github.webhooks.integration",
548-
"sentry_plugins.heroku.plugin",
549-
"sentry_plugins.jira.client",
550541
"sentry_plugins.jira.plugin",
551-
"sentry_plugins.pivotal.plugin",
552-
"sentry_plugins.redmine.forms",
553-
"sentry_plugins.redmine.plugin",
554-
"sentry_plugins.splunk.plugin",
555-
"sentry_plugins.trello.plugin",
556-
"sentry_plugins.twilio.plugin",
557542
"tests.sentry.api.bases.test_organization",
558543
"tests.sentry.api.bases.test_project",
559544
"tests.sentry.api.bases.test_sentryapps",
@@ -620,7 +605,9 @@ module = [
620605
"sentry.relay.config.metric_extraction",
621606
"sentry.reprocessing2",
622607
"sentry.runner.*",
608+
"sentry.search.events.datasets.*",
623609
"sentry.snuba.metrics.extraction",
610+
"sentry.tasks.commit_context",
624611
"sentry.tasks.on_demand_metrics",
625612
"sentry.tasks.reprocessing2",
626613
"sentry.utils.iterators",

requirements-base.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ brotli>=1.0.9
8484
pyuwsgi==2.0.23
8585
zstandard>=0.18.0
8686
sentry-usage-accountant==0.0.10
87+
orjson>=3.10.0
8788

8889
msgpack>=1.0.7
8990
cryptography>=38.0.3

requirements-dev-frozen.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ openai==1.3.5
108108
openapi-core==0.18.2
109109
openapi-schema-validator==0.6.2
110110
openapi-spec-validator==0.7.1
111+
orjson==3.10.0
111112
outcome==1.2.0
112113
packaging==21.3
113114
parse==1.19.0

requirements-frozen.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ mmh3==4.0.0
7676
msgpack==1.0.7
7777
oauthlib==3.1.0
7878
openai==1.3.5
79+
orjson==3.10.0
7980
packaging==21.3
8081
parsimonious==0.10.0
8182
petname==2.6

src/sentry/api/endpoints/organization_events.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
Referrer.API_STARFISH_MOBILE_STARTUP_SPAN_TABLE.value,
9191
Referrer.API_STARFISH_MOBILE_STARTUP_LOADED_LIBRARIES.value,
9292
Referrer.API_STARFISH_MOBILE_STARTUP_TOTALS.value,
93-
Referrer.API_TRACE_EXPLORER_TABLE.value,
9493
}
9594

9695
API_TOKEN_REFERRER = Referrer.API_AUTH_TOKEN_EVENTS.value

0 commit comments

Comments
 (0)