Frun1na opened a new pull request, #6085: URL: https://github.com/apache/rocketmq-dashboard/pull/6085
### Which Issue(s) This PR Fixes - Fixes #6083 ### Brief Description `AliyunCatalogService.fetchAllInstances` ended its `ListInstances` paging loop on a page shorter than the requested `PAGE_SIZE` (`AliyunCatalogService.java:140`) without consulting the `TotalCount` the same response carries, so a one-row page against `TotalCount = 2` was returned as the complete cloud instance catalog and the instance picker silently hid the remaining instances. The Tencent sibling was fixed for this shape in #4529 (`fix(tencent): reject incomplete catalog pages`); this adds the same `isIncompletePage` guard, which fails closed with 502 when a short page contradicts a non-negative `TotalCount` (`AliyunCatalogService.java:132-135`). User-visible change: a contradictory page now fails with 502 instead of being listed as the whole catalog; an empty page still ends the scan, and the existing negative-`TotalCount` rejection is unchanged. ### How Did You Test This Change? ``` $ mvn -B -ntp test -DforkCount=1 -Dtest=AliyunCatalogServiceTest [INFO] --- checkstyle:3.6.0:check (validate) @ rocketmq-studio --- [INFO] You have 0 Checkstyle violations. [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.885 s -- in org.apache.rocketmq.studio.provider.alibaba.AliyunCatalogServiceTest [INFO] BUILD SUCCESS ``` The new test fails without the fix (the product change was reverted, the test was kept): ``` $ mvn -B -ntp test -DforkCount=1 -Dtest=AliyunCatalogServiceTest [ERROR] Tests run: 11, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.893 s <<< FAILURE! -- in org.apache.rocketmq.studio.provider.alibaba.AliyunCatalogServiceTest ...AliyunCatalogServiceTest.listCloudInstancesShouldRejectIncompletePageWhenTotalCountRequiresMoreTest -- Time elapsed: 0.012 s <<< FAILURE! java.lang.AssertionError: Expecting code to raise a throwable. ``` The existing `listCloudInstancesShouldAggregatePagesTest` (100 + 3 rows across two pages, `TotalCount = 103`), `listCloudInstancesShouldContinuePastFallbackPageCapWhenTotalCountRequiresIt` (seven pages, `TotalCount = 601`) and `listCloudInstancesShouldSkipNullSdkRecords` keep passing, which pins that full-page scans and empty results still terminate. CLUSTER: not applicable — reproduced with a stubbed Aliyun Cloud SDK client in a unit test. ### Checklist - [x] One coherent change; unrelated modifications are not bundled in - [x] Commit subject follows Conventional Commits (`feat:` / `fix:` / `refactor:` / `chore:` / `docs:` / `perf:`) - [x] Tests added or updated for non-trivial changes, test methods named `...Test` - [ ] New UI text has both Chinese and English entries under `web/src/i18n/` - [ ] Architecture constraints stay green (`mvn test` runs the ArchUnit checks) - [ ] New source files carry the ASF license header - [ ] Documentation touched where behaviour changed (README / `docs/` / in-app help) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
