Conversation
Greptile SummaryThis PR fixes the DRA provider's node-matching logic to use the
Confidence Score: 5/5Safe to merge — the change is logically correct, backward-compatible for clusters where node names equal instance IDs, and accompanied by a meaningful integration test. The annotation-based lookup is implemented cleanly with an explicit guard for missing/empty annotations, and the interface upgrade to kubernetes.Interface is a well-established testability improvement. The new test exercises exactly the divergence case that motivated the fix. The only nuance is that GetNodeAnnotations still writes the K8s node name as the instance annotation, so clusters where node names differ from cloud instance IDs must set the annotation through another mechanism — but that is an upstream concern outside this PR's scope. No files require special attention. Important Files Changed
Reviews (4): Last reviewed commit: "fix(provider/dra): match nodes by annota..." | Re-trigger Greptile |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #405 +/- ##
==========================================
+ Coverage 72.15% 73.59% +1.44%
==========================================
Files 89 94 +5
Lines 5689 6272 +583
==========================================
+ Hits 4105 4616 +511
- Misses 1382 1410 +28
- Partials 202 246 +44 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
36ef80a to
23561d5
Compare
|
🌿 Preview your docs: https://nvidia-preview-pull-request-405.docs.buildwithfern.com/topograph |
Signed-off-by: Dmitry Shmulevich <dshmulevich@nvidia.com>
ArangoGutierrez
left a comment
There was a problem hiding this comment.
Correct fix — DRA was the last provider still joining on node.Name, and the new test genuinely discriminates it (node name differs from the instance ID). One optional diagnostic suggestion below.
- A clique-labeled node missing this annotation is now skipped silently. The sibling join sites warn on the same skip — internal/k8s/utils.go and engines/slinky/engine.go both do
klog.Warningf("missing %q annotation in node %s", ...), and #379 added exactly this diagnostic to the structurally identical clique+annotation loop in Slinky. A klog.Warningf before the continue would restore that signal; otherwise a not-yet-annotated node disappears with no trace, since the BadGateway error only fires when every node is skipped. (pkg/providers/dra/provider.go:113)
| if host, ok := i2n[node.Name]; ok { | ||
| domainMap.AddHost(clusterID, node.Name, host) | ||
| instanceID, ok := node.Annotations[topology.KeyNodeInstance] | ||
| if !ok || instanceID == "" { |
There was a problem hiding this comment.
A clique-labeled node missing this annotation is now skipped silently. The sibling join sites warn on the same skip — internal/k8s/utils.go and engines/slinky/engine.go both do klog.Warningf("missing %q annotation in node %s", ...), and #379 added exactly this diagnostic to the structurally identical clique+annotation loop in Slinky. A klog.Warningf before the continue would restore that signal; otherwise a not-yet-annotated node disappears with no trace, since the BadGateway error only fires when every node is skipped.
No description provided.