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

   Fixes #7238
   
   ## The defect
   
   The ACL service keeps its write echo server-local on purpose (form prefill); 
the read paths convert it to the UTC wire, which is the clock the console and 
every other ACL tool output use. The `rmq.acl.create`/`rmq.acl.update` handlers 
returned the prefill echo verbatim, so a mutation reported a creation time 
eight hours off what `rmq.acl.get`/`rmq.acl.list` return for the same row (in a 
UTC+8 JVM), and the console's row patch showed the offset until reload.
   
   ## The fix
   
   A public `AclService.utcWire(rule)` (the same conversion the read paths use, 
applied in place so identity-based callers keep working) and the two mutation 
handlers convert the echo before returning it. The service, its form-prefill 
echo and the users' pinned echo behaviour are untouched.
   
   ## Tests
   
   Red before the change 
(`executeShouldReturnTheUtcWireStampOtherToolOutputsUseTest`, JVM in 
Asia/Shanghai, mocked echo = local now): the result is ~8h from the UTC 
instant. Green after:
   
   ```
   Tests run: 3 -- AclCreateToolHandlerTest      Tests run: 4 -- 
AclUpdateToolHandlerTest
   Tests run: 91 -- AclServiceTest               Tests run: 1 -- 
AclMutationPlanTest
   [INFO] You have 0 Checkstyle violations.
   ```
   


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