Skip to content

feat(cli): add gram redeploy command#1721

Merged
simplesagar merged 9 commits intomainfrom
worktree-bold-oak-39b4
Feb 28, 2026
Merged

feat(cli): add gram redeploy command#1721
simplesagar merged 9 commits intomainfrom
worktree-bold-oak-39b4

Conversation

@simplesagar
Copy link
Member

@simplesagar simplesagar commented Feb 27, 2026

Summary

  • Add gram redeploy CLI command that clones an existing deployment with the same assets
  • Defaults to redeploying the latest deployment; accepts --id to target a specific one
  • Polls for completion by default (--skip-poll to opt out), supports --json output

Changes

  • cli/internal/api/deployments.goRedeploy() wrapper method on DeploymentsClient
  • cli/internal/workflow/workflow.goRedeployDeployment() chainable workflow method
  • cli/internal/app/redeploy.go — New newRedeployCommand() CLI command
  • cli/internal/app/app.go — Register the command

Usage

gram redeploy                    # redeploy latest deployment
gram redeploy --id <deployment>  # redeploy specific deployment
gram redeploy --skip-poll        # don't wait for completion
gram redeploy --json             # machine-readable output

Test plan

  • gram redeploy redeploys the latest deployment and polls to completion
  • gram redeploy --id <id> redeploys the specified deployment
  • gram redeploy --skip-poll returns immediately after triggering
  • gram redeploy --json outputs valid JSON deployment object
  • gram redeploy with no project/API key shows clear error message

🤖 Generated with Claude Code


Open with Devin

simplesagar and others added 4 commits February 27, 2026 11:16
Add a Redeploy method that calls the generated Goa client's Redeploy
endpoint, following the same pattern as the existing GetDeployment,
GetLatestDeployment, and GetActiveDeployment wrappers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a RedeployDeployment method to the Workflow struct that triggers a
redeployment of the currently loaded deployment. Follows the standard
workflow pattern: checks Failed(), validates preconditions, calls the
API client, and updates s.Deployment with the result.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Create the redeploy command that clones an existing deployment with the
same assets. Supports --id to target a specific deployment (defaults to
latest), --skip-poll to return immediately, and --json for machine-
readable output. Register the command in the app's command list.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove --latest flag that was declared but never read (latest is
  already the default when --id is omitted)
- Reuse printDeploymentStatusJSON from status.go instead of duplicating
  the JSON marshal logic

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@simplesagar simplesagar requested a review from a team as a code owner February 27, 2026 19:17
@simplesagar simplesagar added enhancement New feature or request go Pull requests that update go code labels Feb 27, 2026
@vercel
Copy link

vercel bot commented Feb 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
gram-docs-redirect Ready Ready Preview, Comment Feb 28, 2026 0:17am

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 27, 2026

🦋 Changeset detected

Latest commit: b53f25d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
dashboard Patch
cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

…iled deploys

The RedeployButton component was returning null for failed deployments
that weren't the active deployment. This meant users had to navigate
back to the deployments list to retry a failed deployment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…error state

Upgraded DeploymentsButton from tertiary to secondary variant so it's
actually visible. When deployment errors exist, shows "Deployment Errors"
with destructive styling linking to the failed deployment. Removed inline
error badge from title in favor of this more prominent CTA button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
devin-ai-integration[bot]

This comment was marked as resolved.

Replace the conditional that hid the button for non-completed/non-failed
deployments with a catch-all "Redeploy" label so users can redeploy any
deployment regardless of status.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Page.Section uses child.type identity to extract slot components. Wrapping
Page.Section.CTA inside DeploymentsButton broke slot detection since the
child type was DeploymentsButton, not PageSectionCTA. Move the CTA wrapper
to the parent so the slot is a direct child of Page.Section.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove dead useFailedDeploymentSources() call from Sources component
(now only called inside DeploymentsButton). Fixes eslint no-unused-vars
CI failure. Add changeset for CLI and dashboard changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@speakeasybot
Copy link
Collaborator

speakeasybot commented Feb 28, 2026

🚀 Preview Environment (PR #1721)

Preview URL: https://pr-1721.dev.getgram.ai

Component Status Details Updated (UTC)
✅ Database Ready Created and validated 2026-02-28 00:51:35.
✅ Images Available Container images ready 2026-02-28 00:50:56.

Gram Preview Bot

@simplesagar simplesagar merged commit 823e7ab into main Feb 28, 2026
56 checks passed
@simplesagar simplesagar deleted the worktree-bold-oak-39b4 branch February 28, 2026 00:58
@github-actions github-actions bot locked and limited conversation to collaborators Feb 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request go Pull requests that update go code preview Spawn a preview environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants