Skip to content

Commit ebde395

Browse files
sdminonneclaude
andcommitted
fix(nodepool): propagate osImageStream validation error to caller
The nilerr linter flagged that validateOSImageStream error was checked but the function returned nil instead of the error. Propagate the error to match the pattern used by other validation failures in the same function. Signed-off-by: Salvatore Dario Minonne <sminonne@redhat.com> Commit-Message-Assisted-by: Claude (via Claude Code) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e76b3f5 commit ebde395

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

hypershift-operator/controllers/nodepool/conditions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ func (r *NodePoolReconciler) validMachineConfigCondition(ctx context.Context, no
394394
Message: err.Error(),
395395
ObservedGeneration: nodePool.Generation,
396396
})
397-
return &ctrl.Result{}, nil
397+
return &ctrl.Result{}, fmt.Errorf("failed to validate osImageStream: %w", err)
398398
}
399399

400400
SetStatusCondition(&nodePool.Status.Conditions, hyperv1.NodePoolCondition{

hypershift-operator/controllers/nodepool/osstream_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1414
)
1515

16-
func TestGetRHELStream(t *testing.T) {
16+
func Test_getRHELStream(t *testing.T) {
1717
testCases := []struct {
1818
name string
1919
nodePool *hyperv1.NodePool

0 commit comments

Comments
 (0)