You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "ASUKAAAAA1204 (via GitHub)" <gi...@apache.org> on 2026/10/19 14:57:08 UTC
[PR] fix(ops): reject mock alert silences with an invalid time range [rocketmq-dashboard]
ASUKAAAAA1204 opened a new pull request, #7117:
URL: https://github.com/apache/rocketmq-dashboard/pull/7117
### Which Issue(s) This PR Fixes
- Fixes #7080
### Brief Description
Mock mode stored any maintenance-window time range, so a window whose end precedes its start was reported as created even though the REST path rejects it: `AlertSilenceService.create` throws `BusinessException(400, "Silence end time must be after start time")` before persistence, while the Mock branch of `createAlertSilence` in `web/src/services/opsService.ts` only assigned an id and prepended the row.
The Mock branch now enforces the same strictly-after ordering before it mutates `alertSilencesState`, so a rejected request leaves the inventory unchanged. Valid windows keep resolving and storing exactly as before. Scope is frontend Mock mode only; no backend or form behaviour changes.
### Verification
- `npx vitest run src/services/opsService.test.ts` -> 18 passed (2 new regression tests: rejected invalid/equal ranges, still-accepted valid range)
- `npx tsc -b` -> clean
- Red/green: with the service change reverted, the new rejection test fails with `AssertionError: promise resolved ... instead of rejecting`, matching the report; with the change it passes.
--
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(ops): reject mock alert silences with an invalid time range [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins merged PR #7117:
URL: https://github.com/apache/rocketmq-dashboard/pull/7117
--
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(ops): reject mock alert silences with an invalid time range [rocketmq-dashboard]
Posted by "ASUKAAAAA1204 (via GitHub)" <gi...@apache.org>.
ASUKAAAAA1204 commented on PR #7117:
URL: https://github.com/apache/rocketmq-dashboard/pull/7117#issuecomment-6295215682
Friendly follow-up: the CI run on this PR is in `action_required`, so no checks have executed yet — the workflow is waiting for a maintainer to approve it for a first-time contributor.
The change is ready for review: `opsService.test.ts` passes 18/18 (including the new rejected/equal/accepted range cases), and `tsc -b`, `eslint` and `prettier --check` are clean locally. Happy to adjust anything the review asks for.
--
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