Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 9.1.2 #13902

Merged
merged 29 commits into from
Jul 22, 2019
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
db41bf8
fix field name to match serializer (#12532)
Apr 5, 2019
0c85531
ref(releases): Refactored Releases Serializers (#12535)
lauryndbrown Apr 15, 2019
46bbe21
fix(js): Fix cleanup API client (#12872)
billyvg Apr 23, 2019
fcaadcb
fix(sidebar): Fix using wrong pathname (#12870)
billyvg Apr 23, 2019
15bf6bd
fix(slack): Use event message /type when available (#12881)
evanpurkhiser Apr 23, 2019
6146169
fix(jira) Don't 500 when oauth tokens are revoked (#12886)
markstory Apr 23, 2019
a9cb023
fix(api): Fix bug where serialization fails for a pull request that i…
wedamija Apr 23, 2019
0f6675a
fix(jira) Don't 500 when request token requests timeout (#12884)
markstory Apr 23, 2019
b604a2d
fix(ui) Fix zindex woes in hovercards. (#12887)
markstory Apr 24, 2019
3626966
chore: Bump moment-timezone (#12966)
markstory Apr 29, 2019
3cd4d5c
Updated Slack integration logo (#13174)
Roach May 13, 2019
e9570f0
ref(slack): Implement bot app switch (#13184)
evanpurkhiser May 20, 2019
ae5eb03
fix(slack): use oauth.token over oauth.access for legacy WST app
evanpurkhiser May 21, 2019
c8d139d
fix(api) Update serializer max length to match database (#13499)
markstory Jun 3, 2019
ceffe91
feat(upgrade): Default to superuser for first user (#13706)
BYK Jun 17, 2019
c762e3a
fix(installWizard): Fix client default values not set (#13726)
BYK Jun 18, 2019
7822ea3
ref(slack): Remove message title limit (#13687)
Jun 19, 2019
00dc2d3
test(installWizard): Remove obsolete test case and rename the remaini…
BYK Jun 19, 2019
b5b4b90
fix(packaging): Include all of `src/sentry` (#13743)
BYK Jun 20, 2019
ba0d389
fix issue 13968: silent cleanup honors is_filtered (#13969)
ganzevoort Jul 11, 2019
daa5ccb
fix: Fix a bunch of null references (#12637)
untitaker Apr 4, 2019
896d4c3
fix(unreal): Extract better portable callstacks (#12812)
jan-auer Apr 17, 2019
ca155ea
fix(assemble): Avoid increasing backlogs in assemble (#12923)
jan-auer Apr 24, 2019
0a9d43d
fix(assemble): Update outdated test, change status (#12928)
jan-auer Apr 24, 2019
08ac2c6
fix: Renormalize once (#12991)
untitaker Apr 30, 2019
d44a6d7
fix: Renormalize snuba events (#13329)
jan-auer May 22, 2019
fff8344
fix: Docs not built in fresh bdist_wheel (#12220)
atcase Jul 16, 2019
de95702
build: Switch to psycopg2-binary
mattrobenolt Apr 10, 2019
693c8f0
9.1.2
BYK Jul 22, 2019
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
10 changes: 2 additions & 8 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
include setup.py src/sentry/assets.json README.rst MANIFEST.in LICENSE AUTHORS
include src/sentry/loader/_registry.json
include setup.py README.rst MANIFEST.in LICENSE AUTHORS
recursive-include ./ requirements*.txt
recursive-include src/sentry/templates *
recursive-include src/sentry/locale *
recursive-include src/sentry/data *
recursive-include src/sentry/static/sentry *
recursive-include src/sentry/scripts *.lua
recursive-include src/sentry/integration-docs *.json
graft src/sentry
global-exclude *~
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"mobx": "^3.2.2",
"mobx-react": "^4.2.2",
"moment": "2.23.0",
"moment-timezone": "0.5.23",
"moment-timezone": "0.5.25",
"node-libs-browser": "0.5.3",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"papaparse": "^4.6.0",
Expand Down
2 changes: 1 addition & 1 deletion requirements-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ percy>=1.1.2
petname>=2.0,<2.1
Pillow>=3.2.0,<=4.2.1
progressbar2>=3.10,<3.11
psycopg2>=2.6.0,<2.8.0
psycopg2-binary>=2.6.0,<2.8.0
PyJWT>=1.5.0,<1.6.0
pytest-django>=2.9.1,<2.10.0
pytest-html>=1.9.0,<1.10.0
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,20 @@ class SentrySDistCommand(SDistCommand):

class SentryBuildCommand(BuildCommand):
def run(self):
BuildCommand.run(self)
if not IS_LIGHT_BUILD:
self.run_command('build_integration_docs')
self.run_command('build_assets')
self.run_command('build_js_sdk_registry')
BuildCommand.run(self)


class SentryDevelopCommand(DevelopCommand):
def run(self):
DevelopCommand.run(self)
if not IS_LIGHT_BUILD:
self.run_command('build_integration_docs')
self.run_command('build_assets')
self.run_command('build_js_sdk_registry')
DevelopCommand.run(self)


cmdclass = {
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/api/endpoints/broadcast_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def post(self, request):
message=result['message'],
link=result['link'],
is_active=result.get('isActive') or False,
date_expires=result.get('expiresAt'),
date_expires=result.get('dateExpires'),
)
logger.info('broadcasts.create', extra={
'ip_address': request.META['REMOTE_ADDR'],
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/api/endpoints/debug_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def post(self, request, project):

# We don't have a state yet, this means we can now start
# an assemble job in the background.
set_assemble_status(project, checksum, state)
set_assemble_status(project, checksum, ChunkFileState.CREATED)
assemble_dif.apply_async(
kwargs={
'project_id': project.id,
Expand Down
21 changes: 6 additions & 15 deletions src/sentry/api/endpoints/organization_release_details.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
from __future__ import absolute_import

from rest_framework import serializers
from rest_framework.response import Response

from sentry.api.base import DocSection
from sentry.api.bases.organization import OrganizationReleasesBaseEndpoint
from sentry.api.exceptions import InvalidRepository, ResourceDoesNotExist
from sentry.api.serializers import serialize
from sentry.api.serializers.rest_framework import (
CommitSerializer,
ListField,
ReleaseHeadCommitSerializerDeprecated,
ReleaseHeadCommitSerializer,
)
from sentry.api.serializers.rest_framework import ListField, ReleaseSerializer, ReleaseHeadCommitSerializer, ReleaseHeadCommitSerializerDeprecated
from sentry.models import Activity, Group, Release, ReleaseFile
from sentry.utils.apidocs import scenario, attach_scenarios
from sentry.constants import VERSION_LENGTH

ERR_RELEASE_REFERENCED = "This release is referenced by active issues and cannot be removed."

Expand All @@ -41,13 +34,11 @@ def update_organization_release_scenario(runner):
)


class ReleaseSerializer(serializers.Serializer):
ref = serializers.CharField(max_length=VERSION_LENGTH, required=False)
url = serializers.URLField(required=False)
dateReleased = serializers.DateTimeField(required=False)
commits = ListField(child=CommitSerializer(), required=False, allow_null=False)
class OrganizationReleaseSerializer(ReleaseSerializer):
headCommits = ListField(
child=ReleaseHeadCommitSerializerDeprecated(), required=False, allow_null=False
child=ReleaseHeadCommitSerializerDeprecated(),
required=False,
allow_null=False
)
refs = ListField(
child=ReleaseHeadCommitSerializer(),
Expand Down Expand Up @@ -129,7 +120,7 @@ def put(self, request, organization, version):
if not self.has_release_permission(request, organization, release):
raise ResourceDoesNotExist

serializer = ReleaseSerializer(data=request.DATA)
serializer = OrganizationReleaseSerializer(data=request.DATA)

if not serializer.is_valid():
return Response(serializer.errors, status=400)
Expand Down
7 changes: 3 additions & 4 deletions src/sentry/api/endpoints/organization_releases.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
from rest_framework.response import Response

from sentry.api.bases import NoProjects, OrganizationEventsError
from .project_releases import ReleaseSerializer
from sentry.api.base import DocSection, EnvironmentMixin
from sentry.api.bases.organization import OrganizationReleasesBaseEndpoint
from sentry.api.exceptions import InvalidRepository
from sentry.api.paginator import OffsetPaginator
from sentry.api.serializers import serialize
from sentry.api.serializers.rest_framework import (
ReleaseHeadCommitSerializer, ReleaseHeadCommitSerializerDeprecated, ListField
ReleaseHeadCommitSerializer, ReleaseHeadCommitSerializerDeprecated, ReleaseWithVersionSerializer, ListField
)
from sentry.models import Activity, Release
from sentry.signals import release_created
Expand Down Expand Up @@ -64,12 +63,12 @@ def list_org_releases_scenario(runner):
runner.request(method='GET', path='/organizations/%s/releases/' % (runner.org.slug, ))


class ReleaseSerializerWithProjects(ReleaseSerializer):
class ReleaseSerializerWithProjects(ReleaseWithVersionSerializer):
projects = ListField()
headCommits = ListField(
child=ReleaseHeadCommitSerializerDeprecated(),
required=False,
allow_null=False,
allow_null=False
)
refs = ListField(
child=ReleaseHeadCommitSerializer(),
Expand Down
13 changes: 3 additions & 10 deletions src/sentry/api/endpoints/project_release_details.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
from __future__ import absolute_import

from rest_framework import serializers
from rest_framework.response import Response

from sentry.api.bases.project import ProjectEndpoint, ProjectReleasePermission
from sentry.api.exceptions import ResourceDoesNotExist
from sentry.api.serializers import serialize
from sentry.api.serializers.rest_framework import CommitSerializer, ListField
from sentry.api.serializers.rest_framework import ReleaseSerializer

from sentry.models import Activity, Group, Release, ReleaseFile
from sentry.plugins.interfaces.releasehook import ReleaseHook
from sentry.constants import VERSION_LENGTH

ERR_RELEASE_REFERENCED = "This release is referenced by active issues and cannot be removed."


class ReleaseSerializer(serializers.Serializer):
ref = serializers.CharField(max_length=VERSION_LENGTH, required=False)
url = serializers.URLField(required=False)
dateReleased = serializers.DateTimeField(required=False)
commits = ListField(child=CommitSerializer(), required=False, allow_null=False)
ERR_RELEASE_REFERENCED = "This release is referenced by active issues and cannot be removed."


class ProjectReleaseDetailsEndpoint(ProjectEndpoint):
Expand Down
46 changes: 2 additions & 44 deletions src/sentry/api/endpoints/project_releases.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,22 @@

from django.db import IntegrityError, transaction

from rest_framework import serializers
from rest_framework.response import Response

from sentry.api.base import EnvironmentMixin
from sentry.api.bases.project import ProjectEndpoint, ProjectReleasePermission
from sentry.api.paginator import OffsetPaginator
from sentry.api.fields.user import UserField
from sentry.api.serializers import serialize
from sentry.api.serializers.rest_framework import CommitSerializer, ListField
from sentry.api.serializers.rest_framework import ReleaseWithVersionSerializer
from sentry.models import (
Activity,
CommitFileChange,
Environment,
Release,
)
from sentry.plugins.interfaces.releasehook import ReleaseHook
from sentry.constants import VERSION_LENGTH
from sentry.signals import release_created


class CommitPatchSetSerializer(serializers.Serializer):
path = serializers.CharField(max_length=255)
type = serializers.CharField(max_length=1)

def validate_type(self, attrs, source):
value = attrs[source]
if not CommitFileChange.is_valid_type(value):
raise serializers.ValidationError('Commit patch_set type %s is not supported.' % value)
return attrs


class CommitSerializerWithPatchSet(CommitSerializer):
patch_set = ListField(
child=CommitPatchSetSerializer(
required=False),
required=False,
allow_null=True)


class ReleaseSerializer(serializers.Serializer):
version = serializers.CharField(max_length=VERSION_LENGTH, required=True)
ref = serializers.CharField(max_length=VERSION_LENGTH, required=False)
url = serializers.URLField(required=False)
owner = UserField(required=False)
dateReleased = serializers.DateTimeField(required=False)
commits = ListField(
child=CommitSerializerWithPatchSet(
required=False),
required=False,
allow_null=True)

def validate_version(self, attrs, source):
value = attrs[source]
if not Release.is_valid_version(value):
raise serializers.ValidationError('Invalid value for release')
return attrs


class ProjectReleasesEndpoint(ProjectEndpoint, EnvironmentMixin):
permission_classes = (ProjectReleasePermission, )

Expand Down Expand Up @@ -146,7 +104,7 @@ def post(self, request, project):
the current time is assumed.
:auth: required
"""
serializer = ReleaseSerializer(data=request.DATA)
serializer = ReleaseWithVersionSerializer(data=request.DATA)

if serializer.is_valid():
result = serializer.object
Expand Down
5 changes: 4 additions & 1 deletion src/sentry/api/serializers/models/pullrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ def get_attrs(self, item_list, user):
result = {}
for item in item_list:
repository_id = six.text_type(item.repository_id)
external_url = ''
if item.repository_id in repository_map:
external_url = self._external_url(repository_map[item.repository_id], item)
result[item] = {
'repository': serialized_repos.get(repository_id, {}),
'external_url': self._external_url(repository_map[item.repository_id], item),
'external_url': external_url,
'user': users_by_author.get(six.text_type(item.author_id), {})
if item.author_id else {},
}
Expand Down
18 changes: 18 additions & 0 deletions src/sentry/api/serializers/rest_framework/commit.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
from __future__ import absolute_import

from rest_framework import serializers
from sentry.api.serializers.rest_framework.list import ListField
from sentry.models import CommitFileChange


class CommitPatchSetSerializer(serializers.Serializer):
path = serializers.CharField(max_length=255)
type = serializers.CharField(max_length=1)

def validate_type(self, attrs, source):
value = attrs[source]
if not CommitFileChange.is_valid_type(value):
raise serializers.ValidationError('Commit patch_set type %s is not supported.' % value)
return attrs


class CommitSerializer(serializers.Serializer):
Expand All @@ -10,3 +23,8 @@ class CommitSerializer(serializers.Serializer):
author_name = serializers.CharField(max_length=128, required=False)
author_email = serializers.EmailField(max_length=75, required=False)
timestamp = serializers.DateTimeField(required=False)
patch_set = ListField(
child=CommitPatchSetSerializer(required=False),
required=False,
allow_null=True,
)
38 changes: 38 additions & 0 deletions src/sentry/api/serializers/rest_framework/release.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from __future__ import absolute_import

from rest_framework import serializers

from sentry.api.serializers.rest_framework import CommitSerializer, ListField
from sentry.api.fields.user import UserField
from sentry.constants import VERSION_LENGTH
from sentry.models import Release


class ReleaseHeadCommitSerializerDeprecated(serializers.Serializer):
currentId = serializers.CharField(max_length=64)
repository = serializers.CharField(max_length=64)
previousId = serializers.CharField(max_length=64, required=False)


class ReleaseHeadCommitSerializer(serializers.Serializer):
commit = serializers.CharField(max_length=64)
repository = serializers.CharField(max_length=200)
previousCommit = serializers.CharField(max_length=64, required=False)


class ReleaseSerializer(serializers.Serializer):
ref = serializers.CharField(max_length=VERSION_LENGTH, required=False)
url = serializers.URLField(required=False)
dateReleased = serializers.DateTimeField(required=False)
commits = ListField(child=CommitSerializer(), required=False, allow_null=False)


class ReleaseWithVersionSerializer(ReleaseSerializer):
version = serializers.CharField(max_length=VERSION_LENGTH, required=True)
owner = UserField(required=False)

def validate_version(self, attrs, source):
value = attrs[source]
if not Release.is_valid_version(value):
raise serializers.ValidationError('Release with name %s is not allowed' % value)
return attrs
15 changes: 0 additions & 15 deletions src/sentry/api/serializers/rest_framework/release_head_commit.py

This file was deleted.

5 changes: 5 additions & 0 deletions src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1606,3 +1606,8 @@ def get_sentry_sdk_config():
'topic': KAFKA_EVENTS,
},
}

# Enable this to use the legacy Slack Workspace Token apps. You will likely
# never need to switch this unless you created a workspace app before slack
# disabled them.
SLACK_INTEGRATION_USE_WST = False
Loading