Frun1na opened a new pull request, #4944:
URL: https://github.com/apache/rocketmq-dashboard/pull/4944
### Which Issue(s) This PR Fixes
- Fixes #(issue to be linked)
### Brief Description
Two related defects in interrupt handling:
1. **Classification.** `signal.NotifyContext` cancels the command context on
Ctrl-C; the in-flight request then fails wrapped in `*url.Error{Err:
context.Canceled}`, which is a `net.Error` and fell through to the UNAVAILABLE
matcher with the hint "Check --server, network connectivity, and Studio Server
status" - sending the operator to debug a healthy server. A new
`matchContextCanceled` matcher (before the net matcher) reports `CANCELED` with
an interrupt hint.
2. **Confirmation prompt.** `defaultConfirm` blocked on
`bufio.Reader.ReadString` unbound to the context: Ctrl-C at the `Type "yes" to
continue:` prompt did nothing, and a subsequent `yes` proceeded with an
already-canceled context (failing later with the same misleading UNAVAILABLE).
The prompt now races the read against the command context; cancellation always
wins and aborts with `CANCELED`.
The `confirmFunc` signature gains the command context (one stub updated);
`defaultConfirm` now accepts any reader that can `Stat()` itself so the
character-device gate stays testable.
### How Did You Test This Change?
```
go test ./... (all packages ok)
go vet ./cmd/... clean, gofmt clean
make -C rmqctl ci (green together with the catalog regeneration on the tip)
```
--
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]