Skip to content

fix: stop deployment log polling after cancellation - #201

Merged
rohan-agrawal-cs merged 1 commit into
developmentfrom
cl-4065-cancel-deployment-log-polling
Jul 27, 2026
Merged

fix: stop deployment log polling after cancellation#201
rohan-agrawal-cs merged 1 commit into
developmentfrom
cl-4065-cancel-deployment-log-polling

Conversation

@tejas-contentstack

@tejas-contentstacktejas-contentstack commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

What

deploymentStatus terminal-state list (src/config/index.ts) was missing CANCELLED, so LogPolling (src/util/logs-polling-utilities.ts) never matched a cancelled deployment as terminal and kept polling both the deployment-status and deployment-logs queries indefinitely after csdx launch:logs on a cancelled deployment.

Fix: add CANCELLED to the terminal deploymentStatus array.

Tests

  • Added regression tests in src/util/logs-polling-utilities.test.ts:
    • status polling stops once deployment status is CANCELLED
    • deployment-logs polling stops and emits DONE once status is CANCELLED
    • guard test proving the old array (without CANCELLED) reproduces the bug (stopPolling never called)
    • assertion that the real src/config default now includes CANCELLED
  • Full suite: npm test — 127/127 passing
  • tsc --noEmit clean

@tejas-contentstack
tejas-contentstack requested review from a team as code ownersJuly 22, 2026 07:18
@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 Severity4025✅ 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

@tejas-contentstack
tejas-contentstackforce-pushed the cl-4065-cancel-deployment-log-polling branch from da6facd to 749a24aCompareJuly 22, 2026 07:21
@tejas-contentstacktejas-contentstack changed the title CL-4065 | +Claude | Stop deployment log polling once deployment is cancelledfix: stop deployment log polling after cancellationJul 22, 2026
@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 Severity4025✅ 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

Comment threadsrc/config/index.ts
Comment threadsrc/util/logs-polling-utilities.test.ts
ron766-CS
ron766-CS previously approved these changes Jul 22, 2026
deploymentStatus terminal-state list was missing CANCELLED, so
csdx launch:logs kept polling the deployment-status and
deployment-logs queries indefinitely after a deployment was
cancelled.
Co-Authored-By: Rohan Agrawal <rohan.agrawal@contentstack.com>
@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 Severity4025✅ 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

@rohan-agrawal-cs
rohan-agrawal-cs merged commit c6606bd into developmentJul 27, 2026
6 checks passed
@rohan-agrawal-cs
rohan-agrawal-cs deleted the cl-4065-cancel-deployment-log-polling branch July 27, 2026 17:43
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

@tejas-contentstack@ron766-CS@Harshi-Shah-CS@rohan-agrawal-cs@chhavi-mandowara-cstk