-
Notifications
You must be signed in to change notification settings - Fork 69
Adds Initial e2e Tests and Tooling #217
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
Conversation
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
This is great!
One concern I have is that we are coding a lot of things that could have been done easier with kubectl and a shell script, specifically: deploying the crds, the envoy proxy and the epp. What I am thinking is that why not have a script that deploys everything as described in our guide, then in go we verify that everything is up and running (via a BeforeSuite
) and runs the test client.
There are a couple of advantages to this approach:
- significantly simplify the golang code
- reduce duplication since we will be reusing the manifests we have for the user guide
- practically this e2e test is a test for the guide as well!
what do you think?
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danehans The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
pkg/README.md
Outdated
|
||
```sh | ||
kubectl apply -f config/crd/bases | ||
Replace `$HF_TOKEN` in `./manifests/vllm/deployment.yaml` with your Hugging Face secret and then deploy the sample vLLM deployment. |
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.
This step was updated since the e2e test suite now deploys vLLM test infra resources from this manifest by:
- Reading the manifest file into memory
- Reading the
HF_TOKEN
env var - Replacing
$HF_TOKEN
with theHF_TOKEN
env var in the in-memory manifest - Deploying the resources
```bash | ||
kubectl apply -f ./manifests/inferencepool-with-model.yaml | ||
kubectl apply -f ./manifests/inferencemodel.yaml | ||
``` |
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.
Note that the InferencePool CR is now part of the ext-proxy deployment. The InferenceModel had to be split from the InferencePool since e2e tests will create InferenceModels for each test case. The InferenceModel could have its own manifest but IMHO it makes sense to bundle with the ext-proc since the ext-proc is specifically configured for this InferencePool.
|
||
1. **Deploy Ext-Proc** | ||
1. **Deploy the Inference Extension and InferencePool** |
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.
As I mentioned above, the InferencePool is now bundled with the ext-proc since the ext-proc is specifically configured for this pool.
pkg/manifests/vllm/deployment.yaml
Outdated
labels: | ||
app: vllm | ||
stringData: | ||
token: $HF_TOKEN |
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.
e2e will replace this variable and the POC instructions have been updated accordingly.
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 should have this Secret resource in a separate yaml so that the guide doesn't require the user to clone the repo to test it out.
@ahg-g I updated the e2e test suite to use a "golden manifest" approach. This approach provides the following benefits:
|
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.
This is awesome, can we add a readme how to run this test manually pls?
pkg/manifests/vllm/deployment.yaml
Outdated
labels: | ||
app: vllm | ||
stringData: | ||
token: $HF_TOKEN |
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 should have this Secret resource in a separate yaml so that the guide doesn't require the user to clone the repo to test it out.
Signed-off-by: Daneyon Hansen <[email protected]>
Signed-off-by: Daneyon Hansen <[email protected]>
Signed-off-by: Daneyon Hansen <[email protected]>
Signed-off-by: Daneyon Hansen <[email protected]>
Amazing! /lgtm |
Adds initial e2e tests and tooling. The e2e tests can be run by using the
test-e2e
target. The "HF_TOKEN" environment variable must be set to your Hugging Face access token (with access to Llama2 model) before running the tests.api/v1alpha1/inferencemodel_types.go
andapi/v1alpha1/inferencepool_types.go
: Adds constants to define resource and kind.pkg/crd/install.go
: Adds public function for installing CRDs. Used by e2e suite to setup test infra.pkg/crd/install_test.go
andpkg/crd/mocks/mock_client.go
: Adds unit tests and mock client forInstallCRDs
function.test/consts/consts.go
: Defines constants used by tests.test/e2e/e2e_suite_test.go
: Creates initial test suite, test infra, utility functions, etc.test/e2e/e2e_test.go
: Adds initial e2e test by creating an InferenceModel and ensuring that requests are properly load balanced across the target models.test/utils/resources.go
: Utility functions for managing Kubernetes resources used for e2e tests.test/utils/utils.go
: Provides utility functions for working with test resources.test/utils/wrappers.go
: Provides wrappers for working with test resources.Fixes #77