WebKit Bugzilla
Attachment 361319 Details for
Bug 194355
: [ews-app] Fetch builder id to name mapping
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
ews-app-fetch-mapping.patch (text/plain), 2.28 KB, created by
Aakash Jain
on 2019-02-06 12:52:53 PST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Aakash Jain
Created:
2019-02-06 12:52:53 PST
Size:
2.28 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 241042) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,14 @@ >+2019-02-06 Aakash Jain <aakash_jain@apple.com> >+ >+ [ews-app] Fetch builder id to name mapping >+ https://bugs.webkit.org/show_bug.cgi?id=194355 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * BuildSlaveSupport/ews-app/ews/common/buildbot.py: >+ (Buildbot.get_builder_id_to_name_mapping): >+ (Buildbot._get_display_name_from_builder_name): >+ > 2019-02-06 David Kilzer <ddkilzer@apple.com> > > WTR::InjectedBundlePage::willSendRequestForFrame() leaks a WKDataRef >Index: Tools/BuildSlaveSupport/ews-app/ews/common/buildbot.py >=================================================================== >--- Tools/BuildSlaveSupport/ews-app/ews/common/buildbot.py (revision 241042) >+++ Tools/BuildSlaveSupport/ews-app/ews/common/buildbot.py (working copy) >@@ -22,8 +22,10 @@ > > import logging > import os >+import re > import subprocess > >+import ews.common.util as util > import ews.config as config > > _log = logging.getLogger(__name__) >@@ -49,3 +51,26 @@ class Buildbot(): > _log.warn('Error executing: {}, return code={}'.format(command, return_code)) > > return return_code >+ >+ @classmethod >+ def get_builder_id_to_name_mapping(cls): >+ builder_id_to_name_mapping = {} >+ builder_url = 'http://{}/api/v2/builders'.format(config.BUILDBOT_SERVER_HOST) >+ builders_data = util.fetch_data_from_url(builder_url) >+ if not builders_data: >+ return {} >+ for builder in builders_data.json().get('builders', []): >+ builder_id = builder['builderid'] >+ builder_name = builder.get('name') >+ display_name = builder.get('description') >+ if not display_name: >+ display_name = Buildbot._get_display_name_from_builder_name(builder_name) >+ builder_id_to_name_mapping[builder_id] = {'builder_name': builder_name, 'display_name': display_name} >+ return builder_id_to_name_mapping >+ >+ @classmethod >+ def _get_display_name_from_builder_name(cls, builder_name): >+ words = re.split('[, \-_:()]+', builder_name) >+ if not words: >+ return builder_name >+ return words[0].lower()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194355
: 361319