Skip to content

paginate resource and stack list#120

Merged
Zee2413 merged 1 commit intomainfrom
paginate-sdk-calls
Oct 23, 2025
Merged

paginate resource and stack list#120
Zee2413 merged 1 commit intomainfrom
paginate-sdk-calls

Conversation

@Zee2413
Copy link
Contributor

@Zee2413 Zee2413 commented Oct 23, 2025

Server-Side Pagination for CloudFormation LSP

Summary

Implements server-side pagination for stacks and resources, improving performance when working with large AWS accounts.

Key Changes

New: StackManager

  • Manages stack caching with Map<stackId, StackSummary>
  • Server tracks nextToken; client sends loadMore boolean
  • Clears cache when filters change

Enhanced: ResourceStateManager

  • New searchResourceByIdentifier() method for finding specific resources and adding to cache
  • Appends pages to cache while maintaining pagination state

Refactored: CfnService

  • Changed list stacks from do-while fetch all behavior to retrieving first page only
  • Moved stack events pagination to DeploymentWorkflow

Protocol Updates

  • ListStacksParams: Uses loadMore boolean instead of nextToken
  • SearchResourceRequest: New protocol for resource search

Files Changed

New: StackManager.ts, StackManager.test.ts
Modified: CfnService.ts, ResourceStateManager.ts, ResourceStateTypes.ts, StackHandler.ts, ResourceHandler.ts, CfnLspProviders.ts, CfnServer.ts, DeploymentWorkflow.ts

Notes

  • AWS CloudControl MaxResults is non-functional (marked "Reserved")
  • CloudFormation ListStacks has no default page size

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Zee2413 Zee2413 requested a review from a team as a code owner October 23, 2025 05:42
@Zee2413 Zee2413 force-pushed the paginate-sdk-calls branch from d10f0ab to 29d1d86 Compare October 23, 2025 05:47
@Zee2413 Zee2413 force-pushed the paginate-sdk-calls branch 3 times, most recently from 39c48de to 674eda8 Compare October 23, 2025 17:49
@Zee2413 Zee2413 force-pushed the paginate-sdk-calls branch from 674eda8 to bb12c37 Compare October 23, 2025 18:37
@Zee2413 Zee2413 merged commit 3b928e4 into main Oct 23, 2025
8 checks passed
@satyakigh satyakigh deleted the paginate-sdk-calls branch November 4, 2025 19:54
Sign up for free to 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.

3 participants

Comments