feat(workspace): add down alias for workspace delete - #1215
Conversation
✅ Deploy Preview for images-devsy-sh canceled.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe workspace delete command now supports ChangesWorkspace delete alias
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The new workspace down alias is consistent with the existing delete behavior and is ready to merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Deploy Preview for devsydev canceled.
|
Add 'down' as an alias for 'devsy workspace delete' to match common Docker Compose mental models without changing existing teardown semantics. - Register 'down' in DeleteCmd.Aliases - Extract aliasDown and aliasRm constants to satisfy goconst - Update Long description noting full Devsy teardown and Compose down mapping - Add CLI contract tests for alias registration, command resolution, help text, and shell completion - Update documentation in stop-and-delete-a-workspace.mdx Closes #1211
02b718c to
36d3ae1
Compare
|
Tick the box to add this pull request to the merge queue (same as
|
Summary
Implements
devsy workspace downas an alias of the canonicaldevsy workspace deletecommand following the design in #1211.Motivation
Users familiar with Docker Compose often expect
devsy workspace downas the inverse ofdevsy workspace up. Devsy's compose-backed teardown already executes Docker Composedown, whileworkspace stopowns reversible suspension semantics. Addingdownas an exact Cobra alias ofworkspace deletealigns ergonomics with user mental models without introducing unnecessary lifecycle or state divergence.Changes
CLI Alias & Command Description (
cmd/workspace/delete.go):"down"todeleteCmd.Aliases([]string{"rm", "down"}).deleteCmd.Longto clarify thatdownandrmperform the same full Devsy workspace teardown, noting Docker/Podman Composedownbehavior for Compose-backed workspaces.CLI Contract Tests (
cmd/workspace/delete_test.go):TestDeleteCmd_Aliases: Assertsrmanddownare registered aliases.TestDeleteCmd_Resolution: Assertsdelete,rm,down, anddown <workspace>resolve to the canonicaldeletecommand.TestDeleteCmd_HelpExposesDownAlias: Asserts command help output exposesdownandrmunderAliases:.TestDeleteCmd_Completion: Asserts generated shell completion suggestions includedown.Documentation (
sites/docs-devsy-sh/content/docs/developing-in-workspaces/stop-and-delete-a-workspace.mdx):devsy workspace downunder Stop or Delete a Workspace, clarifying its relationship withdeleteandstop.Verification
go test -v -run '^TestDeleteCmd' ./cmd/workspacegolangci-lint fmtandgofmtgolangci-lint run --fast-onlycoderabbit reviewreported no findings (0 issues across all 3 files)Closes #1211
Summary by CodeRabbit
devsy workspace rmanddevsy workspace downas aliases for fully deleting a workspace.devsy workspace downcommand, including its teardown behavior and Compose volume handling.devsy workspace stoppreserves workspace configuration and state for later restart.