feat(tpagectl): implement deployment list subcommand #564
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/thwap-pagesd!564
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/cli-deployment-list"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Implements the
deployment listsubcommand. CLI-only — the daemon already servesGET /api/v1/sites/{name}/deployments.SITEor--siteflag (one required)./api/v1/sites/{name}/deploymentsvia the client, decoded into adeploymentRecordmirroring the daemonDeploymentpayload (with yaml tags for snake_case structured output — carries forward the #552 fix).text/tabwriter.--limit(#198): caps the number of rows when set.--format(#199):table(default),json,yaml.site "X" not found; missing site name errors.Why
Phase 3 roadmap task #200.
Testing
--siteflag + positional forms,--limittruncation, JSON round-trip, YAML output (snake_case keys), 404, missing arggo test -race ./...passes (18 packages)golangci-lint runcleanBreaking Changes
None.
Notes
#199(--format) was previously implemented forsite list; this extends the same pattern todeployment list. The remaining deployment subcommands (get,promote,rollback) are still stubs tracked by their own issues.Closes #196
Closes #197
Closes #198
Closes #199
Closes #200
Closes #217
Add deployment list: a positional site name or --site flag, GET /api/v1/sites/{name}/deployments, a table of version, commit, deployed at, and status, plus --limit to cap results and --format (table, json, yaml). The deployment record carries yaml tags so structured output uses snake_case keys matching the API payload. 404 surfaces as a friendly not-found error.Record completion of the tpagectl deployment list subcommand: positional site name or --site, GET /api/v1/sites/{name}/deployments, table output, --limit, and --format. closes #196 closes #197 closes #198 closes #199 closes #200 closes #217Summary
deployment listsubcommand for tpagectl (CLI-only; daemon endpoint already exists). Verified:go test -race ./...passes (18 packages) andgolangci-lint run ./...is clean. Closes #196-200 + #217.Verified payload parity:
deploymentRecordmatches the daemonDeploymentpayload (site_name/version/commit_sha/status/deployed_at) with both JSON and yaml tags, carrying forward the #552 fix.No blocking issues.
Suggestions (filed as issues)
internal/tpagectl/deployment/list.go–printTable/writeJSON/writeYAML+ format dispatch duplicated between thesiteanddeploymentpackages; the 404→friendly mapping is now a fourth inline copy (extends #561). Filed as #565internal/tpagectl/deployment/list_test.go– invalid--formatbranch untested (unlikesite list'sTestListInvalidFormat), and--limitexceeding the result count uncovered. Filed as #566Praise
resolveSitecleanly handles positional +--siteforms--limittruncation is correct given the daemon returns deployments newest-first