Repository navigation
Conversation
The gpu-operator controller uses PATCH to perform updates to labels on a node. This change aligns the e2e test behaviour with that of the controller. Signed-off-by: Tariq Ibrahim <tibrahim@nvidia.com>
7ca8cef to
014e25b
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The node-label test helpers can proceed through normal checks; no merge-blocking issue was identified.
Comment |
| func (h *NodeClient) patchNodeLabels(ctx context.Context, nodeName string, nodeLabels map[string]any) error { | ||
| patch, err := json.Marshal(map[string]any{ | ||
| "metadata": map[string]any{ | ||
| "labels": nodeLabels, | ||
| }, | ||
| }) | ||
| if err != nil { | ||
| return fmt.Errorf("failed to build label patch: %w", err) | ||
| } | ||
|
|
||
| _, err = h.client.CoreV1().Nodes().Update(ctx, node, metav1.UpdateOptions{}) | ||
| _, err = h.client.CoreV1().Nodes().Patch(ctx, nodeName, types.MergePatchType, patch, metav1.PatchOptions{}) |
There was a problem hiding this comment.
|
After discussing this further with @kvalliyurnatt , we've decided that it may be a good idea to revisit our decision to use PATCH instead of UPDATE throughout the controller production code. I'll close this PR now. Thanks to everyone for their reviews! |
The gpu-operator controller uses PATCH to perform updates to labels on a node. This change aligns the e2e test behaviour with that of the controller.