Skip to content

Handle pagination in cluster stack listing (#349)#394

Open
FarhanTejani wants to merge 1 commit intoaws:mainfrom
FarhanTejani:fix/cluster-stack-pagination
Open

Handle pagination in cluster stack listing (#349)#394
FarhanTejani wants to merge 1 commit intoaws:mainfrom
FarhanTejani:fix/cluster-stack-pagination

Conversation

@FarhanTejani
Copy link
Member

What's changing and why?

Closes #349

HpClusterStack.list() calls cf.list_stacks() once and returns the result without pagination. In accounts with many CloudFormation stacks, the response is truncated and stacks are silently missing from the output.

This change adds a pagination loop that follows NextToken until all pages are collected.

Before/After UX

Before:

  • hyp list hyp-cluster returns at most one page of stacks (up to 100). Additional stacks are silently dropped.

After:

  • hyp list hyp-cluster returns all stacks across all pages.

How was this change tested?

  • Unit tests pass

Are unit tests added?

  • Updated 1 test that expected an empty dict for empty responses (now returns {'StackSummaries': []} for consistent shape)
  • Added 1 test that exercises the pagination path (multi-page response with NextToken)

Are integration tests added?

N/A

Reviewer Guidelines

‼️ Merge Requirements: PRs with failing integration tests cannot be merged without justification.

One of the following must be true:

  • All automated PR checks pass
  • Failed tests include local run results/screenshots proving they work
  • Changes are documentation-only

@FarhanTejani FarhanTejani requested a review from a team as a code owner March 19, 2026 00:24
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.

hyp list cluster-stack ignores boto3 pagination

2 participants