Skip to content

Commit

Permalink
Add RayJobSuccessRule
Browse files Browse the repository at this point in the history
Signed-off-by: Archit Kulkarni <[email protected]>
  • Loading branch information
architkulkarni committed Apr 11, 2023
1 parent 9654cd9 commit 23d5644
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/framework/prototype.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def assert_rule(self, custom_resource=None, cr_namespace='default'):
pod_exec_command(headpod_name, cr_namespace, f"ray job status {JOB_ID}")
logger.info("Checking RayJob status succeeded")
# Check that "succeeded" is in the output of the command.
assert "succeeded" in shell_subprocess_run(
assert "succeeded" in shell_subprocess_check_output(
f"kubectl logs {headpod_name} -n {cr_namespace} | grep {JOB_ID}")

class CurlServiceRule(Rule):
Expand Down
6 changes: 2 additions & 4 deletions tests/test_sample_rayjob_yamls.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
GeneralTestCase,
RayJobAddCREvent,
EasyJobRule,
RayJobSuccessRule
)

from framework.utils import (
Expand All @@ -32,10 +33,7 @@
{'path': filepath, 'name': filename, 'cr': k8s_object}
)
break
# TODO(architkulkarni): Add RayJobSuccessRule. Currently fails with the following error:
# Failed to start Job Supervisor actor: The name _ray_internal_job_actor_rayjob-sample-8tzrb
# (namespace=SUPERVISOR_ACTOR_RAY_NAMESPACE) is already taken.
rs = RuleSet([EasyJobRule()])
rs = RuleSet([EasyJobRule(), RayJobSuccessRule()])
image_dict = {
CONST.RAY_IMAGE_KEY: os.getenv('RAY_IMAGE', default='rayproject/ray:2.3.0'),
CONST.OPERATOR_IMAGE_KEY: os.getenv('OPERATOR_IMAGE', default='kuberay/operator:nightly'),
Expand Down

0 comments on commit 23d5644

Please sign in to comment.