Repository navigation
Closed
Labels
effort/xsTrivial / one-linerTrivial / one-linerimpact/internalTeam-internal onlyTeam-internal onlypriority/p3Polish / idea / may never shipPolish / idea / may never shipseverity/lowMinor harmMinor harmtriagedItem has been triagedItem has been triagedtype/choreMaintenance / non-user-visibleMaintenance / non-user-visibleurgency/eventuallyNo deadlineNo deadline
Description
Context
golangci-lint (with errcheck.check-blank: true) flags every _, _ := reader.ReadString('\n') / _, _ := f() site in the configure wizards. Most of these sites pre-date PR #1279, which only patched the four sites it introduced (commit a526f1a). The Lint Code job stays failing on main because of the remaining sites — they need a sweep.
Memory entries that this touches:
feedback_no_silent_fallbacks.md— return an explicit error rather than discarding it.
Pre-existing sites (file:line:column at PR #1279 HEAD a526f1a)
cmd/configure_azure.go
380:18—azureStepListSubscriptions:subscriptionID, _ := reader.ReadString('\n')493:10—promptAndRunExplicitCommand:choice, _ := reader.ReadString('\n')529:13—executeExplicitCommand:response, _ := reader.ReadString('\n')
cmd/configure_gcp.go
186:14—getGCPCredentialsFilePath:credsFile, _ = reader.ReadString('\n')563:13—gcpStepSelectProject:projectID, _ := reader.ReadString('\n')701:10—promptAndRunGCPCommand:choice, _ := reader.ReadString('\n')736:13—executeGCPCommand:response, _ := reader.ReadString('\n')
(All seven existed on main before PR #1279; same shape, only the line numbers shifted with that PR.)
Acceptance
- All seven
reader.ReadStringsites surface the error per the same pattern PR refactor(configure): replace az/gcloud CLI shell-outs with native SDK calls #1279 already used for its four sites:choice, err := reader.ReadString('\n'); if err != nil { return ..., fmt.Errorf("failed to read ...: %w", err) }. golangci-lint run ./cmd/...passes (or at least theerrchecklines for these files drop to zero).- Existing wizard tests still pass; no behaviour change beyond "interactive flow fails loud on closed stdin instead of running the default action".
Out of scope
- The broader
errchecksweep acrossinternal/api/*,internal/auth/*,internal/mocks/*etc. that the same lint run reports — those are independent of the configure wizards and should be tracked in a separate sweep issue if not already.
Metadata
Metadata
Assignees
Labels
effort/xsTrivial / one-linerTrivial / one-linerimpact/internalTeam-internal onlyTeam-internal onlypriority/p3Polish / idea / may never shipPolish / idea / may never shipseverity/lowMinor harmMinor harmtriagedItem has been triagedItem has been triagedtype/choreMaintenance / non-user-visibleMaintenance / non-user-visibleurgency/eventuallyNo deadlineNo deadline
Activity
cristim commentedon Jul 27, 2026
Verification sweep against
main(101f099fb) on 2026-07-27 finds this already resolved.Every reader.ReadString call site now checks its error.
Evidence: commit 86a385a, plus the SDK-migration series.
Recommending close.
cristim commentedon Sep 2, 2026
Verified resolved at 3c0f8ac: all reader.ReadString sites in the configure wizards bind and check err; configure_azure.go funnels every prompt through readTrimmedLine, which returns the error (tolerating io.EOF only when a final unterminated line carried data), and the three configure_gcp.go prompts each wrap the error with fmt.Errorf. Evidence: cmd/configure_gcp.go:661,695,731 and cmd/configure_azure.go:44 (86a385a). Residual axes checked: grepped cmd/ for the blank-discard forms
, _ := readerand, _ = readerand for every ReadString call including cmd/helpers.go:221 - all check err; the only remaining_ =sites in configure_gcp.go are deferred f.Close and os.Remove on the key-write rollback path, which are not read errors. Closing as completed; reopen if the behaviour recurs.