Skip to content

[RayService][Test] create curl pod waiting until running #3740

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fscnick
Copy link
Contributor

@fscnick fscnick commented Jun 3, 2025

Why are these changes needed?

CreateCurlPod need to wait for pod is ready and running. put the waiting logic inside the function for easier to use.

Related issue number

Close #3613

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

Comment on lines +54 to +73
func IsPodRunningAndReady(pod *v1.Pod) bool {
if pod.Status.Phase != v1.PodRunning {
return false
}
for _, condition := range pod.Status.Conditions {
if condition.Type == v1.PodReady && condition.Status == v1.ConditionTrue {
return true
}
}
return false
}

func AllPodsRunningAndReady(pods []v1.Pod) bool {
for _, pod := range pods {
if !IsPodRunningAndReady(&pod) {
return false
}
}
return true
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move these two support functions from sampleyaml/support.go to here because of cyclic imports.

@fscnick fscnick force-pushed the create-curl-pod-wait-until-running branch from 25d4fa9 to 7004d56 Compare June 3, 2025 17:21
@fscnick fscnick force-pushed the create-curl-pod-wait-until-running branch from 7004d56 to 1df9cae Compare June 4, 2025 00:22
@fscnick fscnick marked this pull request as ready for review June 4, 2025 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update CreateCurlPod to include the logic to wait until it is running and ready
3 participants