Skip to content

[Bug] th-cli calls /api/v1/version on every invocation (slow when backend is unreachable) #1005

@abhisheksingh-esp

Description

@abhisheksingh-esp

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

  1. Stop the TH backend.
  2. Run th-cli --help.
  3. 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())

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions