fix: report unmatched RayJob deletion rules - #5221
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 16a2b48. Configure here.
| jobStatus: FAILED | ||
| ttlSeconds: 90 | ||
| jobDeploymentStatus: Failed | ||
| ttlSeconds: 90 |
There was a problem hiding this comment.
Sample YAML misplaces ttlSeconds field
Medium Severity
On the Failed deletion rules, ttlSeconds is a sibling of condition rather than nested inside it. DeletionRule has no ttlSeconds field, so the API server drops those values and condition.ttlSeconds defaults to 0. Failed jobs then skip the documented 30/60/90-second staged cleanup and immediately run the most impactful overdue rule, DeleteSelf.
Reviewed by Cursor Bugbot for commit 16a2b48. Configure here.
|
Fixed in follow-up commit d5fbb7b: the Failed deletion-rule ttlSeconds values are now nested under condition, so the staged 30/60/90-second cleanup behavior in the sample is preserved. |


Why are these changes needed?
When a terminal RayJob status matches no configured deletion rule, the controller currently logs the same success message as a fully processed rule set and takes no cleanup action. This can leave the RayCluster and RayJob resources behind without a visible signal, for example when
activeDeadlineSecondssetsjobDeploymentStatus=FailedwhilejobStatusremainsRUNNING.This change:
jobDeploymentStatus: Failedfor failure cleanup, covering infrastructure failures as well as application failures.Deletion behavior is unchanged for matching rules.
Related issue number
Fixes #5184
Labels
doc-updates-requiredlabel.breaking-changelabel.Checks
Validated locally:
go test ./controllers/ray -run '^TestHandleDeletionRulesReportsUnmatchedTerminalStatus$' -count=1go vet ./controllers/ray/...gofmton changed Go filesgit diff --check