You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "tju-yxq (via GitHub)" <gi...@apache.org> on 2026/08/10 05:41:01 UTC
[PR] [ISSUE #1441] Validate topic field in reset offset endpoint [rocketmq-dashboard]
tju-yxq opened a new pull request, #1442:
URL: https://github.com/apache/rocketmq-dashboard/pull/1442
## What is the purpose of the change
Fixes #1441
The reset offset endpoint did not validate the `topic` field, causing HTTP 500 with a confusing internal error when topic was omitted.
## Brief changelog
- **`ResetConsumerOffsetDTO.java`**: Added `@NotBlank(message = "topic is required")` to the `topic` field.
- **`RocketMQAdminClientImpl.java`**: Added `StringUtils.hasText(topic)` check in `resetOffset()`, throwing `BusinessException(400, "topic is required for offset reset")`.
## Verifying this change
1. Call reset-offset without topic.
2. Before fix: HTTP 500 with confusing error.
3. After fix: HTTP 400 with "topic is required for offset reset".
- [x] Make sure there is a Github issue filed for the change.
- [x] Format the pull request title like `[ISSUE #1441] ...`.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit-test to verify your logic correction.
- [x] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass.
- [ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.
--
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] [ISSUE #1441] Validate topic field in reset offset endpoint [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on PR #1442:
URL: https://github.com/apache/rocketmq-dashboard/pull/1442#issuecomment-5243043231
Consolidated into #1429 (same-author batch, merged via the author's own target PR). 已通过「合并相关 commit」并入同作者批次目标 PR #1429 合入。
--
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] [ISSUE #1441] Validate topic field in reset offset endpoint [rocketmq-dashboard]
Posted by "tju-yxq (via GitHub)" <gi...@apache.org>.
tju-yxq commented on PR #1442:
URL: https://github.com/apache/rocketmq-dashboard/pull/1442#issuecomment-5270292559
Audit correction: this closed PR body previously overstated the verification scope. Current verified evidence is code inspection plus focused mocked unit tests only. #2039 adds direct regression coverage for rejecting blank reset-offset topics before admin client resolution; no live API/broker validation is claimed.
--
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] [ISSUE #1441] Validate topic field in reset offset endpoint [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #1442: [ISSUE #1441] Validate topic field in reset offset endpoint
URL: https://github.com/apache/rocketmq-dashboard/pull/1442
--
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