Changeset 251516 in webkit
- Timestamp:
- Oct 23, 2019 5:18:15 PM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/ews-app/ews/fetcher.py
r249483 r251516 61 61 Patch.save_patches(patch_ids) 62 62 patches_to_send = self.patches_to_send_to_buildbot(patch_ids) 63 _log.info('{} r? patches, {} patches need to be sent to Buildbot .'.format(len(patch_ids), len(patches_to_send)))63 _log.info('{} r? patches, {} patches need to be sent to Buildbot: {}'.format(len(patch_ids), len(patches_to_send), patches_to_send)) 64 64 65 65 for patch_id in patches_to_send: 66 if Patch.is_patch_sent_to_buildbot(patch_id): 67 _log.error('Patch {} is already sent to buildbot.'.format(patch_id)) 68 continue 69 Patch.set_sent_to_buildbot(patch_id, True) 66 70 bz_patch = Bugzilla.retrieve_attachment(patch_id) 67 71 if not bz_patch or bz_patch['id'] != patch_id: … … 76 80 if rc == 0: 77 81 Patch.set_bug_id(patch_id, bz_patch['bug_id']) 78 Patch.set_sent_to_buildbot(patch_id)79 82 else: 80 83 _log.error('Failed to send patch to buildbot.') 84 Patch.set_sent_to_buildbot(patch_id, False) 81 85 #FIXME: send an email for this failure 82 86 return patch_ids -
trunk/Tools/BuildSlaveSupport/ews-app/ews/models/patch.py
r241488 r251516 46 46 def save_patch(cls, patch_id, bug_id=-1, obsolete=False, sent_to_buildbot=False): 47 47 if not Patch.is_valid_patch_id(patch_id): 48 _log.warn('Patch id {} in invalid. Skipped saving.'.format(patch_id)) 48 49 return ERR_INVALID_PATCH_ID 49 50 50 51 if Patch.is_existing_patch_id(patch_id): 51 _log.debug( "Patch id {} already exists in database. Skipped saving.".format(patch_id))52 _log.debug('Patch id {} already exists in database. Skipped saving.'.format(patch_id)) 52 53 return ERR_EXISTING_PATCH 53 54 Patch(patch_id, bug_id, obsolete, sent_to_buildbot).save() … … 83 84 84 85 @classmethod 85 def set_sent_to_buildbot(cls, patch_id ):86 def set_sent_to_buildbot(cls, patch_id, sent_to_buildbot=True): 86 87 if not Patch.is_existing_patch_id(patch_id): 87 return ERR_NON_EXISTING_PATCH 88 Patch.save_patch(patch_id=patch_id, sent_to_buildbot=sent_to_buildbot) 89 _log.info('Patch {} saved to database with sent_to_buildbot={}'.format(patch_id, sent_to_buildbot)) 90 return SUCCESS 88 91 89 92 patch = Patch.objects.get(pk=patch_id) 90 if patch.sent_to_buildbot :91 _log.warn('Patch {} has already been sent to Buildbot.'.format(patch_id))93 if patch.sent_to_buildbot == sent_to_buildbot: 94 _log.warn('Patch {} already has sent_to_buildbot={}'.format(patch_id, sent_to_buildbot)) 92 95 return SUCCESS 93 96 94 patch.sent_to_buildbot = True97 patch.sent_to_buildbot = sent_to_buildbot 95 98 patch.save() 96 _log. debug('Updated patch {} with sent_to_buildbot=True'.format(patch_id))99 _log.info('Updated patch {} with sent_to_buildbot={}'.format(patch_id, sent_to_buildbot)) 97 100 return SUCCESS 98 101 -
trunk/Tools/ChangeLog
r251514 r251516 1 2019-10-23 Aakash Jain <aakash_jain@apple.com> 2 3 [EWS] Multiple builds are triggered for one patch sometimes in new EWS 4 https://bugs.webkit.org/show_bug.cgi?id=199417 5 6 Reviewed by Jonathan Bedard. 7 8 * BuildSlaveSupport/ews-app/ews/fetcher.py: 9 (BugzillaPatchFetcher.fetch): Set the flag before sending the patch to buildbot. Unset it in case of failure. 10 Also added additional check for sent_to_buildbot flag before processing patch. 11 * BuildSlaveSupport/ews-app/ews/models/patch.py: 12 (Patch.save_patch): Improved logging. 13 (Patch.set_sent_to_buildbot): Modified to accept sent_to_buildbot paramater, and set the value accordingly. 14 1 15 2019-10-23 Truitt Savell <tsavell@apple.com> 2 16
Note: See TracChangeset
for help on using the changeset viewer.