lizhimins commented on PR #4180:
URL: 
https://github.com/apache/rocketmq-dashboard/pull/4180#issuecomment-5679166309

   Thanks for the substantial work here — the underlying frustration is 
legitimate: a single semantic duplicate currently fails the whole import, and 
the UI swallows the server's message into a generic "import failed" toast. 
We're closing this because the cost/benefit and one correctness issue don't 
line up. `REPLACE` routes through `AlertService.updateRule`, which calls 
`alertStateRepository.deleteByRuleId(id)`, so replacing a rule silently wipes 
the alert state machine — an actively FIRING incident would have to 
re-accumulate its consecutive samples and duration before firing again, which 
the strategy name doesn't convey. The preview also carries no guarantee (the 
spec itself says apply re-validates and recomputes conflicts inside the 
transaction), so we'd be adding four endpoints, three strategies and a 271-line 
modal — plus renumbering 29 rows of the API index — for rule sets that are 
typically a handful to a few dozen entries, capped at 200. The much cheaper 
first step i
 s surfacing the server's 409/400 text in the import handler and naming the 
conflicting rule in that message. This PR also mixes in an unrelated mock-layer 
change to rule id generation; please keep that separate. If you'd like to 
revisit, start with the error-surfacing fix and open an issue describing the 
conflict-resolution UX you want before implementing it.
   


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

Reply via email to