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

   ## What is the purpose of the change
   
   `TraceNodeVO.status` is passed straight to the `status` prop of the AntD 
`Steps` component on the message trace page, whose type is the closed 
vocabulary `wait | process | finish | error` 
(`web/node_modules/antd/es/steps/index.d.ts`).
   
   The Apache trace parser's `buildProduceNode`, `buildConsumeNode` and 
`buildRecallNode` mapped unsuccessful stages to the literal `"failed"`:
   
   ```java
   .status(parseBoolean(field(f, 13)) ? "finish" : "failed")
   ```
   
   `"failed"` is not an AntD Steps status, so a failed produce / consume / 
recall stage fell through to the component's default (pending) rendering — the 
same visual defect as the raw-status leaks in the sibling cloud providers.
   
   This changes all three builders to emit `"error"` and adds a regression test 
that feeds a `Pub` context with `isSuccess=false` and asserts the node status 
is `"error"`. The existing recall-state test now also expects `"error"`.
   
   ## Brief changelog
   
   - `RocketMQMessageProvider.buildProduceNode / buildConsumeNode / 
buildRecallNode` map failures to `error`.
   - `RocketMQMessageProviderTest#getMessageTraceParsesFailedProduceAsError` 
locks the behaviour.
   
   ## Verifying this change
   
   `mvn -f server/pom.xml test -Dtest='RocketMQMessageProviderTest'`
   
   Tests run: 57, Failures: 0, Errors: 0 (checkstyle runs at validate and also 
passes). The new assertion and the updated recall expectation fail on trunk, 
which returns `"failed"`.


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