Uh oh!
There was an error while loading. Please reload this page.
fix: stop deployment log polling after cancellation - #201
Conversation
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
da6facd to
749a24aCompare🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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>
749a24a to
e7c11faCompare🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
Uh oh!
There was an error while loading. Please reload this page.
What
deploymentStatusterminal-state list (src/config/index.ts) was missingCANCELLED, soLogPolling(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 aftercsdx launch:logson a cancelled deployment.Fix: add
CANCELLEDto the terminaldeploymentStatusarray.Tests
src/util/logs-polling-utilities.test.ts:CANCELLEDDONEonce status isCANCELLEDCANCELLED) reproduces the bug (stopPollingnever called)src/configdefault now includesCANCELLEDnpm test— 127/127 passingtsc --noEmitclean