You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "zjncs (via GitHub)" <gi...@apache.org> on 2026/10/06 03:13:50 UTC

[PR] fix(web): lite topic Extend TTL sends the owning instance id [rocketmq-dashboard]

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

   Closes #5599
   
   ## Problem
   
   `LiteTopicTTLUpdateDTO` requires a non-blank `instanceId` (the TTL write is ownership-checked against the owning instance; tightened in #5006 with the backend test `LiteTopicControllerTest.ttlRequiresExplicitInstanceTest` pinning a body of `{"topicPattern":"chat","newTTL":60000}` to a 400). But the console's Extend-TTL modal posted exactly that body — `{ topicPattern, newTTL }` — with no axios interceptor injecting `instanceId` and no instance selector on the page. **Every Confirm from the UI failed with "instanceId is required"; the feature was 100% broken from the console.**
   
   ## Fix
   
   - `extendLiteTopicTTL(instanceId, topicPattern, newTTL)` now includes `instanceId` in the POST body
   - the modal loads the instance list when it opens and offers only Apache-vendor instances (the ownership guard's `requireSupportedProvider` rejects cloud vendors for this write), auto-selecting when exactly one candidate exists
   - the selection is required before the request; new i18n keys (`liteTopic.instance`, `instancePlaceholder`, `instanceRequired`) in zh + en
   
   ## Verification
   
   - New page test: with one Apache + one ALIYUN instance, opening the dialog auto-selects the Apache instance and Confirm calls `extendLiteTopicTTL('apache-main', 'order-*', 7200)`
   - Updated API test pins `instanceId` in the POST body against the mock adapter
   - Full frontend suite: 1285 passed / 7 failed — the 7 are the known parallel-load timing flakes in `AlertsPage`/`ConsumerPage`/`TopicPage` (each file passes 100% in isolation: 28/28, 36/36); LiteTopic and liteTopic API files pass 23/23
   - `tsc --noEmit` clean; pre-commit eslint/prettier applied
   - Mutation check: reverting the page/api change makes both new tests fail again; restoring them fixes it
   
   ## Collision note
   
   `LiteTopic.tsx` is touched by #5237/#5332 (both: `formatTime` UTC rendering + a `formatUtcDateTime` import) and #5242 (session-drawer session-id selection). This change touches the Extend-TTL state/handler/modal (~145-355, ~930) and adds an import adjacent to — but at a different anchor line than — #5332's import insert; no modified lines overlap, so a three-way merge resolves cleanly (trivial rebase if maintainers prefer).


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(web): lite topic Extend TTL sends the owning instance id [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins merged PR #5600:
URL: https://github.com/apache/rocketmq-dashboard/pull/5600


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org