tju-yxq opened a new pull request, #6171:
URL: https://github.com/apache/rocketmq-dashboard/pull/6171
> Resubmission of #5193 — the original PR and its linked issue were closed
by the repo's 7-day stale bot while awaiting review, not because the change was
rejected. The fix is rebased unchanged onto the current `rocketmq-studio` head
(5e4c39b0) and the linked issue is still reproducible on trunk.
### Which Issue(s) This PR Fixes
- Fixes #3163
### Brief Description
Message Key queries can now be narrowed the same way Topic queries are: the
key form gains the time range picker (same default range as Topic mode) and an
optional Tag input, and the submitted query carries `startTime`, `endTime` and
the trimmed `tag` alongside `topic` and `key` — the backend's key-query path
already accepted and applied all of them. Query history replay restores the
window and tag for key records instead of dropping them. On the server,
`MessageService.validateTopicQueryWindow` no longer skips window validation
when a key is present: key queries now get the same negative-timestamp,
ordering and 7-day-cap checks as topic queries, while Message ID lookups remain
point lookups with no window requirement.
### How Did You Test This Change?
Run on the branch (`ca711605`, based on `master` @ `0228dad5`):
```
cd server && mvn -B -ntp '-Dtest=MessageServiceTest' test
Tests run: 26, Failures: 0, Errors: 0, Skipped: 0 — BUILD SUCCESS
cd web && npm test -- MessagePage --run
Test Files 2 passed (2)
Tests 34 passed (34)
cd web && npm run lint
0 errors (11 pre-existing warnings in unrelated files)
```
New coverage: key queries with a reversed window, a negative timestamp or an
8-day window are rejected with 400 before the provider is touched, and a
Message ID lookup without any window still reaches the provider; the page test
asserts the submitted key query carries the trimmed tag plus numeric start/end,
and the pre-existing trim test was updated for the new parameters (its captured
query-button reference is now re-queried after mode switches, because the added
form fields shift the button's position among the Space items and remount it).
### Checklist
- [x] One coherent change; unrelated modifications are not bundled in
- [x] Commit subject follows Conventional Commits
- [x] Tests added or updated for non-trivial changes, test methods named
`...Test`
- [x] New UI text has both Chinese and English entries under `web/src/i18n/`
- [x] Architecture constraints stay green (`mvn test` runs the ArchUnit
checks)
- [x] New source files carry the ASF license header
- [ ] 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]