worker groups are optional in RayJob , RayCluster and RayService , but the worker component in their kartas iterates workerGroupSpecs[] unconditionally. two legal manifests break instance extraction:
- no workerGroupSpecs at all ( head only RayJob ) - every worker path fails with
JQ execution error ... cannot iterate over: null and the whole extraction fails
- workerGroupSpecs: [] - iteration is fine , but replicasPath ends with
// 1 , and in jq an empty stream // 1 still yields 1. so we get one replicas result for zero instance ids and the zip fails with instance ids count (0) does not match results count (1)
expected: a worker component with no worker groups extracts zero instances , not an error

to reproduce: load docs/catalog/ray-io-rayjob-v1.yaml , build a component factory over a RayJob that only has headGroupSpec , and call GetExtractedInstances on the worker component
worker groups are optional in RayJob , RayCluster and RayService , but the worker component in their kartas iterates workerGroupSpecs[] unconditionally. two legal manifests break instance extraction:
JQ execution error ... cannot iterate over: nulland the whole extraction fails// 1, and in jq an empty stream// 1still yields 1. so we get one replicas result for zero instance ids and the zip fails withinstance ids count (0) does not match results count (1)expected: a worker component with no worker groups extracts zero instances , not an error
to reproduce: load docs/catalog/ray-io-rayjob-v1.yaml , build a component factory over a RayJob that only has headGroupSpec , and call GetExtractedInstances on the worker component