fix: don't block Trainer deletion when runtime CRDs are absent #106
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 243 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.329
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #106"
general
weight: 0.35
abhijeet-dhumal
Summary
A Trainer CR created while the JobSet operator is missing can never be deleted: the cleanup finalizer fails with
NotFoundwhen listing the upstream runtime CRDs, which were never installed because rendering never ran.ClusterTrainingRuntimes/TrainingRuntimesas "nothing to clean up" and continue, so the finalizer is removed.Fixes RHAI-16473.
Root cause
checkDependenciesaborts the reconcile beforerenderManifests, so the upstream trainer CRDs are not installed. The framework still adds the finalizer before actions run. On delete,removeRuntimeFinalizerslisted the missing GVRs and returned the 404, leaving the CR stuck inTerminatingindefinitely.Test plan
make test— all packages passDegraded=True,JobSetCRDNotFound) → deleted in <5s after the fix (previously stuck indefinitely)🤖 Generated with Claude Code
[RHAI-16473]: https://redhat.atlassian.net/browse/RHAI-16473?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Finalizer cleanup now continues if either training runtime API is unavailable. Other errors encountered while listing runtime resources are still reported, so cleanup does not silently ignore them.
Tests
Added coverage confirming that unavailable APIs do not stop cleanup and that other listing errors are propagated with context.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->