Skip to content

fix(cloud): consolidate inventory pagination - #2956

Merged
lizhimins merged 3 commits into
apache:rocketmq-studiofrom
Aias00:consolidate/studio-cloud-inventory-pagination
Sep 2, 2026
Merged

fix(cloud): consolidate inventory pagination#2956
lizhimins merged 3 commits into
apache:rocketmq-studiofrom
Aias00:consolidate/studio-cloud-inventory-pagination

Conversation

@Aias00

@Aias00 Aias00 commented Sep 2, 2026

Copy link
Copy Markdown

Summary

Consolidates the cloud inventory pagination fixes from #2684, #2610, and #2669 into one PR based on the current rocketmq-studio branch.

Replaces #2684
Replaces #2610
Replaces #2669

Closes #2678
Closes #2609
Closes #2667

Changes

  • Page Tencent cloud instance and consumer group inventory by TotalCount or short-page termination instead of the old fixed 10,000-record ceiling.
  • Page Tencent ACL role and topic-subscription inventories by TotalCount, preserving short-page termination when the API omits totals.
  • Page Aliyun consumer group inventory until totalCount is satisfied or a short page is returned.
  • Add regression tests for boundary conditions at and beyond the old pagination ceilings.

Verification

  • JAVA_HOME=/Users/aias/Library/Java/JavaVirtualMachines/openjdk-21.0.2/Contents/Home mvn -q -Dtest=AliyunInstanceProviderTest,TencentCatalogServiceTest,TencentAclServiceTest,TencentInstanceProviderTest test
  • JAVA_HOME=/Users/aias/Library/Java/JavaVirtualMachines/openjdk-21.0.2/Contents/Home mvn -q -Dtest='org.apache.rocketmq.studio.provider.*.*Test' test
  • JAVA_HOME=/Users/aias/Library/Java/JavaVirtualMachines/openjdk-21.0.2/Contents/Home mvn -q -DskipTests compile
  • git diff --check origin/rocketmq-studio...HEAD

Full backend mvn -q test was also run. It currently fails on the existing baseline AlertSchemaMigrationTest issue: Table "rmq_instance_message" not found while AlertSchemaMigration adds result_snapshot; this PR does not touch that area.

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Replaces hardcoded MAX_PAGES pagination limits with proper totalCount-based termination across Aliyun and Tencent cloud providers. Extracts common pagination helpers (hasFetchedAll, isLastRolePage, describeRoles) to reduce duplication. Fixes a real bug where large datasets would be silently truncated.

LGTM 👍


Automated review by github-manager-bot

(cherry picked from commit e0bcd31)
Signed-off-by: liuhy <liuhongyu@apache.org>
Tencent Cloud exposes TotalCount for ACL roles and topic subscriptions, so Studio should not silently stop at the old 100-page inventory ceiling.

Constraint: Preserve short-page termination when Tencent omits TotalCount.

Rejected: Keep MAX_PAGES guard | it still truncates valid inventories beyond 10,000 records.

Confidence: high

Scope-risk: narrow

Tested: JAVA_HOME=/Users/aias/Library/Java/JavaVirtualMachines/openjdk-21.0.2/Contents/Home mvn -Dtest=TencentAclServiceTest,TencentInstanceProviderTest test

Tested: JAVA_HOME=/Users/aias/Library/Java/JavaVirtualMachines/openjdk-21.0.2/Contents/Home mvn -Dtest='org.apache.rocketmq.studio.provider.tencent.*Test' test

Not-tested: Full mvn test is blocked by pre-existing origin/rocketmq-studio AlertSchemaMigrationTest failure: rmq_instance_message table not found.
Signed-off-by: liuhy <liuhongyu@apache.org>
(cherry picked from commit 712b6c6)
Signed-off-by: liuhy <liuhongyu@apache.org>
Aliyun consumer group inventories must not stop at the legacy five-page cap when the OpenAPI response reports more data. Continue until totalCount is satisfied or the service returns a short page so counts, exports, and management screens see the full group set.\n\nConstraint: refreshed against origin/rocketmq-studio at 899561e.\nRejected: keep MAX_PAGES fallback | it still returns a successful partial inventory for known totals above 500.\nConfidence: high\nScope-risk: narrow\nTested: JAVA_HOME=/Users/aias/Library/Java/JavaVirtualMachines/openjdk-21.0.2/Contents/Home mvn -q -Dtest=AliyunInstanceProviderTest test; JAVA_HOME=/Users/aias/Library/Java/JavaVirtualMachines/openjdk-21.0.2/Contents/Home mvn -q test

Signed-off-by: liuhy <liuhongyu@apache.org>
(cherry picked from commit e59ac28)
Signed-off-by: liuhy <liuhongyu@apache.org>
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