Describe the bug
Describe the bug
th-cli hits GET /api/v1/version on every invocation, not just --version. When the backend is down, every command (--help, available-tests, etc.) hangs until the HTTP client times out.
Steps to reproduce
- Stop the TH backend.
- Run
th-cli --help.
- Observe a multi-second hang before help is printed.
Expected
Backend version lookup should run only when --version is requested.
Root cause
In cli/th_cli/main.py:
@click.version_option(message=get_extended_help())
Describe the bug
Describe the bug
th-clihitsGET /api/v1/versionon every invocation, not just--version. When the backend is down, every command (--help,available-tests, etc.) hangs until the HTTP client times out.Steps to reproduce
th-cli --help.Expected
Backend version lookup should run only when
--versionis requested.Root cause
In
cli/th_cli/main.py:@click.version_option(message=get_extended_help())