-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
This merges all the bugfix PR's I had into one. #2754
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
Changes from all commits
d3c4bbe
4a3e516
8b6ae2c
6bf7275
1f75234
c0e88e1
5e3e8aa
6cd2ad6
fbf1e79
4d44a25
bc879e1
2e937a6
f5db85c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -205,7 +205,7 @@ def setup_webhook(self, project): | |
log.error('GitHub webhook creation failed for project: %s', | ||
project) | ||
log.debug('GitHub webhook creation failure response: %s', | ||
dict(resp)) | ||
resp.content) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above |
||
return (False, resp) | ||
|
||
@classmethod | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,27 +132,23 @@ def sync_versions(self, request, **kwargs): | |
log.exception("Sync Versions Error: %s" % e.message) | ||
return Response({'error': e.message}, status=status.HTTP_400_BAD_REQUEST) | ||
|
||
try: | ||
old_stable = project.get_stable_version() | ||
promoted_version = project.update_stable_version() | ||
if promoted_version: | ||
new_stable = project.get_stable_version() | ||
log.info( | ||
"Triggering new stable build: {project}:{version}".format( | ||
project=project.slug, | ||
version=new_stable.identifier)) | ||
trigger_build(project=project, version=new_stable) | ||
|
||
# Marking the tag that is considered the new stable version as | ||
# active and building it if it was just added. | ||
if ( | ||
activate_new_stable and | ||
promoted_version.slug in added_versions): | ||
promoted_version.active = True | ||
promoted_version.save() | ||
trigger_build(project=project, version=promoted_version) | ||
except: | ||
log.exception("Stable Version Failure", exc_info=True) | ||
promoted_version = project.update_stable_version() | ||
if promoted_version: | ||
new_stable = project.get_stable_version() | ||
log.info( | ||
"Triggering new stable build: {project}:{version}".format( | ||
project=project.slug, | ||
version=new_stable.identifier)) | ||
trigger_build(project=project, version=new_stable) | ||
|
||
# Marking the tag that is considered the new stable version as | ||
# active and building it if it was just added. | ||
if ( | ||
activate_new_stable and | ||
promoted_version.slug in added_versions): | ||
promoted_version.active = True | ||
promoted_version.save() | ||
trigger_build(project=project, version=promoted_version) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This removed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It wasn't used, so I figured not, it seemed like a weird thing to have side effects, but didn't check. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No side effects, just dead code. |
||
|
||
return Response({ | ||
'added_versions': added_versions, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resp.json()
is more correct. Also, feel free to drop this, I have a fix in my branch.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That only works for JSON content, and most of the issues here are the responses aren't valid JSON.