Skip to content

fix(config): paginate list_config_versions DynamoDB scan (#354)#367

Merged
rstrahan merged 1 commit into
developfrom
fix/354-config-versions-pagination
Jun 22, 2026
Merged

fix(config): paginate list_config_versions DynamoDB scan (#354)#367
rstrahan merged 1 commit into
developfrom
fix/354-config-versions-pagination

Conversation

@rstrahan

Copy link
Copy Markdown
Contributor

Summary

Fixes #354. ConfigurationManager.list_config_versions() performed a single unpaginated table.scan() on the ConfigurationTable. Because a DynamoDB scan returns at most 1 MB per call, deployments with many config versions (the reporter had 230+) only ever saw the ~58 versions that fit on the first page.

Configs uploaded via idp-cli or the autotune agent were therefore invisible in:

  • the UI's View/Edit Configuration page, and
  • the upload-document → configuration-version dropdown.

(The configs still worked when referenced by name in processing runs — only the listing was truncated.)

Change

Add a pagination loop over LastEvaluatedKey in list_config_versions() so every version is returned. Because this is the single source for config listing, the fix repairs all callers at once: update_configuration, the AppSync configuration_resolver, rules_discovery, and the SDK.

Testing

Added unit tests in tests/unit/config/test_configuration_manager.py:

  • test_list_config_versions_single_page — single-page scan returns all items, scans once.
  • test_list_config_versions_paginates — a LastEvaluatedKey on page 1 triggers a second scan with the correct ExclusiveStartKey, and items from both pages are returned.
$ pytest tests/unit/config/test_configuration_manager.py -q
4 passed

Risk

Low. Pure additive pagination — behavior is identical when the table fits in one page (the common case), and the loop simply continues fetching otherwise. No API/signature change.

🤖 Generated with Claude Code

ConfigurationManager.list_config_versions() did a single unpaginated
table.scan(). DynamoDB scans return at most 1MB per call, so on
deployments with many config versions (230+) only the first ~58 were
returned. Configs uploaded via CLI or the autotune agent were invisible
in the UI's View/Edit Configuration page and the upload-document
config-version dropdown, though they still worked when referenced by
name in processing runs.

Add a pagination loop over LastEvaluatedKey so all versions are
returned. Fixes every caller (update_configuration, the AppSync
configuration_resolver, rules_discovery, and the SDK).

Add unit tests covering single-page and multi-page (paginated) scans.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rstrahan rstrahan merged commit 52cd78e into develop Jun 22, 2026
2 checks passed
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.

1 participant