Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/12743#discussion_r68047315
--- Diff: dev/run-tests.py ---
@@ -101,21 +101,21 @@ def determine_modules_to_test(changed_modules):
>>> sorted(x.name for x in determine_modules_to_test([modules.root]))
['root']
+ >>> [x.name for x in determine_modules_to_test([modules.build])]
+ ['root']
>>> sorted(x.name for x in determine_modules_to_test([modules.graphx]))
['examples', 'graphx']
>>> x = sorted(x.name for x in
determine_modules_to_test([modules.sql]))
>>> x # doctest: +NORMALIZE_WHITESPACE
['examples', 'hive-thriftserver', 'mllib', 'pyspark-ml', \
'pyspark-mllib', 'pyspark-sql', 'sparkr', 'sql']
"""
- # If we're going to have to run all of the tests, then we can just
short-circuit
- # and return 'root'. No module depends on root, so if it appears then
it will be
- # in changed_modules.
- if modules.root in changed_modules:
- return [modules.root]
modules_to_test = set()
for module in changed_modules:
modules_to_test =
modules_to_test.union(determine_modules_to_test(module.dependent_modules))
+ # If we need to run all of the tests, then we should short-circuit and
return 'root'
+ if modules.root in modules_to_test:
+ return [modules.root]
--- End diff --
Hi @yhuai and @JoshRosen, I realised that
https://github.com/apache/spark/pull/13806 is being failed due to this one.
In the case of my PR, it corrects two files in `sql` and `core`. Since it
seems fixing `core` modules triggers all tests by `determine_modules_for_files`.
So, `changed_modules` becomes as below:
```
['root', 'sql']
```
and `dependent_modules` becaomes as below:
```
['pyspark-mllib', 'pyspark-ml', 'hive-thriftserver', 'sparkr', 'mllib',
'examples', 'pyspark-sql']
```
Now, `modules_to_test` does not include `root`, this checking is skipped
but
Both `changed_modules` and `modules_to_test` are being merged below.
This ends up with failing with the message below (e.g.
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60990/consoleFull):
```
Error: unrecognized module 'root'. Supported modules: pyspark-core,
pyspark-sql, pyspark-streaming, pyspark-ml, pyspark-mllib
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]