ASUKAAAAA1204 commented on issue #6948:
URL: 
https://github.com/apache/rocketmq-dashboard/issues/6948#issuecomment-6264044475

   I would like to fix this. The rejection comes from the numeric branch of 
`MetricsService.parseStepMillis`, which gates a bare number with 
`\d+(?:\.\d+)?` while Prometheus parses a bare `step` with 
`strconv.ParseFloat`: `.5`, `1.`, `+1`, `1e1`, `5E-1` and `1e0` are all valid 
there, and they are currently rejected with 400 before dispatch.
   
   My plan: widen the numeric grammar to the `ParseFloat` forms, keep duration 
validation, the 31-day window and the 11,000-point budget unchanged, still 
reject values outside the float64 range (as Prometheus does), and dispatch the 
step unchanged. Regression tests on the new accepted forms and on the 
out-of-range forms go into `MetricsServiceTest`; I will link the PR here.


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