feat(tpagectl): implement deployment command group #562

Merged
fuzzy merged 3 commits from feat/cli-deployment into main 2026-08-06 02:25:44 +00:00
Owner

What

Adds the deployment command group to tpagectl, starting Phase 3 deployment management.

  • New internal/tpagectl/deployment package with a deployment parent command registering four subcommands: list, get, promote, and rollback.
  • Each subcommand renders full --help/usage documentation describing its intended flags (e.g. list takes a site name with --limit/--format; get uses --site + --version or --latest; promote uses --site + --version; rollback uses --site + optional --to-version with confirmation/--force).
  • Subcommand actions return a clear not implemented yet error; real logic lands with their own roadmap issues (#200, #204, #209, #214).
  • Root command registers the deployment group alongside site.

Why

Phase 3 roadmap task #194. Establishes the deployment command scaffolding so subcommand implementation issues land as focused PRs with clean diffs (one file per subcommand).

Testing

  • Unit tests: parent has the 4 expected subcommands; each has non-empty usage/description; stub invocation returns errNotImplemented
  • Wiring tests: root help lists deployment; deployment --help lists all subcommands; individual subcommand help renders
  • go test -race ./... passes (18 packages)
  • golangci-lint run clean
  • pre-commit hooks pass (gofmt, go mod tidy, go test)

Breaking Changes

None.

Notes

Mirrors the site command group scaffold pattern. Subcommand stubs do not consume the HTTP client yet — each will when its own issue implements it.

Closes #193
Closes #194

## What Adds the `deployment` command group to tpagectl, starting Phase 3 deployment management. - New `internal/tpagectl/deployment` package with a `deployment` parent command registering four subcommands: `list`, `get`, `promote`, and `rollback`. - Each subcommand renders full `--help`/usage documentation describing its intended flags (e.g. `list` takes a site name with `--limit`/`--format`; `get` uses `--site` + `--version` or `--latest`; `promote` uses `--site` + `--version`; `rollback` uses `--site` + optional `--to-version` with confirmation/`--force`). - Subcommand actions return a clear `not implemented yet` error; real logic lands with their own roadmap issues (#200, #204, #209, #214). - Root command registers the `deployment` group alongside `site`. ## Why Phase 3 roadmap task #194. Establishes the deployment command scaffolding so subcommand implementation issues land as focused PRs with clean diffs (one file per subcommand). ## Testing - [x] Unit tests: parent has the 4 expected subcommands; each has non-empty usage/description; stub invocation returns `errNotImplemented` - [x] Wiring tests: root help lists `deployment`; `deployment --help` lists all subcommands; individual subcommand help renders - [x] `go test -race ./...` passes (18 packages) - [x] `golangci-lint run` clean - [x] pre-commit hooks pass (gofmt, go mod tidy, go test) ## Breaking Changes None. ## Notes Mirrors the site command group scaffold pattern. Subcommand stubs do not consume the HTTP client yet — each will when its own issue implements it. Closes #193 Closes #194
Add the tpagectl deployment command group with list, get, promote, and
rollback subcommands. Each subcommand renders help documenting its
intended flags and returns a not-implemented error until its own roadmap
issue lands.
Wire the deployment command group into the tpagectl root command and
cover root, group, and subcommand help rendering with tests.
docs(roadmap): mark deployment command group complete
All checks were successful
Test and Release / lint (pull_request) Successful in 4m27s
Test and Release / test (pull_request) Successful in 23m53s
18eb30d4d4
Record completion of the tpagectl deployment command group scaffold.

closes #193
closes #194
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-08-06 02:02:22 +00:00
the.auditor left a comment

Summary

Deployment command group scaffolding for tpagectl. Verified: go test -race ./... passes (18 packages, including new internal/tpagectl/deployment) and golangci-lint run ./... is clean. Closes #193-194.

No blocking issues.

Suggestions (filed as issues)

  1. internal/tpagectl/deployment/list.go, get.go, promote.go, rollback.go – help text references flags/behaviors not yet wired (--limit/--format, --site/--version/--latest, --to-version/--force); users invoking them get "flag provided but not defined". Consider placeholder flags or softened descriptions until #200/#204/#209/#214 land. Filed as #563

Praise

  • Consistent one-file-per-subcommand layout mirroring the site group
  • Sentinel errNotImplemented with errors.Is is the right stub pattern
  • Meaningful tests: subcommand presence, help rendering, stub error propagation
  • deployments alias and clean root-command wiring
## Summary Deployment command group scaffolding for tpagectl. Verified: `go test -race ./...` passes (18 packages, including new `internal/tpagectl/deployment`) and `golangci-lint run ./...` is clean. Closes #193-194. No blocking issues. ## Suggestions (filed as issues) 1. `internal/tpagectl/deployment/list.go`, `get.go`, `promote.go`, `rollback.go` – help text references flags/behaviors not yet wired (`--limit/--format`, `--site/--version/--latest`, `--to-version/--force`); users invoking them get "flag provided but not defined". Consider placeholder flags or softened descriptions until #200/#204/#209/#214 land. Filed as #563 ## Praise - Consistent one-file-per-subcommand layout mirroring the site group - Sentinel `errNotImplemented` with `errors.Is` is the right stub pattern - Meaningful tests: subcommand presence, help rendering, stub error propagation - `deployments` alias and clean root-command wiring
fuzzy merged commit 18eb30d4d4 into main 2026-08-06 02:25:44 +00:00
fuzzy deleted branch feat/cli-deployment 2026-08-06 02:25:45 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/thwap-pagesd!562
No description provided.