fix : Update get Deployment logs query to GetDeploymentLogsV2 to match the updated windowed deployment logs query - #216
Open
AryanBansal-launch wants to merge 1 commit into
Open
fix : Update get Deployment logs query to GetDeploymentLogsV2 to match the updated windowed deployment logs query#216AryanBansal-launch wants to merge 1 commit into
AryanBansal-launch wants to merge 1 commit into
Conversation
…h the updated windowed deployment logs query
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Pull request overview
Updates deployment log polling to use the new cursor-paged getDeploymentLogsV2 query (matching the updated windowed logs behavior), while retaining a safe fallback to the legacy timestamp-based getLogs query for regions that don’t support V2.
Changes:
- Switch deployment log polling from
getLogs(timestamp paging) togetDeploymentLogsV2(cursor paging) with cursor tracking and drain behavior on terminal statuses. - Add schema-mismatch detection to fall back to the legacy query only when V2 is unsupported (not on transient/network/auth errors).
- Add GraphQL query definition/export for
GetDeploymentLogsV2and add Jest coverage for the new paging + fallback behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/util/logs-polling-utilities.ts | Implements V2 cursor-paged polling, cursor advancement, and legacy fallback on schema mismatch. |
| src/util/logs-polling-utilities.test.ts | Adds tests validating initial V2 variables, cursor advancement, non-looping behavior, drain semantics, and fallback vs transient errors. |
| src/graphql/queries.ts | Introduces and exports the GetDeploymentLogsV2 GraphQL query and documents legacy query role. |
Suppressed comments (1)
src/util/logs-polling-utilities.ts:304
- After handling GraphQL
errorswithdata === null, the callback still continues and may emit logs/DONEagain or run the terminal-status stop logic. Return immediately afterstopPolling()to avoid double-handling.
if (errors?.length && data === null) {
this.loader=cliux.loaderV2('done', this.loader);
this.$event.emit('deployment-logs', {
message: errors,
msgType: 'error',
});
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+287
to
+298
| if (error) { | ||
| this.loader=cliux.loaderV2('done', this.loader); | ||
| this.$event.emit('deployment-logs', { | ||
| message: error?.message, | ||
| msgType: 'error', | ||
| }); | ||
| this.$event.emit('deployment-logs', { | ||
| message: 'DONE', | ||
| msgType: 'debug', | ||
| }); | ||
| logsWatchQuery.stopPolling(); | ||
| } |
venkatesh-cstk
approved these changes
Aug 6, 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.
No description provided.