Bug 194264

Summary: [ews-app] Add method to save BuilderMapping to database
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Aakash Jain <aakash_jain>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ap, ews-watchlist, jbedard, kocsen_chung, lforschler, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch lforschler: review+

Description Aakash Jain 2019-02-04 18:15:02 PST
We should add method to save Builder Mapping to database for ews-app.
Comment 1 Aakash Jain 2019-02-04 18:19:29 PST
Created attachment 361145 [details]
Proposed patch
Comment 2 EWS Watchlist 2019-02-04 18:21:09 PST Comment hidden (obsolete)
Comment 3 Lucas Forschler 2019-02-05 09:07:58 PST
Comment on attachment 361145 [details]
Proposed patch

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

> Tools/BuildSlaveSupport/ews-app/ews/models/buildermapping.py:59
> +            _log.error('builder_id {} does not match with builer_id {}. Ignoring new data.'.format(mapping.builder_id, builder_id))

nit: typo: builer
Comment 4 Jonathan Bedard 2019-02-05 09:15:55 PST
Comment on attachment 361145 [details]
Proposed patch

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

> Tools/BuildSlaveSupport/ews-app/ews/models/buildermapping.py:80
> +    def is_valid_mapping(cls, builder_id, builder_name, display_name):

Why are we accepting builder_name and display_name if we don't do anything with them?
Comment 5 Aakash Jain 2019-02-05 09:23:10 PST
Committed r240977: <https://trac.webkit.org/changeset/240977>
Comment 6 Radar WebKit Bug Importer 2019-02-05 09:24:35 PST
<rdar://problem/47820191>
Comment 7 Aakash Jain 2019-02-05 09:25:55 PST
> Why are we accepting builder_name and display_name if we don't do anything with them?
It's not required, but I added it for future, we might want to add more validation later on (e.g.: ensuring that display_name is string).