Skip to content

Commit 4028c31

Browse files
committed
Merge branch 'master' into feat/ui-debug-sources
* master: chore: Fix typo errywhere -> everywhere (#13934) ref: (Django 1.9) Bump djangorestframework to 3.0.5 as an intermediate step to get to 3.3.x feat(issueless events): Test eventstream work without groups (#13888) ref: Improve repr of User (#13896) feat(loader): Make the default for new js projects v5 of js sdk (#13327) build: Remove browser-reload flag (#13918) ref(ui): Consolidate server frontend hydration logic (#13868) ref: Refactor user reports to not use Postgres Event (#13904) Test/integration acceptance tests (#13895) feat: Remove ts-jest (#13846) obs(sentry_apps): Add a small metrics increment on processing resource changes. (#13897) enable testing for all orgs (#13903) ref: Update Python SDK to 0.10.0 (#13911) fix: Do not suggest Sentry.Extensions.Logging when ASP.NET Core is used (#13891) Update license year to 2019 ci(travis): Move docker-sentry builds to Dockes Hub autobuild (#13901) ref(app-platform): Add integration features to SentryAppDetailsModal (#13393) chore(ui) Rename OrganizationStream to IssueList (#13892)
2 parents ebbf2be + 1ef229a commit 4028c31

File tree

173 files changed

+1570
-1518
lines changed

Some content is hidden

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

173 files changed

+1570
-1518
lines changed

.travis.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -65,25 +65,8 @@ after_script:
6565
# Trigger a build for the `git` image on docker-sentry
6666
- >
6767
if [ "$TRAVIS_PULL_REQUEST" == "false" -a "$TRAVIS_BRANCH" == "master" ]; then
68-
curl -s -X POST
69-
-H "Content-Type: application/json"
70-
-H "Accept: application/json"
71-
-H "Travis-API-Version: 3"
72-
-H "Authorization: token $TRAVIS_TOKEN"
73-
-d '{
74-
"request": {
75-
"branch": "master",
76-
"config": {
77-
"env": {
78-
"matrix": [
79-
"VERSION=git"
80-
]
81-
}
82-
},
83-
"message": "Build for getsentry/sentry@'"$TRAVIS_COMMIT"'"
84-
}
85-
}'
86-
https://api.travis-ci.org/repo/getsentry%2Fdocker-sentry/requests
68+
curl -s -X POST "$DOCKER_SENTRY_BUILD_TRIGGER_URL";
69+
fi
8770
8871
base_postgres: &postgres_default
8972
python: 2.7
@@ -137,6 +120,7 @@ matrix:
137120
name: 'Linter'
138121
env: TEST_SUITE=lint
139122
install:
123+
- python setup.py install_egg_info
140124
- SENTRY_LIGHT_BUILD=1 pip install -U -e ".[dev,tests,optional]"
141125
- find "$NODE_DIR" -type d -empty -delete
142126
- nvm install

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2018 Sentry (https://sentry.io) and individual contributors.
1+
Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*eslint-env node*/
22
module.exports = {
3-
presets: ['@babel/react', '@babel/env'],
3+
presets: ['@babel/react', '@babel/env', '@babel/preset-typescript'],
44
plugins: [
55
'emotion',
66
'lodash',

jest.config.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,8 @@ module.exports = {
2929
],
3030
transform: {
3131
'^.+\\.jsx?$': 'babel-jest',
32-
'^.+\\.tsx?$': 'ts-jest',
32+
'^.+\\.tsx?$': 'babel-jest',
3333
},
3434
moduleFileExtensions: ['js', 'ts', 'jsx', 'tsx'],
35-
globals: {
36-
'ts-jest': {
37-
tsConfig: './tsconfig.json',
38-
diagnostics: false,
39-
},
40-
},
35+
globals: {},
4136
};

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@babel/polyfill": "^7.0.0",
1717
"@babel/preset-env": "^7.0.0",
1818
"@babel/preset-react": "^7.0.0",
19+
"@babel/preset-typescript": "^7.3.3",
1920
"@babel/runtime": "^7.0.0",
2021
"@sentry/browser": "^5.4.2",
2122
"@sentry/integrations": "^5.4.2",
@@ -131,7 +132,6 @@
131132
"stylelint-config-recommended": "^2.1.0",
132133
"stylelint-config-styled-components": "^0.1.1",
133134
"stylelint-processor-styled-components": "^1.3.0",
134-
"ts-jest": "^24.0.2",
135135
"tsconfig-paths-webpack-plugin": "^3.2.0",
136136
"webpack-dev-server": "^3.1.10"
137137
},
@@ -148,7 +148,7 @@
148148
"test-staged": "yarn test --findRelatedTests $(git diff --name-only --cached)",
149149
"lint": "node_modules/.bin/eslint tests/js src/sentry/static/sentry/app --ext .js,.jsx,.ts,.tsx",
150150
"lint:css": "stylelint 'src/sentry/static/sentry/app/**/*.jsx'",
151-
"dev": "(yarn check --verify-tree || yarn install --check-files) && sentry devserver --browser-reload",
151+
"dev": "(yarn check --verify-tree || yarn install --check-files) && sentry devserver",
152152
"dev-server": "webpack-dev-server",
153153
"storybook": "start-storybook -p 9001 -c .storybook",
154154
"storybook-build": "build-storybook -c .storybook -o .storybook-out && sed -i -e 's/\\/sb_dll/sb_dll/g' .storybook-out/index.html",

requirements-base.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ django-jsonfield>=0.9.13,<0.9.14
1212
django-picklefield>=0.3.0,<1.1.0
1313
django-sudo>=2.1.0,<3.0.0
1414
Django>=1.8,<1.9
15-
djangorestframework>=2.4.8,<2.5.0
15+
djangorestframework==3.0.5
1616
email-reply-parser>=0.2.0,<0.3.0
1717
enum34>=1.1.6,<1.2.0
1818
exam>=0.5.1
@@ -56,7 +56,7 @@ requests-oauthlib==0.3.3
5656
requests[security]>=2.20.0,<2.21.0
5757
selenium==3.141.0
5858
semaphore>=0.4.38,<0.5.0
59-
sentry-sdk>=0.9.0
59+
sentry-sdk>=0.10.0
6060
setproctitle>=1.1.7,<1.2.0
6161
simplejson>=3.2.0,<3.9.0
6262
six>=1.10.0,<1.11.0

src/sentry/api/bases/avatar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def put(self, request, **kwargs):
5959
if not serializer.is_valid():
6060
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
6161

62-
result = serializer.object
62+
result = serializer.validated_data
6363

6464
self.model.save_avatar(
6565
relation={self.object_type: obj},

src/sentry/api/bases/discoversavedquery.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,19 @@ class DiscoverSavedQuerySerializer(serializers.Serializer):
1010
projects = ListField(
1111
child=serializers.IntegerField(),
1212
required=False,
13-
allow_null=True,
1413
default=[]
1514
)
16-
start = serializers.DateTimeField(required=False)
17-
end = serializers.DateTimeField(required=False)
18-
range = serializers.CharField(required=False, allow_none=True)
15+
start = serializers.DateTimeField(required=False, allow_null=True)
16+
end = serializers.DateTimeField(required=False, allow_null=True)
17+
range = serializers.CharField(required=False, allow_null=True)
1918
fields = ListField(
2019
child=serializers.CharField(),
2120
required=False,
2221
allow_null=True,
2322
)
24-
limit = serializers.IntegerField(min_value=0, max_value=1000, required=False)
25-
rollup = serializers.IntegerField(required=False)
26-
orderby = serializers.CharField(required=False)
23+
limit = serializers.IntegerField(min_value=0, max_value=1000, required=False, allow_null=True)
24+
rollup = serializers.IntegerField(required=False, allow_null=True)
25+
orderby = serializers.CharField(required=False, allow_null=True)
2726
conditions = ListField(
2827
child=ListField(),
2928
required=False,
@@ -32,7 +31,6 @@ class DiscoverSavedQuerySerializer(serializers.Serializer):
3231
aggregations = ListField(
3332
child=ListField(),
3433
required=False,
35-
allow_null=True,
3634
default=[]
3735
)
3836
groupby = ListField(
@@ -41,9 +39,8 @@ class DiscoverSavedQuerySerializer(serializers.Serializer):
4139
allow_null=True,
4240
)
4341

44-
def validate_projects(self, attrs, source):
42+
def validate_projects(self, projects):
4543
organization = self.context['organization']
46-
projects = attrs[source]
4744

4845
org_projects = set(Project.objects.filter(
4946
organization=organization,
@@ -54,7 +51,7 @@ def validate_projects(self, attrs, source):
5451
if set(projects) != org_projects:
5552
raise PermissionDenied
5653

57-
return attrs
54+
return projects
5855

5956
def validate(self, data):
6057
query = {}

src/sentry/api/bases/project.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ def convert_args(self, request, organization_slug, project_slug, *args, **kwargs
152152
def handle_exception(self, request, exc):
153153
if isinstance(exc, ProjectMoved):
154154
response = Response({
155-
'slug': exc.detail['extra']['slug'],
156-
'detail': exc.detail
155+
'slug': exc.detail['detail']['extra']['slug'],
156+
'detail': exc.detail['detail']
157157
}, status=exc.status_code)
158-
response['Location'] = exc.detail['extra']['url']
158+
response['Location'] = exc.detail['detail']['extra']['url']
159159
return response
160160
return super(ProjectEndpoint, self).handle_exception(request, exc)

src/sentry/api/bases/sentryapps.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,10 @@ def has_object_permission(self, request, view, sentry_app):
131131
if is_active_superuser(request):
132132
return True
133133

134-
# User must be in the Org who owns the app.
135-
if sentry_app.owner not in request.user.get_orgs():
136-
raise Http404
134+
# if app is unpublished, user must be in the Org who owns the app.
135+
if not sentry_app.is_published:
136+
if sentry_app.owner not in request.user.get_orgs():
137+
raise Http404
137138

138139
return ensure_scoped_permission(
139140
request,

0 commit comments

Comments
 (0)