RESOLVED FIXED 191928
[ews-app] Add methods to save patch to database
https://bugs.webkit.org/show_bug.cgi?id=191928
Summary [ews-app] Add methods to save patch to database
Aakash Jain
Reported 2018-11-23 16:17:33 PST
We should add methods in ews/models/patch.py allowing to save a Patch to database after performing necessary verification on input data.
Attachments
Proposed patch (3.40 KB, patch)
2018-11-23 18:57 PST, Aakash Jain
no flags
Aakash Jain
Comment 1 2018-11-23 18:57:25 PST
Created attachment 355546 [details] Proposed patch
Json
Comment 2 2018-11-26 12:31:55 PST
Comment on attachment 355546 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=355546&action=review lgtm, other than the refactor of patchid to patch_id. > Tools/BuildSlaveSupport/ews-app/ews/models/patch.py:45 > + def save_patch(cls, patchid, bug_id=-1, obsolete=False): can we use patch_id instead of patchid ? > Tools/BuildSlaveSupport/ews-app/ews/models/patch.py:63 > + if not patchid or type(patchid) != int or patchid < 0: rare edge case...but could we have a patchid of 0? maybe this should be "patchid < 1" ?
Lucas Forschler
Comment 3 2018-11-26 12:45:39 PST
Comment on attachment 355546 [details] Proposed patch lgtm, other than the refactor of patchid to patch_id.
Kocsen Chung
Comment 4 2018-11-26 14:45:33 PST
Comment on attachment 355546 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=355546&action=review >> Tools/BuildSlaveSupport/ews-app/ews/models/patch.py:45 >> + def save_patch(cls, patchid, bug_id=-1, obsolete=False): > > can we use patch_id instead of patchid ? ++
Aakash Jain
Comment 5 2018-11-26 14:52:25 PST
> can we use patch_id instead of patchid ? Sure, will use patch_id. > rare edge case...but could we have a patchid of 0? maybe this should be "patchid < 1" ? Sure, will change.
Aakash Jain
Comment 6 2018-11-26 16:24:06 PST
Radar WebKit Bug Importer
Comment 7 2018-11-26 16:25:30 PST
Note You need to log in before you can comment on or make changes to this bug.