Bug 191929 - [ews-app] Add field in Patch object to indicate if it has been sent to Buildbot
Summary: [ews-app] Add field in Patch object to indicate if it has been sent to Buildbot
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aakash Jain
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-11-23 16:41 PST by Aakash Jain
Modified: 2018-11-26 16:50 PST (History)
5 users (show)

See Also:


Attachments
Proposed patch (3.00 KB, patch)
2018-11-23 19:00 PST, Aakash Jain
lforschler: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aakash Jain 2018-11-23 16:41:07 PST
We should add a field in Patch object to indicate if it has been sent to Buildbot. This would help in keeping track of the patch status, and whether the patch needs to be sent to Buildbot or not. For e.g.: if the Patch is downloaded and saved to Database, but 'buildbot try' command failed, there should be a way differentiate that patch in db from another patch which was successfully sent to Buildbot.

Note that in order to trigger builds on multiple builders on Buildbot, ews just needs to execute a single 'buildbot try' command (with appropriate port number). So, one flag (in Patch table) is enough to keep track of whether the patch has been sent to Buildbot or not.
Comment 1 Aakash Jain 2018-11-23 19:00:14 PST
Created attachment 355547 [details]
Proposed patch

Part of patch series. Therefore wouldn't apply to ToT without applying other patches first.
Comment 2 Lucas Forschler 2018-11-26 12:48:13 PST
Comment on attachment 355547 [details]
Proposed patch

lgtm. if we refactor bb to buildbot, it will need update here as well.
Comment 3 Kocsen Chung 2018-11-26 14:58:23 PST
Comment on attachment 355547 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=355547&action=review

> Tools/BuildSlaveSupport/ews-app/ews/models/patch.py:38
> +    sent_to_bb = models.BooleanField(default=False)

Ditto from the other patch to expand `bb` to `buildbot`.

> Tools/BuildSlaveSupport/ews-app/ews/models/patch.py:54
>          _log.info('Saved patch in database, id: {}'.format(patchid))

Where does `_log` come from? Is there default Django logging when things save to the DB that we can leverage?
Comment 4 Aakash Jain 2018-11-26 16:34:13 PST
> Ditto from the other patch to expand `bb` to `buildbot`.
Will expand bb to buildbot.

> Where does `_log` come from? Is there default Django logging when things save to the DB that we can leverage?
Using the python logging. Beginning of this file has: 
_log = logging.getLogger(__name__)
Comment 5 Aakash Jain 2018-11-26 16:49:21 PST
Committed r238532: <http://trac.webkit.org/changeset/238532>
Comment 6 Radar WebKit Bug Importer 2018-11-26 16:50:51 PST
<rdar://problem/46261781>