-
Notifications
You must be signed in to change notification settings - Fork 549
[Feat] Add e2e test for applying ray-job.interactive-mode.yaml
#3779
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
@@ -2,7 +2,6 @@ apiVersion: ray.io/v1 | |||
kind: RayJob | |||
metadata: | |||
name: rayjob-interactive-mode | |||
namespace: default |
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.
Remove this to allow E2E to be assigned to other namespaces.
Hi @MortalHappiness PTAL |
// There is not deployment in `ray-job.interactive-mode.yaml`, so we skip the deployment status check for this yaml file. | ||
if tt.name != "ray-job.interactive-mode.yaml" { | ||
g.Eventually(RayJob(test, namespace.Name, rayJobFromYaml.Name), TestTimeoutMedium).Should(WithTransform(RayJobDeploymentStatus, Equal(rayv1.JobDeploymentStatusComplete))) | ||
g.Eventually(RayJob(test, namespace.Name, rayJobFromYaml.Name), TestTimeoutMedium).Should(WithTransform(RayJobStatus, Equal(rayv1.JobStatusSucceeded))) | ||
} |
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 it's better to add a separate test for ray-job.interactive-mode.yaml
instead of mixing it with other tests. Otherwise if there are some other special cases for other yaml files in the future, we need to create a lot of if-else.
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.
OK, no problem
|
||
g.Eventually(RayJob(test, namespace.Name, rayJobFromYaml.Name), TestTimeoutMedium).Should(WithTransform(RayJobDeploymentStatus, Equal(rayv1.JobDeploymentStatusComplete))) |
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.
why remove this?
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 removed the wrong code, sorry about this.
|
||
g.Eventually(RayJob(test, namespace.Name, rayJobFromYaml.Name), TestTimeoutMedium).Should(WithTransform(RayJobStatus, Equal(rayv1.JobStatusSucceeded))) |
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.
why remove this?
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 removed the wrong code, sorry about this.
} | ||
g.Eventually(WorkerPods(test, rayCluster), TestTimeoutShort).Should(HaveLen(int(desiredWorkerPods))) | ||
g.Expect(GetRayCluster(test, namespace.Name, rayCluster.Name)).To(WithTransform(RayClusterDesiredWorkerReplicas, Equal(desiredWorkerPods))) | ||
rayCluster := checkRayJobCluster(test, g, tt.name) | ||
|
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.
// Check if the head pod is ready
g.Eventually(HeadPod(test, rayCluster), TestTimeoutShort).Should(WithTransform(IsPodRunningAndReady, BeTrue()))
// Check if all worker pods are ready
g.Eventually(WorkerPods(test, rayCluster), TestTimeoutShort).Should(WithTransform(AllPodsRunningAndReady, BeTrue()))
this is duplicate with checkRayJobCluster
.
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 copied the wrong code, sorry about this.
fix: remove default namespace fix: rayjob no deployment in yaml refacator: separate to two type of testcase fix: wrong copy code
6f33699
to
51cb45f
Compare
ray-job.interactive-mode.yaml
ray-job.interactive-mode.yaml
Hi @MortalHappiness, I have changed the description and title for this pr |
rayJob, err = GetRayJob(test, rayJob.Namespace, rayJob.Name) | ||
g.Expect(err).NotTo(HaveOccurred()) | ||
g.Expect(rayJob).NotTo(BeNil()) | ||
func TestRayJobMode(t *testing.T) { |
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.
func TestRayJobMode(t *testing.T) { | |
func TestRayJobInteractiveMode(t *testing.T) { |
…) (#3787) Co-authored-by: Cheyu Wu <[email protected]>
Why are these changes needed?
There is no testing for ray-job.interactive-mode.yaml
Manual testing
Related issue number
Closes #3778
Checks