fix(samples): tolerate missing worker groups in Ray kartas (v0.2) - #358
Open
AviadHayumi wants to merge 1 commit into
Open
AviadHayumi wants to merge 1 commit into
AviadHayumi wants to merge 1 commit into
Conversation
…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>
AviadHayumi
requested review from
Isan-Rivkin,
rogirun,
ronlv10,
shaked-bouktus and
yuval-gr
as code owners
September 10, 2026 06:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 withcannot iterate over: null, and an emptyworkerGroupSpecslist tripped the instance zip because the trailing// 1yields 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 checkgreen.Related issue(s)
Fixes #356
Checklist
git commit -s)make check)