feat(tpagectl): implement deployment get subcommand #567
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/thwap-pagesd!567
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/cli-deployment-get"
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
deployment getend to end: the daemon's missingGET /api/v1/sites/{name}/deployments/{version}endpoint plus the tpagectldeployment getsubcommand.Daemon
SiteService.Deployment(ctx, siteName, version)returns a specific deployment,ErrNotFoundwhen the site or deployment is missing.GET /api/v1/sites/{name}/deployments/{version}handler: owner-scoped (403), 404, 200 with theDeployment.CLI
--siteplus exactly one of--versionor--latest;--latestresolves the newest deployment via the list endpoint./api/v1/sites/{name}/deployments/{version}decoded into adeploymentRecord.deployment "vX" for site "Y" not found,site "X" not found); missing site/version and--version+--latestconflict errors.--site+--version,--latestresolution (verifies list → per-version calls), 404, missing site, missing version, conflict.Why
Phase 3 roadmap task #204.
Testing
--latestresolution, deployment 404, site 404, missing site/version, version∧latest conflictgo test -race ./...passes (18 packages)golangci-lint runcleanBreaking Changes
None.
SiteServicegainsDeployment(already implemented by the concrete type).Notes
#203 asks to display "assets, logs, metadata"; these are not yet part of the daemon
Deploymentmodel (which carries site, version, commit SHA, status, deployed at), so the CLI displays all modeled fields and that gap is noted in the roadmap. The remaining deployment subcommands (promote,rollback) are still stubs tracked by their own issues.Closes #201
Closes #202
Closes #203
Closes #204
Add the daemon GET /api/v1/sites/{name}/deployments/{version} endpoint and the tpagectl deployment get subcommand. Daemon: SiteService.Deployment returns a specific deployment, 404 when the site or deployment is missing. The handler is owner-scoped and returns 200 with the deployment. CLI: deployment get takes --site plus exactly one of --version/--latest, resolves --latest from the list endpoint, fetches the deployment, and prints a details block (site, version, commit, status, deployed at).Record completion of the tpagectl deployment get subcommand and its daemon endpoint: --site with --version or --latest, GET /api/v1/sites/{name}/deployments/{version}, and full detail display of the fields the daemon models (assets, logs, and metadata are not yet part of the Deployment model). closes #201 closes #202 closes #203 closes #204