Bug 203899 - Add support for remotes file for EWS builders
Summary: Add support for remotes file for EWS builders
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Paulo Matos
URL:
Keywords: InRadar
Depends on:
Blocks: 203946
  Show dependency treegraph
 
Reported: 2019-11-06 06:50 PST by Paulo Matos
Modified: 2019-11-14 03:45 PST (History)
4 users (show)

See Also:


Attachments
Patch (6.87 KB, patch)
2019-11-06 06:56 PST, Paulo Matos
no flags Details | Formatted Diff | Diff
Patch (6.68 KB, patch)
2019-11-07 03:48 PST, Paulo Matos
no flags Details | Formatted Diff | Diff
Patch (6.69 KB, patch)
2019-11-07 04:44 PST, Paulo Matos
no flags Details | Formatted Diff | Diff
Patch (6.70 KB, patch)
2019-11-07 04:49 PST, Paulo Matos
no flags Details | Formatted Diff | Diff
Patch (6.67 KB, patch)
2019-11-07 06:27 PST, Paulo Matos
no flags Details | Formatted Diff | Diff
Patch (9.46 KB, patch)
2019-11-07 07:20 PST, Paulo Matos
no flags Details | Formatted Diff | Diff
Patch (8.29 KB, patch)
2019-11-07 07:42 PST, Paulo Matos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paulo Matos 2019-11-06 06:50:15 PST
Add support for remotes file for EWS builders
Comment 1 Paulo Matos 2019-11-06 06:56:53 PST
Created attachment 382925 [details]
Patch
Comment 2 Aakash Jain 2019-11-06 09:19:37 PST
Comment on attachment 382925 [details]
Patch

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

Logic looks fine.

Please fix the unit-tests as well. You can run them using 'python Tools/BuildSlaveSupport/ews-build/runUnittests.py'

> Tools/BuildSlaveSupport/ews-build/steps.py:929
> +    command = ['perl', 'Tools/Scripts/run-javascriptcore-tests', '--no-build', '--no-fail-fast', '--json-output={0}'.format(jsonFileName), WithProperties('--%(configuration)s')] + [WithProperties('--remote-config-file=%(remotes)s')] if WithProperties('%(remotes)s') != '' else []

is this if-else correct? Please check what does command contains in case of else.
Comment 3 Paulo Matos 2019-11-07 01:29:33 PST
Thanks for the comments - I will take a look at the unit tests. Didn't know we had them.
Comment 4 Paulo Matos 2019-11-07 01:38:12 PST
python Tools/BuildSlaveSupport/ews-build/runUnittests.py
E.......................
======================================================================
ERROR: steps_unittest (unittest.loader.ModuleImportFailure)
----------------------------------------------------------------------
ImportError: Failed to import test module: steps_unittest
Traceback (most recent call last):
  File "/usr/lib64/python2.7/unittest/loader.py", line 254, in _find_tests
    module = self._get_module_from_name(name)
  File "/usr/lib64/python2.7/unittest/loader.py", line 232, in _get_module_from_name
    __import__(name)
  File "/home/pmatos/Projects/igalia/WebKit/Tools/BuildSlaveSupport/ews-build/steps_unittest.py", line 30, in <module>
    from buildbot.test.fake.remotecommand import Expect, ExpectRemoteRef, ExpectShell
ImportError: No module named test.fake.remotecommand


