Merge pull request #3038 from bison/peewee-fixes

Prepare to update Peewee
This commit is contained in:
Brad Ison 2018-04-04 15:17:20 -04:00 committed by GitHub
commit b4849997e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 8 deletions

View file

@ -193,12 +193,13 @@ class BuildJobNotifier(object):
def send_notification(self, kind, error_message=None, image_id=None, manifest_digests=None):
with UseThenDisconnect(app.config):
tags = self.build_config.get('docker_tags', ['latest'])
trigger = self.repo_build.trigger
event_data = {
'build_id': self.repo_build.uuid,
'build_name': self.repo_build.display_name,
'docker_tags': tags,
'trigger_id': self.repo_build.trigger.uuid,
'trigger_kind': self.repo_build.trigger.service.name,
'trigger_id': trigger.uuid if trigger is not None else None,
'trigger_kind': trigger.service.name if trigger is not None else None,
'trigger_metadata': self.build_config.get('trigger_metadata', {})
}

View file

@ -2,10 +2,10 @@ from data.database import QuayRelease, QuayRegion, QuayService
def set_region_release(service_name, region_name, version):
service, _ = QuayService.create_or_get(name=service_name)
region, _ = QuayRegion.create_or_get(name=region_name)
service, _ = QuayService.get_or_create(name=service_name)
region, _ = QuayRegion.get_or_create(name=region_name)
return QuayRelease.create_or_get(service=service, version=version, region=region)
return QuayRelease.get_or_create(service=service, version=version, region=region)
def get_recent_releases(service_name, region_name):

View file

@ -1424,7 +1424,7 @@ class TestGetOrganizationTeamMembers(ApiTestCase):
json = self.getJsonResponse(TeamMemberList, params=dict(orgname=ORGANIZATION,
teamname='readers'))
self.assertEquals(READ_ACCESS_USER, json['members'][1]['name'])
self.assertInTeam(json, READ_ACCESS_USER)
class TestUpdateOrganizationTeamMember(ApiTestCase):

View file

@ -221,6 +221,7 @@ class ImplementedSecurityScannerAPI(SecurityScannerAPIInterface):
'Authorization': auth_header,
}
if layer.parent is not None:
if layer.parent.docker_image_id and layer.parent.storage.uuid:
layer_request['ParentName'] = compute_layer_id(layer.parent)