yyqdbngt opened a new pull request, #4055:
URL: https://github.com/apache/rocketmq-dashboard/pull/4055
Fixes #3561
## Summary
- Add `POST /api/system-alerts/deliveries/retry-filtered` with body
`{ channel?, instanceId?, limit? }` validated by the new
`RetryFilteredDeliveriesDTO` (limit defaults to 100, allowed range 1-100;
out-of-range values are rejected with HTTP 400; the service enforces the
same range with a 400 `BusinessException`).
- `RmqAlertNotificationOutboxMapper.findFailedIds` selects only `o.id` for
deliveries with `status = 'FAILED'` matching the optional channel/instance
filters, ordered by `o.id` with `LIMIT #{limit}`.
- `NotificationOutboxService.retryFilteredDeliveries` reuses the existing
per-id `retryFailedDeliveries(List<Long>)` path (state reset, audit,
per-id error reporting), and short-circuits to an empty result when no
deliveries match.
- The notification deliveries page gets a "Retry matching failures" button
that retries FAILED deliveries matching the current channel/instance
filters and reports the returned succeeded/failed counts. The existing
current-page retry is unchanged.
## Why
Issue #3561: the deliveries page only retries FAILED rows on the current
page, so operators with many failed notifications had to page through every
result to retry them all. This endpoint lets them retry up to 100 matching
failed deliveries (across pages, filtered by channel/instance) in one
deterministic, audited action.
## Testing
- `cd web && ./node_modules/.bin/tsc -b tsconfig.app.json` → exit 0
- `cd web && ./node_modules/.bin/vitest run
src/pages/ops/__tests__/NotificationDeliveriesPage.test.tsx src/api/ops.test.ts`
→ 2 files passed, 31 tests passed
- `cd server && mvn -B -ntp test
-Dtest=NotificationOutboxServiceTest,SystemAlertControllerTest
-DfailIfNoTests=false`
→ Tests run: 43, Failures: 0, Errors: 0, Skipped: 0; BUILD SUCCESS
--
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]