Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Testing] Do not run any non-RLlib/core tests if only RLLib affected (except wheels). #7892

Conversation

sven1977
Copy link
Contributor

@sven1977 sven1977 commented Apr 3, 2020

Non-wheel & non-RLlib travis test jobs will not(!) be run if only RLLIB_AFFECTED.

Reasoning: If only RLlib files have changed, only RLlib tests should be re-run (and the wheels should be rebuilt/updated).

We already have in place: If only non-RLlib files have changed, only the RLlib learning tests are run to assure all our RL-algos are still learning.

This will significantly reduce the stress currently put on our travis resources.

Related issue number

Checks

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

sven1977 added 2 commits April 3, 2020 21:43
…_test_all_of_ray_core_for_rllib_only_changes

� Conflicts:
�	rllib/utils/__init__.py
@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/24209/
Test FAILed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/24208/
Test PASSed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/24210/
Test FAILed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/24211/
Test PASSed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/24232/
Test FAILed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/24233/
Test PASSed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/24238/
Test PASSed.

.travis.yml Outdated
@@ -56,16 +56,17 @@ matrix:
- RAY_GCS_SERVICE_ENABLED=false
install:
- eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py`
- if [ $RAY_CI_SERVE_AFFECTED != "1" ] && [ $RAY_CI_TUNE_AFFECTED != "1" ] && [ $RAY_CI_PYTHON_AFFECTED != "1" ] && [ $RAY_CI_STREAMING_CPP_AFFECTED != "1" ] && [ $RAY_CI_JAVA_AFFECTED != "1" ]; then exit; fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this condition doesn't work. It should run when RAY_CI_JAVA_AFFECTED is 1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and it does, no?
It will NOT(!) exit the install, if RAY_CI_JAVA_AFFECTED=1

Then, in the script section: if [ $RAY_CI_JAVA_AFFECTED == "1" ]; then ./java/test.sh; fi

.travis.yml Outdated
@@ -76,13 +77,15 @@ matrix:
- RAY_GCS_SERVICE_ENABLED=false
install:
- eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py`
- if [ $RAY_CI_PYTHON_AFFECTED != "1" ]; then exit; fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for gcs_service test, we actually want to run it on every python changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, so you mean, it should run even if only RAY_CI_RLLIB_AFFECTED=1?

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/24304/
Test PASSed.

@sven1977
Copy link
Contributor Author

sven1977 commented Apr 6, 2020

Let me create another var, which is 1 iff only RLLIB is affected (and nothing else).
That should simplify the if blocks and make everything less confusing.

…ray-core stuff (except wheels) if only RLlib changed.
@simon-mo
Copy link
Contributor

simon-mo commented Apr 6, 2020

@mehrdadn can you help take a look at this PR as well? mostly verify the logic.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/24314/
Test PASSed.

@simon-mo simon-mo requested a review from mehrdadn April 9, 2020 03:21
Copy link
Contributor

@mehrdadn mehrdadn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic looks fine as far as I can tell @simon-mo. I'm a bit concerned it's becoming more brittle and getting increasingly difficult to reason about the testing logic. For example, the conditions for defining RAY_CI_ONLY_RLLIB_AFFECTED form an almost-exhaustive list of exclusions, which will likely go out of sync later. Or for example, I think it'll become confusing later what "only" means in RAY_CI_ONLY_RLLIB_AFFECTED, since wheels are also deemed affected here. I think right now it's clear that it means "only" with respect to the phase of compiling source code, but that will likely not stay so simple down the road.

We can (probably should) merge this for now to get builds through, but we should seriously consider a more scalable and robust solution later. I think the solution here would be using Bazel for everything, so that it can figure out dependencies for tests on its own (and we can insert our own scripts into the process to help it wherever needed). Probably something I can look into once I'm done with the higher priority stuff on the Windows side.

@simon-mo
Copy link
Contributor

simon-mo commented Apr 9, 2020

Thanks @mehrdadn! Sounds good, moving the dependency analysis to bazel make sense to me. Probably through some bazel query tool we can determine which sets of tests are necessary.

@sven1977
Copy link
Contributor Author

sven1977 commented Apr 9, 2020

Trying a re-test with only Rllib changes.

@sven1977
Copy link
Contributor Author

sven1977 commented Apr 9, 2020

I agree, it's probably better to take what-needs-to-be-tested-logic out of travis.yaml and move it into BAZEL.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/24449/
Test FAILed.

…_test_all_of_ray_core_for_rllib_only_changes
@sven1977 sven1977 added the tests-ok The tagger certifies test failures are unrelated and assumes personal liability. label Apr 9, 2020
@sven1977
Copy link
Contributor Author

sven1977 commented Apr 9, 2020

Hey @simon-mo Could you merge? Tests are all ok, except for the known broken ones (tmp file creation currently broken: rllib/tests/test_io and test_tempfile.py).

@mehrdadn
Copy link
Contributor

mehrdadn commented Apr 9, 2020

Yes please merge :) I'm doing surgery on CI so it'll make one of our lives very difficult if this isn't merged soon!

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/24469/
Test FAILed.

@simon-mo simon-mo merged commit 0a5b6d1 into ray-project:master Apr 9, 2020
wuisawesome pushed a commit to wuisawesome/ray that referenced this pull request Apr 13, 2020
…(except wheels). (ray-project#7892)

* Do not run any non-RLlib/core tests if only RLLib affected, except for generating the 2 wheels (OSX and Linux).

* Test noop RLlib change.

* Test noop RLlib change.

* Fix broken RLlib tests in master.

* Split BAZEL learning tests into cartpole and pendulum (reached the 60min barrier).

* Fix error_outputs option in BAZEL for RLlib regression tests.

* Fix.

* Test.

* WIP.

* Add env flag RAY_CI_ONLY_RLLIB_AFFECTED to refrain from testing most ray-core stuff (except wheels) if only RLlib changed.

* Test RLlib-only change.
@sven1977 sven1977 deleted the dont_test_all_of_ray_core_for_rllib_only_changes branch August 21, 2020 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests-ok The tagger certifies test failures are unrelated and assumes personal liability.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants