-
Notifications
You must be signed in to change notification settings - Fork 430
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
[RayCluster][CI] add e2e tests for RayClusterStatusCondition #2661
[RayCluster][CI] add e2e tests for RayClusterStatusCondition #2661
Conversation
d3b8b47
to
13a3cf8
Compare
@@ -26,7 +26,8 @@ spec: | |||
containers: | |||
- command: | |||
- /manager | |||
# args: | |||
args: | |||
- --feature-gates=RayClusterStatusConditions=true |
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.
We need this to make buildkite/ray-ecosystem-ci-kuberay-ci/test-sample-yamls-nightly-operator buildkite/ray-ecosystem-ci-kuberay-ci/test-sample-yamls-latest-release, where the feature gate is not enabled by default (v1.2), to pass.
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.
Isn't that using nightly build though? Nightly build should have this feature gate enabled by default at this point?
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.
Oh, I copied the wrong link. I should mean this one buildkite/ray-ecosystem-ci-kuberay-ci/test-sample-yamls-latest-release
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.
ah I see, makes sense. Can you add a comment that we can remove this once v1.3 is released?
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.
Sorry for the confusion. The nightly build has this feature gate enabled by default. But in test-sample-yamls-latest-release, we have v1.2 operator where the feature gate is not enabled by 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.
ah I see, makes sense. Can you add a comment that we can remove this once v1.3 is released?
Yes. The comment is added.
Hi @andrewsykim, please take a look. Thanks. |
@@ -26,7 +26,8 @@ spec: | |||
containers: | |||
- command: | |||
- /manager | |||
# args: | |||
args: | |||
- --feature-gates=RayClusterStatusConditions=true |
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.
ah I see, makes sense. Can you add a comment that we can remove this once v1.3 is released?
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.
Nice
ray-operator/test/support/yaml.go
Outdated
t.T().Helper() | ||
kubectlCmd := exec.CommandContext(t.Ctx(), "kubectl", "create", "quota", namespace, "-n", namespace, quota) | ||
err := kubectlCmd.Run() | ||
assert.NoError(t.T(), err) |
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.
assert.NoError
does not fail immediately; the error is only printed after the test finishes and "Successfully applied quota %s in %s"
will always be printed no matter the command succeed or not. Should we make it fail fast?
ray-operator/test/support/yaml.go
Outdated
t.T().Helper() | ||
kubectlCmd := exec.CommandContext(t.Ctx(), "kubectl", "delete", "--all", "pods", "-n", namespace) | ||
err := kubectlCmd.Run() | ||
assert.NoError(t.T(), err) |
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
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.
Good catch! I replaced all assert
with require
which will fail fast in the yaml.go
file. I can file a PR to replace all assert
usages with require
throughout the entire project if needed.
can you fix the conflict? |
Signed-off-by: Rueian <[email protected]>
Signed-off-by: Rueian <[email protected]>
Signed-off-by: Rueian <[email protected]>
Signed-off-by: Rueian <[email protected]>
dd39cfb
to
8738874
Compare
Hi @kevin85421, the conflict came from https://github.com/ray-project/kuberay/pull/2660/files#r1887796931 where the Right now the conflict is resolved by using the |
I don't have any preference. |
ray-operator/test/support/yaml.go
Outdated
if err != nil { | ||
t.T().Fatalf("Failed to apply %s to namespace %s: %v", filename, namespace, err) | ||
} | ||
require.NoError(t.T(), err) |
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 err
is not very informative. From what I recall, it seems like just something similar to "exit 1".
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.
Updated. Manual error messages have been added to require.NoError()
calls.
Signed-off-by: Rueian <[email protected]>
Why are these changes needed?
Continue #2645.
This PR adds e2e tests for the
HeadPodReady
,RayClusterProvisioned
, andReplicaFailure
status conditions.Related issue number
Checks