SWE-rebench leaderboard — July 2026 task
harbor run -t ibragim-badertdinov/kubernetes-sigs__kueue-11619harbor download ibragim-badertdinov/kubernetes-sigs__kueue-11619Standalone elastic RayCluster self-updates raycluster-generation annotation What happened:
A standalone Kueue-managed elastic RayCluster is continuously updated by Kueue.
The kueue.x-k8s.io/raycluster-generation annotation tracks the RayCluster's own metadata.generation, but remains one value behind. For example:
metadata.generation: 273390
kueue.x-k8s.io/raycluster-generation: "273389"
A later read showed the same pattern:
metadata.generation: 273462
kueue.x-k8s.io/raycluster-generation: "273461"
Kueue logs showed repeated RayCluster reconciles followed by RayCluster update webhook calls from the Kueue controller manager.
This is a self-triggered loop in the RayCluster custom annotation path. For standalone RayClusters, GetCustomAnnotations calls GetWorkloadslicingRayClusterCustomAnnotations(ctx, c, j.Object(), podSets, j.Name). That helper fetches the same RayCluster and returns the fetched RayCluster generation as an annotation to write back onto the RayCluster. The metadata patch then advances the RayCluster generation, making the annotation stale again.
What you expected to happen:
Kueue should not continuously patch a standalone elastic RayCluster when its replica counts have not changed.
The raycluster-generation annotation is useful for RayJob and RayService, where the top-level object needs to account for an underlying RayCluster generation. A standalone RayCluster should not write its own generation back onto itself.
How to reproduce it (as minimally and precisely as possible):
ElasticJobsViaWorkloadSlices=true.metadata:
annotations:
kueue.x-k8s.io/elastic-job: "true"
labels:
kueue.x-k8s.io/queue-name: <local-queue>
kubectl get raycluster.ray.io <name> -n <namespace> \
-o jsonpath='{.metadata.generation}{"\t"}{.metadata.annotations.kueue\.x-k8s\.io/raycluster-generation}{"\n"}'
Anything else we need to know?:
This may be related to #10160, which added generation-based elastic workload names on the release-0.16 branch.
A fix is to omit kueue.x-k8s.io/raycluster-generation when the jobObject is the same standalone RayCluster as rayClusterName.
Environment:
kubectl version):
git describe --tags --dirty --always):
kueue:v0.16.5kueue-0.16.5cat /etc/os-release): not collecteduname -a): not collectedElasticJobsViaWorkloadSlices=trueTopologyAwareScheduling=falseNo new interfaces are introduced.