Skip to content

Commit

Permalink
Show all identified images
Browse files Browse the repository at this point in the history
A recent change introduced the chance to see also failed Freshmaker
builds and not only the successful. Some of them seem to be skipped
due to failure building parent images. With this change they will
also be showed.
ref: FACTORY-4592

Signed-off-by: gnaponie <gnaponie@redhat.com>
  • Loading branch information
gnaponie authored and mprahl committed Jul 1, 2019
1 parent 7640c1d commit fde2784
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scrapers/freshmaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,11 @@ def query_api_and_update_neo4j(self):

for build_dict in fm_event['builds']:
# To handle a faulty container build in Freshmaker
if not build_dict['build_id'] or int(build_dict['build_id']) < 0:
if build_dict['build_id'] and int(build_dict['build_id']) < 0:
continue
log.debug('Creating FreshmakerBuild {0}'.format(build_dict['build_id']))
fb_params = dict(
id_=build_dict['id'],
build_id=build_dict['build_id'],
dep_on=build_dict['dep_on'],
name=build_dict['name'],
original_nvr=build_dict['original_nvr'],
Expand All @@ -107,6 +106,8 @@ def query_api_and_update_neo4j(self):
if build_dict['time_completed']:
fb_params['time_completed'] = timestamp_to_datetime(
build_dict['time_completed'])
if build_dict['build_id']:
fb_params['build_id'] = build_dict['build_id']
fb = FreshmakerBuild.create_or_update(fb_params)[0]
event.requested_builds.connect(fb)

Expand Down

0 comments on commit fde2784

Please sign in to comment.