Skip to content

Remove the onctl vm command group - #1172

Merged
cdalar merged 1 commit into
mainfrom
remove-vm-command
Oct 4, 2026
Merged

cdalar merged 1 commit into
mainfrom
remove-vm-command

Conversation

@cdalar

@cdalar cdalar commented Oct 4, 2026

Copy link
Copy Markdown
Owner

What

Removes onctl vm, a command group that only re-registered create, destroy, ls, ssh, pause, resume and restart β€” all of which already exist at the root.

Why

  • Cobra keeps a single parent per command, so the vm registration won: onctl create --help printed Usage: onctl vm create [flags] (same for the other six). It now prints onctl create [flags].
  • The group was incomplete (port-forward, images, deploy, action, import were root-only).
  • Nothing in docs, scripts, CI or tests referenced it.

Breaking

onctl vm <cmd> no longer works; use onctl <cmd>.

Testing

go build ./..., go vet ./cmd/ pass. go test ./... passes except TestReadConfig_NoConfigDirectory and TestCreateFlagsBindToViper, which fail identically on main on my machine because they pick up the real ~/.onctl config.

πŸ€– Generated with Claude Code

https://claude.ai/code/session_018VbxXEmRHo64NuJUPsyMuW

It only re-registered create, destroy, ls, ssh, pause, resume and
restart, which already exist at the root. Because cobra keeps one
parent per command, it also made 'onctl create --help' print
'onctl vm create' as the usage path.
@cdalar
cdalar enabled auto-merge (squash) October 4, 2026 21:56
@cdalar
cdalar merged commit fffefee into main Oct 4, 2026
12 checks passed
@codecov

codecov Bot commented Oct 4, 2026

Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 39.75%. Comparing base (5138508) to head (9ddc7f7).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1172      +/-   ##
==========================================
- Coverage   39.83%   39.75%   -0.08%     
==========================================
  Files          61       60       -1     
  Lines        6384     6376       -8     
==========================================
- Hits         2543     2535       -8     
  Misses       3841     3841              

β˜” View full report in Codecov by Harness.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

⌂ 捒网址