From e8f2a73855b87c5b2db3d988ae4b6a9fa1d30a2f Mon Sep 17 00:00:00 2001 From: Adam Byczkowski <38091261+qduk@users.noreply.github.com> Date: Fri, 14 Aug 2026 00:07:23 -0600 Subject: [PATCH] fix: correct truncated help text for schema load/check commands (#1240) * fix: correct truncated help text for schema load/check commands Click's default short-help truncates at 45 chars when no explicit short_help is set, cutting "load" and "check" mid-sentence in the `infrahubctl schema` command list. Set explicit short_help strings so the generated docs read as complete sentences. * docs: add changelog entry for schema CLI help fix --------- Co-authored-by: Adam Byczkowski --- changelog/+schema-cli-short-help.fixed.md | 1 + docs/docs/infrahubctl/infrahubctl-schema.mdx | 4 ++-- infrahub_sdk/ctl/schema.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 changelog/+schema-cli-short-help.fixed.md diff --git a/changelog/+schema-cli-short-help.fixed.md b/changelog/+schema-cli-short-help.fixed.md new file mode 100644 index 000000000..830263dcd --- /dev/null +++ b/changelog/+schema-cli-short-help.fixed.md @@ -0,0 +1 @@ +Fixed the `load` and `check` command descriptions in the `infrahubctl schema` help output and generated docs, which were cut off mid-sentence. diff --git a/docs/docs/infrahubctl/infrahubctl-schema.mdx b/docs/docs/infrahubctl/infrahubctl-schema.mdx index 2bab8a77c..34f46844a 100644 --- a/docs/docs/infrahubctl/infrahubctl-schema.mdx +++ b/docs/docs/infrahubctl/infrahubctl-schema.mdx @@ -16,8 +16,8 @@ $ infrahubctl schema [OPTIONS] COMMAND [ARGS]... **Commands**: -* `load`: Load one or multiple schema files into... -* `check`: Check if schema files are valid and what... +* `load`: Load one or multiple schema files into Infrahub. +* `check`: Check if schema files are valid and their impact on Infrahub. * `export`: Export the schema from Infrahub as YAML... * `list`: List all available schema kinds. * `show`: Show details for a specific schema kind. diff --git a/infrahub_sdk/ctl/schema.py b/infrahub_sdk/ctl/schema.py index 21f9c7a98..f3d42afea 100644 --- a/infrahub_sdk/ctl/schema.py +++ b/infrahub_sdk/ctl/schema.py @@ -175,7 +175,7 @@ def get_node( return None -@app.command() +@app.command(short_help="Load one or multiple schema files into Infrahub.") @catch_exception(console=console) async def load( schemas: list[Path], @@ -227,7 +227,7 @@ async def load( await asyncio.sleep(delay=1) -@app.command() +@app.command(short_help="Check if schema files are valid and their impact on Infrahub.") @catch_exception(console=console) async def check( schemas: list[Path],