zmuxuny opened a new pull request, #4504:
URL: https://github.com/apache/rocketmq-dashboard/pull/4504

   ### Which Issue(s) This PR Fixes
   
   - Fixes #4500
   
   ### Brief Description
   
   Aliyun's RocketMQ 5.x OpenAPI read responses carry a business-level 
`success` flag in addition to SDK/future completion. Studio previously ignored 
that flag, so a normally completed response with `success=false` could be 
rendered as valid empty operational data.
   
   This change validates the business result for:
   - Topic count/list/page reads;
   - Consumer Group count/list reads;
   - Topic and Consumer Group subscription reads;
   - consumer lag/progress reads;
   - message queries;
   - message trace queries.
   
   A decoded body now requires `success=true`; otherwise Studio returns a 
502-style `BusinessException` with the provider message/code when available. 
Existing null-response/null-body trace compatibility is preserved, and 
`success=true` with empty/null data remains a valid empty result.
   
   This is intentionally separate from #4498/#4499, which cover Aliyun mutation 
responses.
   
   ### Red / Green Verification
   
   Baseline: `master@987b748e8f4f421c5cd3c4c4e51a064cc7e59f18`.
   
   Fail-before:
   - Added 9 deterministic regressions returning normally completed SDK futures 
with `success=false`.
   - `AliyunInstanceProviderTest`: **42 tests, exactly 9 failures**.
   - Every new failure was `Expecting code to raise a throwable`, proving each 
path returned valid-looking data instead of surfacing the provider failure.
   
   Green, Java 21:
   - `mvn -B -ntp -Dtest=AliyunInstanceProviderTest test` — **42/42 passed**.
   - `mvn -B -ntp 
-Dtest=AliyunInstanceProviderTest,AliyunClientFactoryTest,MetadataServiceTest 
test` — **104/104 passed**, 0 failures/errors.
   - Checkstyle: **0 violations**.
   - `mvn -B -ntp -DskipTests package` — **BUILD SUCCESS**.
   - `git diff --check` — clean.
   
   ### Compatibility / Risk
   
   The change only turns decoded Aliyun business failures into explicit errors 
instead of empty data. Successful empty results remain empty, SDK exceptional 
completion mapping is unchanged, and no frontend/API/schema/dependency change 
is introduced.
   
   AI-assisted source audit and implementation; the response fields were 
verified against the pinned `alibabacloud-rocketmq20220801:5.0.8` SDK and 
fail-before behavior was reproduced before changing production code.
   


-- 
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]

Reply via email to