pilichoumao opened a new pull request, #6310: URL: https://github.com/apache/rocketmq-dashboard/pull/6310
### Which Issue(s) This PR Fixes - Fixes #6304 ### Brief Description `config set-context`, `use-context`, `delete-context`, and `current-context` previously returned success even when their text result could not be written. Return each writer error so the CLI exits nonzero, matching the existing structured-output and `get-contexts` behavior. Configuration changes remain saved before their confirmation output; an output failure does not roll back or replay the change. Normal text, JSON and YAML output are unchanged. Related #5209 addresses only `version`; #5144 adds context completion, so neither covers these four output sites. ### How Did You Test This Change? - Added 24 command-entry cases: four commands × text/JSON/YAML × successful/failing writer. They verify exit status, underlying error reporting, normal text and persisted configuration after both outcomes. Before the fix, exactly the four text writer-failure cases failed; after the fix all pass. - `go test ./cmd -run '^TestConfigCommandOutput$' -count=1` passes. - Go formatting, complete race tests, catalog verification and vet pass. - All six platform builds and their per-target license checks, plus the native build/license check, pass with `GOMAXPROCS=1 GOFLAGS=-p=1 GOMEMLIMIT=512MiB` to limit local resource use. - Backend/web sources and dependencies are unchanged. The pre-existing backend binary-license CI gate failure has already been independently reproduced on the exact base; it is outside this change. ### Checklist - [x] One coherent change; Conventional Commits subject - [x] Meaningful command-entry regressions added - [x] ASF header on the new test file - [x] No new UI text; persisted-change/output-failure contract documented in source -- 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]
