fix: stop deployment log polling after cancellation#201
Open
tejas-contentstack wants to merge 1 commit into
Open
fix: stop deployment log polling after cancellation#201tejas-contentstack wants to merge 1 commit into
tejas-contentstack wants to merge 1 commit into
Conversation
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
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>
tejas-contentstack
force-pushed
the
cl-4065-cancel-deployment-log-polling
branch
from
July 22, 2026 07:21
da6facd to
749a24a
Compare
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
| launchBaseUrl: '', | ||
| supportedAdapters: ['GitHub'], | ||
| deploymentStatus: ['LIVE', 'FAILED', 'SKIPPED', 'DEPLOYED'], | ||
| deploymentStatus: ['LIVE', 'FAILED', 'SKIPPED', 'DEPLOYED', 'CANCELLED'], |
Contributor
There was a problem hiding this comment.
we do not see deployment status on the terminal right ?
what was this use case about to add cancel as well
| expect(statusWatchQuery.stopPolling).toHaveBeenCalledTimes(1); | ||
| }); | ||
|
|
||
| it('stops deployment-logs polling and emits DONE once status is CANCELLED', async () => { |
Contributor
There was a problem hiding this comment.
is this tested locally ?
ron766-CS
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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