-
Notifications
You must be signed in to change notification settings - Fork 83
test: Scale up and down the model server during an end to end test #354
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
base: main
Are you sure you want to change the base?
Conversation
8f159b3
to
22c5fa8
Compare
Signed-off-by: Shmuel Kallner <[email protected]>
Signed-off-by: Shmuel Kallner <[email protected]>
Signed-off-by: Shmuel Kallner <[email protected]>
Signed-off-by: Shmuel Kallner <[email protected]>
Signed-off-by: Shmuel Kallner <[email protected]>
Signed-off-by: Shmuel Kallner <[email protected]>
cd7e869
to
793c1de
Compare
}) | ||
|
||
ginkgo.When("Scaling up and down the model servers", func() { | ||
ginkgo.It("work should be distributed across all model servers", func() { |
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.
nit: if using ginkgo.It
the text should probably align with that...
ginkgo.It("work should be distributed across all model servers", func() { | |
ginkgo.It("should distribute inference requests across all model servers", func() { |
epp := createEndPointPicker(scaleConfig) | ||
|
||
prefillPods, decodePods := getModelServerPods(podSelector, prefillSelector, decodeSelector) | ||
gomega.Expect(prefillPods).Should(gomega.BeEmpty()) |
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.
when is the goal of validating that there are no prefill Pods?
Can it somehow fail and if so, how does a failure affect the test if at all?
scaleDeployment(modelServers, 1) | ||
|
||
scaledUpPrefillPods, scaledUpDecodePods := getModelServerPods(podSelector, prefillSelector, decodeSelector) | ||
gomega.Expect(scaledUpPrefillPods).Should(gomega.BeEmpty()) |
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.
ditto
gomega.Expect(scaledUpDecodePods).Should(gomega.HaveLen(2)) | ||
|
||
time.Sleep(time.Second) |
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.
might it be worthwhile to check that pods are in ready state and not rely on the 1s sleep?
Or maybe there's a different reason for sleeping...?
scaleDeployment(modelServers, -1) | ||
|
||
scaledDownPrefillPods, scaledDownDecodePods := getModelServerPods(podSelector, prefillSelector, decodeSelector) | ||
gomega.Expect(scaledDownPrefillPods).Should(gomega.BeEmpty()) |
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.
ditto
gomega.Expect(scaledDownDecodePods).Should(gomega.HaveLen(1)) | ||
gomega.Expect(scaledDownDecodePods[0]).Should(gomega.BeElementOf(scaledUpDecodePods)) | ||
|
||
time.Sleep(time.Second) |
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.
same. Expect on a condition (with Eventually...) would be quicker.
|
||
scale.Spec.Replicas += int32(increment) | ||
_, err = client.AppsV1().Deployments(nsName).UpdateScale(ctx, split[1], scale, v1.UpdateOptions{}) | ||
gomega.Expect(err).NotTo(gomega.HaveOccurred()) |
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.
the scale change can have succeeded but the replica count not have increased or the new pods not ready (or deleted) yet...
This PR adds a test to the end to tests.
In particular it adds a test in which:
Fixes: #347