<#7607 [BUG] Flyte v2 bug: RayJob name exceeds Kub...
# flyte-github
a
#7607 [BUG] Flyte v2 bug: RayJob name exceeds KubeRay's 47-char limit for nested (sub-action) Ray tasks Issue created by evan-sadler I ran into an issue with ray task nested inside a regular task. Claude says it found the bug in the source code and "fixed" it, so wanted to surface since it could be real. Claude description Flyte v2 bug: RayJob name exceeds KubeRay's 47-char limit for nested (sub-action) Ray tasks TL;DR When a Ray task runs as a sub-action (i.e. it is launched from a parent workflow/driver task rather than being the root action), Flyte's backend names the KubeRay
RayJob
object
{run}-{action}-{attempt}
. With the default auto-generated run name (20 chars) and a sub-action name (a fixed 25-char hash), the assembled name is 48 chars, which KubeRay rejects:
Copy code
The RayJob metadata is invalid flyte/rqfn7vfrdp9j84q86stm-a0d7xyznuli5is847rvhzlkly-0: RayJob name should be no more than 47 characters
This causes the task to hang forever. Environment | Flyte SDK | flyte 2.5.4 | | -------------- | ---------------------------------------------------------------------------- | | Ray plugin | flyteplugins-ray 2.5.4 | | Cluster | sandbox-uc1 (org sandbox-uc1-flyte, project flytesnacks, domain development) | | Ray operator | KubeRay (RayJob CRD) | | Repro workflow | src/orthlyml/mlops/flyte/examples/ray_example.py | Code ``python @ray_env.task def ray_square_task(n: int = 10) -> list[int]: """Pure Ray compute: square ``0..n-1`` on the Ray cluster and return the results.""" futures = [_square.remote(i) for i in range(n)] return ray.get(futures) @env.task def sum_list(values: list[int]) -> int: """Sum ``values`` (plus 1, just to make the reduce non-trivial).""" return sum(values) + 1 @env.task def ray_workflow(n: int = 10) -> int: """Driver/entrypoint: square ``0..n-1`` on Ray, then reduce once.""" squares = ray_square_task(n=n) return sum_list(values=squares) ``` ``` flyteorg/flyte