WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
215573
[resultsdbpy]: Depend on webkitcorepy
https://bugs.webkit.org/show_bug.cgi?id=215573
Summary
[resultsdbpy]: Depend on webkitcorepy
Jonathan Bedard
Reported
2020-08-17 09:26:48 PDT
There are a few parts of resultsdbpy that should really be broken into independent packages because other services need them. The first step in that process is for resultsdbpy to depend on the library that some tooling is to be moved to.
Attachments
Patch
(4.47 KB, patch)
2020-08-17 09:31 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Patch
(4.41 KB, patch)
2020-08-17 09:37 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Patch
(4.90 KB, patch)
2020-08-17 12:21 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Patch for landing
(4.95 KB, patch)
2020-08-17 13:26 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-08-17 09:27:04 PDT
<
rdar://problem/67250272
>
Jonathan Bedard
Comment 2
2020-08-17 09:31:35 PDT
Created
attachment 406720
[details]
Patch
Jonathan Bedard
Comment 3
2020-08-17 09:37:57 PDT
Created
attachment 406721
[details]
Patch
Aakash Jain
Comment 4
2020-08-17 09:49:48 PDT
Comment on
attachment 406721
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=406721&action=review
> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py:25 > +
Better to make below code a method, like:
https://trac.webkit.org/browser/webkit/trunk/Tools/BuildSlaveSupport/build.webkit.org-config/steps_unittest.py#L17
_add_webkitpy_to_sys_path()
> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py:26 > +# Hopefully we're beside webkitcorepy, otherwise it will need to be installed
'it' is ambiguous. Please replace with 'webkitcorepy'. Nit: missing full-stop at the end. Also, can you check if it's install and print a nice message if it isn't installed?
> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py:27 > +containing = os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
'containing' should be renamed to name of actual folder, e.g.: libraries_path
> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py:28 > +path_addition = os.path.join(containing, 'webkitcorepy')
should be 'webkitcorepy_path' 'addition' seems out of context.
Jonathan Bedard
Comment 5
2020-08-17 10:14:16 PDT
Comment on
attachment 406721
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=406721&action=review
>> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py:26 >> +# Hopefully we're beside webkitcorepy, otherwise it will need to be installed > > 'it' is ambiguous. Please replace with 'webkitcorepy'. > Nit: missing full-stop at the end. > > Also, can you check if it's install and print a nice message if it isn't installed?
Other than the error message you'll get on line 32 when you try and use the library? When we have this situation with other packages we own, I intend to have sort of "include or auto-install" function, but we obviously can't auto-install the library that has the auto-installer in it....
Aakash Jain
Comment 6
2020-08-17 10:28:13 PDT
(In reply to Jonathan Bedard from
comment #5
)
> > Also, can you check if it's install and print a nice message if it isn't installed? > > Other than the error message you'll get on line 32 when you try and use the library? > > When we have this situation with other packages we own, I intend to have sort of "include or auto-install" function, but we obviously can't auto-install the library that has the auto-installer in it....
Yeah, i am not referring to auto-installing webkitcorepy. I am only referring to better error message when import fails. e.g.:
https://trac.webkit.org/browser/webkit/trunk/Tools/Scripts/webkitpy/test/main.py#L260
Something like: try: import package_name except ImportError: _log.error('Failed to import webkitcorepy:, Please do XYZ to install this package') Although it's ok without custom error message as well.
Jonathan Bedard
Comment 7
2020-08-17 12:21:45 PDT
Created
attachment 406729
[details]
Patch
Jonathan Bedard
Comment 8
2020-08-17 13:26:35 PDT
Created
attachment 406740
[details]
Patch for landing
EWS
Comment 9
2020-08-17 13:53:25 PDT
Committed
r265771
: <
https://trac.webkit.org/changeset/265771
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 406740
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug