[Refactor] Improve developer experience of API server e2e-test#3466
Conversation
Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com>
Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com>
|
@dentiny PTAL, thanks! Follow-upOnce these changes are approved, I'll update the README.md and DEVELOPMENT.md to reflect the latest setup for running e2e tests in different scenarios. DiscussionIt appears that the cc @machichima |
apiserver/Makefile
Outdated
|
|
||
| .PHONY: start-local-apiserver ## Build and start apiserver from scratch. | ||
| start-local-apiserver: operator-image cluster load-operator-image deploy-operator install run | ||
| start-local-apiserver: operator-image cluster load-operator-image deploy-operator install |
There was a problem hiding this comment.
Some note here, as install will build and deploy the apiserver to cluster., we think that running the apiserver locally is not needed, as it is already on the cluster
If it could be inconsistency for readme, can we do that in this PR? |
No problem, I'll fix the docs in this PR. thanks! |
Signed-off-by: 江家瑋 <36886416+JiangJiaWei1103@users.noreply.github.com>
…angJiaWei1103/kuberay into improve-apiserver-e2e-test-dx
Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com>
Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com>
|
Hi @dentiny and @machichima, I've updated the documentations to reflect the latest API server setup. Please let me know if there's any problem. Thanks! |
| ``` | ||
|
|
||
| ### Install KubeRay Operator | ||
| #### Install KubeRay Operator |
There was a problem hiding this comment.
curious, why do we make kuberay operator installation a subsection for helm installation?
apiserver/DEVELOPMENT.md
Outdated
| 1. Install the KubeRay Operator into the cluster by running `make operator-image load-operator-image deploy-operator` | ||
| 2. Install the KubeRay API server into the cluster by running `make install` | ||
| 3. Verify the setup with a smoke test `curl localhost:31888` | ||
| * You should see a response like `{"code":5, "message":"Not Found"}` |
There was a problem hiding this comment.
The response with message "Not Found" is a bit confusing while it represent the connection is valid. Consider putting command like curl -I localhost:31888/healthz here, which provides a more informative response.
❯ curl -I localhost:31888/healthz
HTTP/1.1 200 OK
Date: Mon, 28 Apr 2025 14:36:35 GMT
apiserver/DEVELOPMENT.md
Outdated
| 3. Verify the setup with a smoke test `curl localhost:31888` | ||
| * You should see a response like `{"code":5, "message":"Not Found"}` | ||
|
|
||
| > Alternatively, you can simply run `make start-local-apiserver` to spin up the API server within the kind cluster in one single command. |
There was a problem hiding this comment.
Maybe we can add a small note here that if we modify the code for apiserver, the make install should be re-run?
Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com>
Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com>
Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com>
|
@JiangJiaWei1103 LGTM, Thanks! |
Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com>
…roject#3466) * refactor: Simplify the API server launch logic Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Polish help msg of local-e2e-test Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Structure apiserver installation with Helm Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Update the API server setup Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Run apiserver smoke test with a health check endpoint Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Add notes for rebuilding and reploying API server Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Teardown the existing API server deployment Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * fix: Solve md lint Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> --------- Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> Signed-off-by: 江家瑋 <36886416+JiangJiaWei1103@users.noreply.github.com>
…roject#3466) * refactor: Simplify the API server launch logic Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Polish help msg of local-e2e-test Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Structure apiserver installation with Helm Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Update the API server setup Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Run apiserver smoke test with a health check endpoint Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Add notes for rebuilding and reploying API server Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Teardown the existing API server deployment Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * fix: Solve md lint Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> --------- Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> Signed-off-by: 江家瑋 <36886416+JiangJiaWei1103@users.noreply.github.com>
…roject#3466) * refactor: Simplify the API server launch logic Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Polish help msg of local-e2e-test Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Structure apiserver installation with Helm Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Update the API server setup Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Run apiserver smoke test with a health check endpoint Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Add notes for rebuilding and reploying API server Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * docs: Teardown the existing API server deployment Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> * fix: Solve md lint Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> --------- Signed-off-by: jiangjiawei1103 <waynechuang97@gmail.com> Signed-off-by: 江家瑋 <36886416+JiangJiaWei1103@users.noreply.github.com>
Changes
runfrom thestart-local-apiservertargetlocal-e2e-testtarget by replacing multiple dependencies with a singlestart-local-apiservertargetWhy are these changes needed?
There are currently two ways to run API server e2e tests:
Run
make start-local-apiserverfollowed bymake e2e-testThis approach is useful during test development, allowing quick iterations without rebuilding the operator image, restarting the kind cluster, and redeploying the API server within the cluster.
Run
make local-e2e-testThis is a convenient all-in-one command for running the full e2e test workflow, including the cluster setup, running the e2e test, and tearing down the cluster.
However, the existing setup includes redundant dependencies that may confuse developers and make it harder to choose the best workflow. This PR streamlines the local e2e test process and improve the overall developer experience.
Related issue number
Closes #3384
Checks