-
Notifications
You must be signed in to change notification settings - Fork 431
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
Configuration Test Framework Prototype #605
Configuration Test Framework Prototype #605
Conversation
Notes -- At some point, we may also wish to support testing configuration for multiple deployed objects. |
[Discussion]: Which one is better, |
Or both. @simon-mo |
Pytest fixture helps modularize setup and tear down code. Generally considered more powerful. So most of the Ray codebase uses it except autoscaler and tune. Pytest is compatible with unittest anyway. In the end it's up to your taste. |
TODO:
def replace_patch(path, value):
return jsonpatch(...)
|
29576c6
to
4406a4d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more suggestions/questions to see if we can simplify things a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're at a good place for this prototype!
Let's get this running in the KubeRay CI in a follow-up.
After that, we can write more tests using this framework.
Later, we can think about running the tests in the Ray buildkite CI, if it becomes necessary due to compute limitations.
… one (#731) Use #605 to test sample RayService YAML. The test includes the following two checking rules. 1. It is able to [submit a simple job](https://github.com/jasoonn/kuberay/blob/69efe590970f9d8a4fe0fff66300049f008c6ae9/tests/framework/prototype.py#L188-L197) to the created raycluster. 2. It is able to use [curl in the pod](https://github.com/jasoonn/kuberay/blob/69efe590970f9d8a4fe0fff66300049f008c6ae9/tests/framework/prototype.py#L199-L216) to access the service.
Currently, existing tests for operators only test for the default configuration. However, from the last 6 weeks (the design doc is created on Sep. 26, 2022), 11 out of 34 commits are used to fix bugs caused by configurations. Hence, this project decided to focus on configuration. This PR is a prototype that can reproduce every YAML-related configuration bug (in the 11 reported config bugs) by adding a simple JsonPatch.
…e ones (ray-project#678) Use ray-project#605 to test sample RayCluster YAMLs. Signed-off-by: Kai-Hsun Chen <kaihsun@apache.org>
… one (ray-project#731) Use ray-project#605 to test sample RayService YAML. The test includes the following two checking rules. 1. It is able to [submit a simple job](https://github.com/jasoonn/kuberay/blob/69efe590970f9d8a4fe0fff66300049f008c6ae9/tests/framework/prototype.py#L188-L197) to the created raycluster. 2. It is able to use [curl in the pod](https://github.com/jasoonn/kuberay/blob/69efe590970f9d8a4fe0fff66300049f008c6ae9/tests/framework/prototype.py#L199-L216) to access the service.
Why are these changes needed?
Currently, existing tests for operators only test for the default configuration. However, from the last 6 weeks (the design doc is created on Sep. 26, 2022), 11 out of 34 commits are used to fix bugs caused by configurations. Hence, this project decided to focus on configuration. This PR is a prototype that can reproduce every YAML-related configuration bug (in the 11 reported config bugs) by adding a simple JsonPatch.
Related issue number
Checks