Skip to content

fix(samples): tolerate missing worker groups in Ray kartas (v0.2) - #358

Open
AviadHayumi wants to merge 1 commit into
v0.2from
AviadHayumi/fix-ray-optional-worker-groups-v0.2
Open

AviadHayumi wants to merge 1 commit into
v0.2from
AviadHayumi/fix-ray-optional-worker-groups-v0.2

Conversation

@AviadHayumi

Copy link
Copy Markdown
Contributor

What does this PR do?

Backport of the Ray worker-groups hardening to the v0.2 line. On this branch the Ray definitions live as hand-written samples under docs/samples/ (the generated catalog does not exist here), so the change is applied to the three sample files directly.

Worker groups are optional in RayJob, RayCluster, and RayService, but the worker component iterated workerGroupSpecs[] unconditionally: a manifest without worker groups failed instance extraction with cannot iterate over: null, and an empty workerGroupSpecs list tripped the instance zip because the trailing // 1 yields a value even for an empty iteration.

The worker paths now iterate with []? and the replicas default moves inside the iteration ([]? | (.replicas // 1)) so it applies per group. Same change as #357 on main.

Verified with the v0.2 engine directly: the patched rayjob sample extracts the worker instance from a real manifest, and returns zero instances (instead of erroring) for both empty and absent worker groups. All 53 recorded e2e states (rayjob + raycluster) extract clean. make check green.

Related issue(s)

Fixes #356

Checklist

  • All commits are signed off with DCO (git commit -s)
  • New/modified files have SPDX license and copyright headers
  • Documentation updated (if applicable)
  • Tests pass (make check)
  • No proprietary or internal information included

…port)

Worker groups are optional in RayJob, RayCluster, and RayService, but
the worker component paths in the Ray samples iterated
workerGroupSpecs unconditionally. A manifest without worker groups
failed instance extraction with a JQ iteration error on null, and an
empty list produced a phantom replicas value that failed the instance
zip.

Use error-suppressed iteration ([]?) for the worker paths and move the
replicas default inside the iteration so it applies per group. Same
change as the main-branch catalog fix, applied to the v0.2 sample
definitions.

Signed-off-by: aviadh <aviad.hayumi@gmail.com>
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.

1 participant