lizhimins opened a new pull request, #6057:
URL: https://github.com/apache/rocketmq-dashboard/pull/6057

   Follow-up to #6056, which landed the regression test but **not** the fix - 
the commit that was meant
   to carry it had `rmqctl/internal/output/output.go` reverted by a `git 
checkout --` right after a
   mutation check, so only the test file was pushed. Current `rocketmq-studio` 
therefore still quotes
   every number in `-o yaml` output (`size: "3"` instead of `size: 3`) and 
fails both
   `TestYAMLRestoresJSONNumbersTest` and the yaml subtests of 
`TestMessageQueryCompletenessWarningTest`.
   
   Cause: #5262 decodes studio payloads with `json.Decoder.UseNumber()` so 
integer literals survive
   instead of being folded into `float64`. `json.Number` is a string type - 
`encoding/json` marshals it
   as a bare literal, `yaml.v3` does not know it and quotes it.
   
   `YAML` now restores numeric types before encoding: integers become `int64` 
(so offsets past 2^53 stay
   exact, which is why `UseNumber()` is there), other numbers become `float64`, 
everything else is passed
   through. `JSON` and the table renderer are unchanged.
   
   `make fmt` clean; `go test ./...` green across all seven rmqctl packages 
(`./cmd` and
   `./internal/output` were both red before this commit).


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