Skip to content

Adding rollback and streaming feature, Upgrade packages - #166

Merged
chhavi-mandowara-cstk merged 13 commits into
mainfrom
staging
May 21, 2026
Merged

Adding rollback and streaming feature, Upgrade packages#166
chhavi-mandowara-cstk merged 13 commits into
mainfrom
staging

Conversation

@chhavi-mandowara-cstk

Copy link
Copy Markdown
Contributor

feat: add rollback command for instantly rolling back to previous deployments
test: add tests for Rollback command
feat: add streaming option during project creation
chore: upgrade qs package minor version
test: mock cli-utilities in rollback tests to avoid uuid ESM error

@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

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

Check TypeCount (with fixes)Without fixesThresholdResult
🔴 Critical Severity0010✅ Passed
🟠 High Severity0025✅ Passed
🟡 Medium Severity00500✅ Passed
🔵 Low Severity001000✅ Passed

⏱️ SLA Breach Summary

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

SeverityBreaches (with fixes)Breaches (no fixes)SLA Threshold (with/no fixes)Status
🔴 Critical0015 / 30 days✅ Passed
🟠 High0030 / 120 days✅ Passed
🟡 Medium0090 / 365 days✅ Passed
🔵 Low00180 / 365 days✅ Passed

✅ BUILD PASSED - All security checks passed

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new launch:rollback command to instantly roll back an environment to a previous eligible deployment, introduces a --response-mode option (buffered vs streaming) during project creation flows, and updates package versions (notably qs) alongside associated tests.

Changes:

  • Added launch:rollback command, GraphQL query/mutation support, and both Mocha + Jest test coverage for rollback flows.
  • Added --response-mode flag and interactive prompt wiring to set isStreamingEnabled for GitHub and File Upload project creation.
  • Upgraded package versions (including qs) and updated lockfile and talisman checksums.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
test/unit/commands/rollback.test.tsAdds Mocha/sinon unit tests for rollback CLI behavior (flag/prompt paths).
src/types/launch.tsAdjusts config typing to include parsed CLI flags and isStreamingEnabled.
src/graphql/queries.tsExtends deployment/environment queries to include rollback-relevant fields with a skip flag.
src/graphql/mutation.tsAdds rollbackDeployment GraphQL mutation definition/export.
src/config/index.tsAdds responseModeOptions config used by the new CLI flag.
src/commands/launch/rollback.tsNew rollback command implementation (resolve env, select target, confirm, mutate).
src/commands/launch/rollback.test.tsAdds Jest unit tests for rollback command logic (success/failure/confirm flows).
src/commands/launch/index.tsAdds --response-mode flag and updates examples (currently has a syntax error).
src/adapters/github.tsWires response-mode/prompt to set isStreamingEnabled and sends it in project creation mutation.
src/adapters/github.test.tsAdds Jest coverage for streaming prompt / flag behavior in GitHub adapter.
src/adapters/file-upload.tsWires response-mode/prompt to set isStreamingEnabled and sends it in project creation mutation.
src/adapters/file-upload.test.tsAdds Jest coverage for streaming prompt / flag behavior in File Upload adapter.
package.jsonBumps package version and updates qs override.
package-lock.jsonLockfile updates for dependency upgrades.
.talismanrcUpdates talisman ignore checksums for new/changed files.
Comments suppressed due to low confidence (1)

test/unit/commands/rollback.test.ts:196

  • This test description says it "Should ask for organization with a warning when passed incorrect org uid", but the assertion expects the cliux.inquire stub to NOT be called. Either rename the test to match what it validates, or adjust the stubbing so it exercises the incorrect-org flow and asserts the prompt/warning behavior.
 it('Should ask for organization with a warning when passed incorrect org uid', async function () {
const args = ['--org', testFlags.invalidOrg.uid, '--project', projectUid, '-e', environmentName];
const mock = sinon.mock(Rollback);
const expectation = mock.expects('run');
expectation.exactly(1);
const orgStub = stub(cliux, 'inquire').resolves(orgUid);
await Rollback.run(args);
sinon.assert.notCalled(orgStub);
orgStub.restore();
mock.verify();

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadsrc/commands/launch/index.ts
Comment threadtest/unit/commands/rollback.test.ts
@chhavi-mandowara-cstk
chhavi-mandowara-cstk merged commit 8694df7 into mainMay 21, 2026
10 checks passed
Sign up for freeto 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.

5 participants

@chhavi-mandowara-cstk@Harshi-Shah-CS@dhruv-parekh-cs@AryanBansal-launch