You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(pro): split start command by concern - #1548
Move uninstall and its helpers (runHelmUninstall, cleanupProResources, deleteRemainingAgentResources, resolveReleaseName, deleteIgnoreNotFound) and deleteUser out of cmd/pro/start.go into cmd/pro/start_uninstall.go.
uninstall now takes a uninstallTarget{kubeContext, namespace} struct instead of two strings, to satisfy the 4-argument limit. The two callers in start.go (prepareKubernetes, prepareInstall) are updated; behaviour is unchanged.
The helm flag literals in runHelmUninstall use the new helmKubeContextFlag and helmNamespaceFlag constants.
start.go goes from 1753 to 1572 lines. Login and ingress/admin-password code stay in start.go.
Why
start.go mixes uninstall, login, and install concerns. Splitting out uninstall gives it one file. Login was dropped from this PR because moving it made new gosec findings (G117, G402) show as new code. Those findings are pre-existing and must not be suppressed here.
Validation
mise run cli:format: clean
mise run cli:lint:ci: 0 issues
golangci-lint run --new-from-rev=origin/main ./cmd/pro/...: 0 issues
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 11 minutes.
Auto-refactor: not merged. CI is green on c37fe64, but the CodeRabbit GitHub review never ran (status "Review rate limited" after 3 requests, ~2.5h). Review gate unmet; needs a human, or re-request CodeRabbit once the free limit resets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
uninstalland its helpers (runHelmUninstall,cleanupProResources,deleteRemainingAgentResources,resolveReleaseName,deleteIgnoreNotFound) anddeleteUserout ofcmd/pro/start.gointocmd/pro/start_uninstall.go.uninstallnow takes auninstallTarget{kubeContext, namespace}struct instead of two strings, to satisfy the 4-argument limit. The two callers instart.go(prepareKubernetes,prepareInstall) are updated; behaviour is unchanged.runHelmUninstalluse the newhelmKubeContextFlagandhelmNamespaceFlagconstants.start.gogoes from 1753 to 1572 lines. Login and ingress/admin-password code stay instart.go.Why
start.gomixes uninstall, login, and install concerns. Splitting out uninstall gives it one file. Login was dropped from this PR because moving it made new gosec findings (G117, G402) show as new code. Those findings are pre-existing and must not be suppressed here.Validation
mise run cli:format: cleanmise run cli:lint:ci: 0 issuesgolangci-lint run --new-from-rev=origin/main ./cmd/pro/...: 0 issuesgo build ./...: okgo test ./cmd/pro/...: okCodeRabbit CLI
coderabbit review --agent --committedonc37fe642a: completed, 0 findings, 2 files reviewed.Auto-merge
Draft only. Not merged. Needs human review because
uninstall's signature changed (args bundled into a struct), so this is not a pure move.