Are you using buildbot 1.8.2?
Comment 5 Paulo Matos 2019-11-07 01:50:54 PST
(In reply to Aakash Jain from comment #2)
> Comment on attachment 382925 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=382925&action=review
> 
> Logic looks fine.
> 
> Please fix the unit-tests as well. You can run them using 'python
> Tools/BuildSlaveSupport/ews-build/runUnittests.py'
> 

No updates seem to be required as the unittests don't call into ConfigureBuild.
Comment 6 Paulo Matos 2019-11-07 03:48:19 PST
Created attachment 383035 [details]
Patch
Comment 7 Paulo Matos 2019-11-07 04:44:14 PST
Created attachment 383037 [details]
Patch
Comment 8 Paulo Matos 2019-11-07 04:49:49 PST
Created attachment 383038 [details]
Patch
Comment 9 Paulo Matos 2019-11-07 04:51:57 PST
I am having some issues getting ahold of the property in the RunJavaScriptCoreTests step. Need to understand the best way to do this.
Comment 10 Aakash Jain 2019-11-07 04:57:57 PST
Comment on attachment 383038 [details]
Patch

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

> Tools/BuildSlaveSupport/ews-build/steps.py:937
> +        # add remotes configuration file path to the command line if needed

start() is a better place to add parameters to self.command. If I remember correctly, you will need to use self.getProperty('remotes') instead of WithProperties/util.Property().
Comment 11 Aakash Jain 2019-11-07 05:02:29 PST
(In reply to Paulo Matos from comment #4)
> Are you using buildbot 1.8.2?
Yes, see https://ews-build.webkit.org/#/about
Did you used '--no-binary :all:' while installing buildbot, as per: https://trac.webkit.org/wiki/EarlyWarningSystem#Installingrequiredpackages:

(In reply to Paulo Matos from comment #5)
> No updates seem to be required as the unittests don't call into ConfigureBuild.
The unit-test failures are in RunJavaScriptCoreTests (and related) unit-tests. See the red services ews bubble https://ews-build.webkit.org/#/builders/20/builds/7508
Comment 12 Aakash Jain 2019-11-07 05:19:57 PST
(In reply to Paulo Matos from comment #9)
> I am having some issues getting ahold of the property in the
> RunJavaScriptCoreTests step. Need to understand the best way to do this.
s
__init__ is called at the very beginning, when buildbot starts. While start() is called after the build, and the corresponding build-step has started. So at the time start() is called, all the build properties are already set, and you can simply use self.getProperty().

We modify self.command inside start() in our current code as well, e.g.: in CompileWebKit::start(), and even inside RunJavaScriptCoreTests:: start() using appendCustomBuildFlags().
Comment 13 Paulo Matos 2019-11-07 06:27:17 PST
Created attachment 383042 [details]
Patch
Comment 14 Paulo Matos 2019-11-07 07:20:53 PST
Created attachment 383044 [details]
Patch
Comment 15 Paulo Matos 2019-11-07 07:24:53 PST
(In reply to Aakash Jain from comment #12)
> (In reply to Paulo Matos from comment #9)
> > I am having some issues getting ahold of the property in the
> > RunJavaScriptCoreTests step. Need to understand the best way to do this.
> s
> __init__ is called at the very beginning, when buildbot starts. While
> start() is called after the build, and the corresponding build-step has
> started. So at the time start() is called, all the build properties are
> already set, and you can simply use self.getProperty().
> 
> We modify self.command inside start() in our current code as well, e.g.: in
> CompileWebKit::start(), and even inside RunJavaScriptCoreTests:: start()
> using appendCustomBuildFlags().

Thanks for the quick review and comments. r+ and cq+ pls if all is good.
Comment 16 Aakash Jain 2019-11-07 07:33:17 PST
(In reply to Paulo Matos from comment #15)
> Thanks for the quick review and comments. r+ and cq+ pls if all is good.
Code looks good. Can you just move the unit-tests inside TestRunJavaScriptCoreTests? Usually we have a class in steps_unittest corresponding to a class in steps.
Comment 17 Paulo Matos 2019-11-07 07:42:32 PST
Created attachment 383047 [details]
Patch
Comment 18 WebKit Commit Bot 2019-11-07 08:32:11 PST
Comment on attachment 383047 [details]
Patch

Clearing flags on attachment: 383047

Committed r252184: <https://trac.webkit.org/changeset/252184>
Comment 19 WebKit Commit Bot 2019-11-07 08:32:13 PST
All reviewed patches have been landed.  Closing bug.
Comment 20 Radar WebKit Bug Importer 2019-11-07 08:33:15 PST
<rdar://problem/56983361>
Comment 21 Aakash Jain 2019-11-11 04:16:39 PST
We need to pass 'remotes' parameter in JSCTestsFactory.__init__() as well.

Also, it's probably better to use named arguments while using Factory.__init().

e.g.:
class JSCTestsFactory(Factory):
    def __init__(self, platform, configuration='release', architectures=None, remotes=None, additionalArguments=None, runTests='true', **kwargs):
        Factory.__init__(self, platform=platform, configuration=configuration, architectures=architectures, buildOnly=False, remotes=remotes, additionalArguments=additionalArguments, checkRelevance=True)
Comment 22 Aakash Jain 2019-11-14 03:45:05 PST
(In reply to Aakash Jain from comment #21)
> We need to pass 'remotes' parameter in JSCTestsFactory.__init__() as well.
Done in https://trac.webkit.org/changeset/252454/webkit