Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
a1a8171
remove metrics from valid anomaly detection types
mifu67 Sep 11, 2024
df7d911
lol this is silly
mifu67 Sep 11, 2024
cbbe0f1
Merge branch 'master' into mifu67/anomaly-detection-bugs-2
mifu67 Sep 11, 2024
b42cd9d
fix(uptime): KeyError: "Attempt to overwrite 'name' in LogRecord" (#7…
evanpurkhiser Sep 11, 2024
fc871f5
fix(uptime): Correct comment of url_domain_suffix (#77346)
evanpurkhiser Sep 11, 2024
409d2a4
ref(uptime): Add missing annotation on resolve_rdap_network_details (…
evanpurkhiser Sep 11, 2024
626c713
chore(flags): add feature flag to temporary.py (#77299)
michellewzhang Sep 11, 2024
2dec161
chore(users): cleaning up them users shims (#77283)
Christinarlong Sep 11, 2024
9391ea2
feat(workflow_engine): Add Detector model (#77298)
wedamija Sep 11, 2024
1b7417e
feat(insights): allow querying for user.geo.subregion in metrics (#77…
DominikB2014 Sep 11, 2024
fae3504
fix(issue-details): Correct graphs on streamlined view (#77357)
leeandher Sep 11, 2024
f7b09aa
feat(whats-new): add method to RpcOrganization to retrieve aggregate …
shellmayr Sep 12, 2024
5ffc03d
fix(eap): decode bytes object in test_extrapolation_smoke to prevent …
shellmayr Sep 12, 2024
54c9dbe
feat(onboarding): remove 'take me to...' buttons (#77377)
obostjancic Sep 12, 2024
a2bad14
fix(onboarding): Fix typo in analytic event (#77380)
priscilawebdev Sep 12, 2024
5cc2669
chore: bump po-catalog-loader to 2.1.0 (#77382)
oioki Sep 12, 2024
b9853d6
ref(onboarding): Introduce 'onOptionalToggleClick' prop to gettingSta…
priscilawebdev Sep 12, 2024
c9b86b6
ref(onboarding): Expose project keys id (#77378)
priscilawebdev Sep 12, 2024
43eb468
chore: Add referrer for backfill (#77373)
shruthilayaj Sep 12, 2024
7ce5a8a
fix(dashboards): Adjust decimal points for percentage on dashboard li…
nikkikapadia Sep 12, 2024
84a9682
fix(trace-view): Fix continuous profile url (#77362)
Zylphrex Sep 12, 2024
7685bd3
fix(dashboards): Use custom cell renderer in `DiscoverTable` (#77393)
gggritso Sep 12, 2024
d2700d9
fix(flags): Wrap flags in an object (#77390)
cmanallen Sep 12, 2024
398292b
feat(insights): update webvitals query filter to permit cls spans (#7…
edwardgou-sentry Sep 12, 2024
027a219
feat(dashboards): Add split task for dashboards (#77368)
shruthilayaj Sep 12, 2024
ed1fc16
fix(explore): No event id on EAP (#77398)
Zylphrex Sep 12, 2024
3a8b60b
fix(replay): CLS score is not in ms (#77397)
c298lee Sep 12, 2024
098dbcb
feat(custom-views): Implement "Add View" flow to custom views (#77127)
MichaelSun48 Sep 12, 2024
e3a7e0e
fix(alerts): Fix KeyError on AlertRuleThresholdType (#77360)
ceorourke Sep 12, 2024
fa22813
feat(custom-views): Add tabs to a menu when they overflow (#77317)
malwilley Sep 12, 2024
633822b
feat(query-builder): Add wildcard matching text to value menu footer …
malwilley Sep 12, 2024
a2ad47c
fix(alerts): Fix dataset label for performance metric alerts (#77366)
ceorourke Sep 12, 2024
d1dfe46
feat(query-builder): Increase area between trigger and overlay (#77371)
malwilley Sep 12, 2024
a0f9466
fix(dashboards): make card headings bold (#77408)
harshithadurai Sep 12, 2024
0a95114
Alerts Create Issues: Workflow Actions (#77361)
saponifi3d Sep 12, 2024
8cc36d9
chore(sentry-apps): add instrumentation for sentry-app-components end…
cathteng Sep 12, 2024
e9a6a56
ref: upgrade djangorestframework-stubs (#77392)
asottile-sentry Sep 12, 2024
288275d
ref(crons): Simplify MonitorBucketData type (#77255)
Sep 12, 2024
2e1ce6e
fix(uptime): Fix downtime duration calculation from activity (#77048)
Sep 12, 2024
13ea193
fix(insights): Fixes alerts serializer failing for some insights func…
edwardgou-sentry Sep 12, 2024
db60a15
chore(dashboards): Reduce `AutoSizedText` iteration limit (#77401)
gggritso Sep 12, 2024
faf0d74
feat(explore-chart): Making chart display type, specific to each char…
Abdkhan14 Sep 12, 2024
4159ea2
chore(issues): Remove feedback button from highlights (#77414)
mrduncan Sep 12, 2024
5787aaa
feat(rr6): Parameter redirect to path (#77419)
evanpurkhiser Sep 12, 2024
99d6fd0
feat(query-builder): Add unsubmitted search indicator (#77411)
malwilley Sep 12, 2024
5659497
feat(spans): add span_id field (#77416)
wmak Sep 12, 2024
e7bd490
fix(spans): Convert sampling weight to uint64 (#77417)
wmak Sep 12, 2024
ec3971b
ref(js): Remove new legacy react-router import (#77421)
evanpurkhiser Sep 12, 2024
6469b74
chore: Remove spans used to debug ratelimit overhead (#77395)
markstory Sep 12, 2024
d31aa06
fix(alerts): Checks the alert rule to ensure it is not an insights al…
edwardgou-sentry Sep 12, 2024
d4ee71b
feat(alerts):Moves Insight Metric alert option into the Performance c…
edwardgou-sentry Sep 12, 2024
97da434
feat(uptime): Better names for uptme rdap columns (#77424)
evanpurkhiser Sep 12, 2024
7e4c49e
ref(uptime): Remove old whois columns (state) (#77427)
evanpurkhiser Sep 12, 2024
ed00edb
fix(rr6): Correct onboarding route specificity (#77418)
evanpurkhiser Sep 12, 2024
c9ab72e
fix(integrations): restore `code` for sentryapp installation webhooks…
oioki Sep 12, 2024
c3675ca
ref(py): Make withs in test_results_consumers easier to read (#77433)
evanpurkhiser Sep 12, 2024
beefd6f
Update alerts.html (#77415)
elijames-codecov Sep 12, 2024
968d3a2
fix(insights): Queries module page filters did not include `span.syst…
0Calories Sep 12, 2024
e84b6f9
feat(issues): Add lil icons to error event level (#77117)
scttcper Sep 12, 2024
6fa1b32
chore(sentry-apps): log timed out url (#77440)
cathteng Sep 12, 2024
f576bfd
fix(custom-views): Fixes page filters getting reset when naving to is…
MichaelSun48 Sep 12, 2024
4f9f85d
feat(issues): Scroll to current transaction in trace preview (#77262)
scttcper Sep 12, 2024
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
51 changes: 51 additions & 0 deletions fixtures/backup/model_dependencies/detailed.json
Original file line number Diff line number Diff line change
Expand Up @@ -6218,6 +6218,39 @@
"table_name": "workflow_engine_datasource",
"uniques": []
},
"workflow_engine.detector": {
"dangling": false,
"foreign_keys": {
"organization": {
"kind": "FlexibleForeignKey",
"model": "sentry.organization",
"nullable": false
},
"owner_team": {
"kind": "FlexibleForeignKey",
"model": "sentry.team",
"nullable": true
},
"owner_user_id": {
"kind": "HybridCloudForeignKey",
"model": "sentry.user",
"nullable": true
}
},
"model": "workflow_engine.detector",
"relocation_dependencies": [],
"relocation_scope": "Organization",
"silos": [
"Region"
],
"table_name": "workflow_engine_detector",
"uniques": [
[
"name",
"organization"
]
]
},
"workflow_engine.workflow": {
"dangling": false,
"foreign_keys": {
Expand All @@ -6240,5 +6273,23 @@
"organization"
]
]
},
"workflow_engine.workflowaction": {
"dangling": false,
"foreign_keys": {
"workflow": {
"kind": "FlexibleForeignKey",
"model": "workflow_engine.workflow",
"nullable": false
}
},
"model": "workflow_engine.workflowaction",
"relocation_dependencies": [],
"relocation_scope": "Organization",
"silos": [
"Region"
],
"table_name": "workflow_engine_workflowaction",
"uniques": []
}
}
8 changes: 8 additions & 0 deletions fixtures/backup/model_dependencies/flat.json
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,15 @@
"workflow_engine.datasource": [
"sentry.organization"
],
"workflow_engine.detector": [
"sentry.organization",
"sentry.team",
"sentry.user"
],
"workflow_engine.workflow": [
"sentry.organization"
],
"workflow_engine.workflowaction": [
"workflow_engine.workflow"
]
}
2 changes: 2 additions & 0 deletions fixtures/backup/model_dependencies/sorted.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@
"social_auth.usersocialauth",
"uptime.uptimesubscription",
"workflow_engine.datasource",
"workflow_engine.detector",
"workflow_engine.workflow",
"workflow_engine.workflowaction",
"sentry.savedsearch",
"sentry.relocation",
"sentry.recentsearch",
Expand Down
2 changes: 2 additions & 0 deletions fixtures/backup/model_dependencies/truncate.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@
"social_auth_usersocialauth",
"uptime_uptimesubscription",
"workflow_engine_datasource",
"workflow_engine_detector",
"workflow_engine_workflow",
"workflow_engine_workflowaction",
"sentry_savedsearch",
"sentry_relocation",
"sentry_recentsearch",
Expand Down
4 changes: 2 additions & 2 deletions migrations_lockfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ remote_subscriptions: 0003_drop_remote_subscription
replays: 0004_index_together
sentry: 0759_remove_spanattributeextraction_tables
social_auth: 0002_default_auto_field
uptime: 0008_uptime_url_suffix
workflow_engine: 0002_data_source
uptime: 0010_remove_uptime_whois_columns_state
workflow_engine: 0004_workflowactions
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
"pegjs": "^0.10.0",
"pegjs-loader": "^0.5.8",
"platformicons": "^6.0.1",
"po-catalog-loader": "2.0.0",
"po-catalog-loader": "2.1.0",
"prettier": "3.3.2",
"prismjs": "^1.29.0",
"process": "^0.11.10",
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev-frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ sentry-arroyo==2.16.5
sentry-cli==2.16.0
sentry-devenv==1.10.0
sentry-forked-django-stubs==5.0.4.post2
sentry-forked-djangorestframework-stubs==3.15.0.post1
sentry-forked-djangorestframework-stubs==3.15.1.post1
sentry-kafka-schemas==0.1.106
sentry-ophio==0.2.7
sentry-protos==0.1.19
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ packaging>=21.3

# for type checking
sentry-forked-django-stubs>=5.0.4.post2
sentry-forked-djangorestframework-stubs>=3.15.0.post1
sentry-forked-djangorestframework-stubs>=3.15.1.post1
lxml-stubs
msgpack-types>=0.2.0
mypy>=1.11.2
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/bases/user.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

from django.contrib.auth.models import AnonymousUser
from rest_framework.permissions import BasePermission
from rest_framework.request import Request
from typing_extensions import override
Expand Down Expand Up @@ -136,7 +137,7 @@ def convert_args(self, request: Request, user_id: str | None = None, *args, **kw
user: RpcUser | User | None = None

if user_id == "me":
if not request.user.is_authenticated:
if isinstance(request.user, AnonymousUser) or not request.user.is_authenticated:
raise ResourceDoesNotExist
user = request.user
elif user_id is not None:
Expand Down
7 changes: 5 additions & 2 deletions src/sentry/api/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ def is_considered_sudo(request: Request) -> bool:
or is_api_key_auth(request.auth)
or is_api_token_auth(request.auth)
or is_org_auth_token_auth(request.auth)
or request.user.is_authenticated
and not request.user.has_usable_password()
or (
request.user.is_authenticated
and not isinstance(request.user, AnonymousUser)
and not request.user.has_usable_password()
)
)


Expand Down
2 changes: 1 addition & 1 deletion src/sentry/api/endpoints/auth_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def post(self, request: Request) -> Response:

curl -X ###METHOD### -u username:password ###URL###
"""
if not request.user.is_authenticated:
if isinstance(request.user, AnonymousUser) or not request.user.is_authenticated:
return Response(status=status.HTTP_400_BAD_REQUEST)

# If 2fa login is enabled then we cannot sign in with username and
Expand Down
35 changes: 21 additions & 14 deletions src/sentry/api/endpoints/integrations/sentry_apps/components.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sentry_sdk
from rest_framework.request import Request
from rest_framework.response import Response

Expand Down Expand Up @@ -54,23 +55,29 @@ def get(
components = []
errors = []

for install in SentryAppInstallation.objects.get_installed_for_organization(
organization.id
).order_by("pk"):
_components = SentryAppComponent.objects.filter(
sentry_app_id=install.sentry_app_id
).order_by("pk")
with sentry_sdk.start_transaction(name="sentry.api.sentry_app_components.get"):
with sentry_sdk.start_span(op="sentry-app-components.get_installs"):
installs = SentryAppInstallation.objects.get_installed_for_organization(
organization.id
).order_by("pk")

if "filter" in request.GET:
_components = _components.filter(type=request.GET["filter"])
for install in installs:
with sentry_sdk.start_span(op="sentry-app-components.filter_components"):
_components = SentryAppComponent.objects.filter(
sentry_app_id=install.sentry_app_id
).order_by("pk")

for component in _components:
try:
SentryAppComponentPreparer(component=component, install=install).run()
except APIError:
errors.append(str(component.uuid))
if "filter" in request.GET:
_components = _components.filter(type=request.GET["filter"])

components.append(component)
for component in _components:
with sentry_sdk.start_span(op="sentry-app-components.prepare_components"):
try:
SentryAppComponentPreparer(component=component, install=install).run()
except APIError:
errors.append(str(component.uuid))

components.append(component)

return self.paginate(
request=request,
Expand Down
1 change: 0 additions & 1 deletion src/sentry/api/serializers/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,5 @@
from .servicehook import * # noqa: F401,F403
from .tagvalue import * # noqa: F401,F403
from .team import * # noqa: F401,F403
from .user import * # noqa: F401,F403
from .user_social_auth import * # noqa: F401,F403
from .userreport import * # noqa: F401,F403
4 changes: 3 additions & 1 deletion src/sentry/api/serializers/models/sentry_app_installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ def serialize(self, obj, attrs, user, **kwargs):
"status": SentryAppInstallationStatus.as_str(obj.status),
}

if obj.api_grant and access and access.has_scope("org:integrations"):
is_webhook = "is_webhook" in kwargs and kwargs["is_webhook"]

if obj.api_grant and ((access and access.has_scope("org:integrations")) or is_webhook):
data["code"] = obj.api_grant.code

return data
3 changes: 0 additions & 3 deletions src/sentry/api/serializers/models/user.py

This file was deleted.

2 changes: 2 additions & 0 deletions src/sentry/backup/comparators.py
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,9 @@ def get_default_comparators() -> dict[str, list[JSONScrubbingComparator]]:
"sentry.userrole": [DateUpdatedComparator("date_updated")],
"sentry.userroleuser": [DateUpdatedComparator("date_updated")],
"workflow_engine.datasource": [DateUpdatedComparator("date_updated", "date_added")],
"workflow_engine.detector": [DateUpdatedComparator("date_updated", "date_added")],
"workflow_engine.workflow": [DateUpdatedComparator("date_updated", "date_added")],
"workflow_engine.workflowaction": [DateUpdatedComparator("date_updated", "date_added")],
},
)

Expand Down
Loading