hubcio opened a new issue, #4444:
URL: https://github.com/apache/iggy/issues/4444
### Bug description
With `--transport ws`, the CLI panics in `login`, `logout`, `pat create`,
`pat delete` and `session status`.
`--help` lists `ws` as the WebSocket transport, and the client accepts it.
But `Args::get_server_address` compares the transport with `"websocket"`
(`core/common/src/types/args/mod.rs:359`), so it returns `None` for `ws`. The
CLI unwraps that value at `core/cli/src/main.rs:198`, `:204`, `:344`, `:348`
and `:352`. `--transport websocket` does not help, because the client rejects
it with `InvalidTransport("websocket")`. An unknown transport, for example
`--transport foo`, panics at the same lines instead of a clear error.
Expected: these commands work over WebSocket, as they do over the other
transports. `get_server_address` can parse the transport into
`TransportProtocol` (`core/common/src/types/configuration/transport.rs:25`), as
the client does (`core/sdk/src/client_provider.rs:81`), and match on the enum.
### Affected area / component
CLI
### Reproduction
```console
$ iggy --transport ws logout
thread 'main' panicked at core/cli/src/main.rs:348:83:
called `Option::unwrap()` on a `None` value
```
Reproduced with CLI 0.14.1-edge.1. The code paths above are the same on
master `af706e68e`.
--
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]