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

[PR] fix(clients): drop the connection timestamp the API never sends [rocketmq-dashboard]

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

   ### Which Issue(s) This PR Fixes
   
   - Fixes #6086
   
   ### Brief Description
   
   `ClientConnectionVO.connectedAt` is declared and serialized but no provider ever assigns it: both
   `RocketMQClientProvider` builders (`:327-342` and `:455-471`) and the proxy path omit it, and the
   field is the only `connectedAt` occurrence in `server/src/main/java`. The clients page still binds a
   table column (`cluster.heartbeat`, `clients.tsx:508-519`), a CSV export column (`:130`) and a detail
   row (`:1026`) to it, so all three read `-` on every deployment, and the `INVALID_CONNECTION_TIME`
   diagnostic (`clientConnectionDiagnostics.ts:351-367`) is unreachable. The mock is the only producer,
   which is why mock mode looks populated.
   
   Following #5600, which dropped the fabricated NameServer "Connections" column instead of filling it
   with a guess, the field is removed along with the surfaces built on it: the VO, the TypeScript
   contract, the mock data, the column, the CSV export, the detail row, the diagnostic rule and its
   `parseTime` helper, and the `docs/api-spec.md` response row. The unused `cluster.heartbeat`
   translation entry is left in place so the change does not overlap the dictionary edits in the open
   localization pull requests.
   
   User-visible change: the clients page no longer offers a "心跳时间 / Heartbeat" column, its CSV export
   no longer has a "Connected At" column, and the connection detail dialog no longer has a "Heartbeat"
   row — the three places that could only ever display `-`.
   
   ### How Did You Test This Change?
   
   The changed modules map to four test files and the project type check; all of them pass. `vitest
   related` over this change is dominated by the shared `i18n/translations.ts` module, which exceeds the
   15-minute local command budget, so the covering test files were run individually instead.
   
   ```
   npx eslint src/api/connections.test.ts src/api/connections.ts src/i18n/translations.ts \
     src/mock/clients.ts src/pages/cluster/__tests__/ClientsPage.test.tsx \
     src/pages/cluster/clients.tsx src/utils/clientConnectionDiagnostics.test.ts \
     src/utils/clientConnectionDiagnostics.ts                                       ✓ 2.7s
   npx prettier --check <the same eight files>                                      ✓ 1.1s
   npx tsc -b                                                                       ✓ 3.9s
   
   npx vitest run src/pages/cluster/__tests__/ClientsPage.test.tsx \
     --maxWorkers=1 --fileParallelism=false       ✓ 25 passed (22.8s)
   npx vitest run src/utils/clientConnectionDiagnostics.test.ts \
     --maxWorkers=1 --fileParallelism=false       ✓ passed (1.9s)
   npx vitest run src/api/connections.test.ts \
     --maxWorkers=1 --fileParallelism=false       ✓ passed (1.6s)
   npx vitest run src/i18n/__tests__/translations.test.ts \
     --maxWorkers=1 --fileParallelism=false       ✓ passed (3.4s, "resolves every literal key the sources ask t() for")
   
   cd server && mvn -B -ntp test -DforkCount=1 -Dtest=ClientControllerTest   ✓ 6.9s, 0 checkstyle violations
   ```
   
   The new test fails without the fix:
   
   ```
   $ npx vitest run src/pages/cluster/__tests__/ClientsPage.test.tsx --maxWorkers=1 --fileParallelism=false
    FAIL  src/pages/cluster/__tests__/ClientsPage.test.tsx > Clients page > does not offer a connection timestamp the backend never sends
   AssertionError: expected [ <span …(1)></span>, …(1) ] to have a length of +0 but got 2
    FAIL  src/pages/cluster/__tests__/ClientsPage.test.tsx > Clients page > exports the currently filtered client connections as CSV
   AssertionError: expected '"Cluster","Client ID","Type","Group/T…' to be '"Cluster","Client ID","Type","Group/T…'
   + "Cluster","Client ID","Type","Group/Topic","Protocol","Address","Language","Version","Connected At","Partial"
    Test Files  1 failed (1)
         Tests  4 failed | 21 passed (25)
   ```
   
   ### 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
   - [x] 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: commits-unsubscribe@rocketmq.apache.org

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


Re: [PR] fix(clients): drop the connection timestamp the API never sends [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6088:
URL: https://github.com/apache/rocketmq-dashboard/pull/6088#issuecomment-6256977285

   This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes.


-- 
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(clients): drop the connection timestamp the API never sends [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #6088: fix(clients): drop the connection timestamp the API never sends
URL: https://github.com/apache/rocketmq-dashboard/pull/6088


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