Skip to content

feat(deployments): add the deployments resource (list, get, create, rollback, cancel) - #256

Open
SakshiKoli-CS wants to merge 11 commits into
v2-devfrom
CL-7170
Open

SakshiKoli-CS wants to merge 11 commits into
v2-devfrom
CL-7170

Conversation

@SakshiKoli-CS

@SakshiKoli-CS SakshiKoli-CS commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

🤖 This PR was written by an AI agent (Claude Code) on behalf of Sakshi Koli; Harshi Shah is credited as co-author.

Jira: https://contentstack.atlassian.net/browse/CL-7170

What

Adds the V2 Deployments resource to launch-cli:

  • launch:deployments:list / :get — DEPLOYMENT UID label, all 8 statuses, env vars as a count, no git fields for FileUpload, generic not-found wording (exit 2).
  • launch:deployments:create — full TRD §4.8.2 redeploy matrix (exact body or exact error per cell), --last-upload makes no signed-URL call, wait/stream to LIVE/FAILED, Ctrl-C leaves the deployment running (exit 3).
  • Bare --commit picker over GET .../environments/:e/commits; no TTY → exit 2 naming --commit <sha>.
  • launch:deployments:rollback / :cancel — confirm-gated (--yes, decline exit 3, no TTY exit 2); the mutation is never sent on a refusal.
  • Dependency bumps (express, body-parser, csv-parse) so the Snyk pre-commit gate passes.

Decisions

  • The server reports a non-cancellable deployment as HTTP 400 with a message, not CANCEL_NOT_ALLOWED; the CLI words both the code and that message.
  • History is four linear commits on top of the current v2-dev (list/get, create + picker, rollback, cancel), each with its own tests; the dependency bump is in the first commit.

Known gaps

  • Not yet run live on dev11 for both project types (docs/launch-cli-manual-tests).
  • get prints a launch:logs:get hint; the API has no build-logs URL field.
  • Snyk still lists 3 findings with no fix available (adm-zip, deepmerge, picomatch).

QA: the Launch QA agent tests CL-7170 in the repos once it is in QA; GoCD sanity covers dev11.

https://claude.ai/code/session_01V7Va7MQaPSfh5ua9RABfHr


Generated by Claude Code

@SakshiKoli-CS
SakshiKoli-CS requested review from a team as code owners October 28, 2026 10:16
@snyk-io

snyk-io Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 9 25 ✅ Passed
🟡 Medium Severity 0 2 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 9
  • Medium without fixes: 2
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

claude and others added 4 commits October 28, 2026 10:20
Adds the DEPLOYMENT UID label, git fields hidden for FileUpload, an
environment variable count, generic not-found wording and --deployment.
Also bumps express and overrides body-parser and csv-parse so the
pre-commit Snyk gate passes.

#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Harshi Shah <harshi.shah@contentstack.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V7Va7MQaPSfh5ua9RABfHr
…d commit picker

Covers the GitHub and FileUpload redeploy matrix, --commit [hash] with a
picker over the environment commits, --last-upload and --data-dir, and
waits on the deployment with a Ctrl-C stop that leaves it running.

#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Harshi Shah <harshi.shah@contentstack.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V7Va7MQaPSfh5ua9RABfHr
Fetches the deployment first, then goes through the shared confirm gate
before sending the rollback. --reason is sent only when it is not blank.

#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Harshi Shah <harshi.shah@contentstack.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V7Va7MQaPSfh5ua9RABfHr
Cancel is a bodyless POST behind the shared confirm gate. Its
not-allowed refusal, by code or by the raw 400 message, gets readable
wording.

#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Harshi Shah <harshi.shah@contentstack.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V7Va7MQaPSfh5ua9RABfHr
@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 9 25 ✅ Passed
🟡 Medium Severity 0 2 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 9
  • Medium without fixes: 2
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

claude and others added 4 commits October 28, 2026 15:30
…get output and add deployment pickers

Create and rollback bodies no longer carry environment (the server DTOs reject it), --deployment is validated as 24 hex, get shows one-line commit messages without BUILD LOGS, a null deployment reads as not found, and rollback and cancel offer a picker.

#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Harshi Shah <harshi.shah@contentstack.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V7Va7MQaPSfh5ua9RABfHr
#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Harshi Shah <harshi.shah@contentstack.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V7Va7MQaPSfh5ua9RABfHr
#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Harshi Shah <harshi.shah@contentstack.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V7Va7MQaPSfh5ua9RABfHr
The merged flag refuses a malformed uid at parse time so no request is sent; blank values still read as absent and surrounding spaces are trimmed.

#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Harshi Shah <harshi.shah@contentstack.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V7Va7MQaPSfh5ua9RABfHr
@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 6 9 25 ✅ Passed
🟡 Medium Severity 0 2 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 9
  • Medium without fixes: 2
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

claude and others added 3 commits October 28, 2026 18:31
…ormal tone

Reword every user-facing message of the deployments commands and the
shared upload and deployment-failure wording, drop the log-read notice,
and report a malformed --deployment without oclif's parse prefix.

#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Harshi Shah <harshi.shah@contentstack.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V7Va7MQaPSfh5ua9RABfHr
#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Harshi Shah <harshi.shah@contentstack.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V7Va7MQaPSfh5ua9RABfHr
#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Harshi Shah <harshi.shah@contentstack.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V7Va7MQaPSfh5ua9RABfHr
@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 6 9 25 ✅ Passed
🟡 Medium Severity 0 2 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 9
  • Medium without fixes: 2
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants