diff --git a/sdk/python/kfp/cli/component.py b/sdk/python/kfp/cli/component.py index 008626f70c0..02665e47bf8 100644 --- a/sdk/python/kfp/cli/component.py +++ b/sdk/python/kfp/cli/component.py @@ -357,9 +357,13 @@ def build_image(self, platform: str, push_image: bool): f'Built and pushed component container {self._target_image}') -@click.group() -def component(): +@click.group(invoke_without_command=True) +@click.pass_context +def component(ctx: click.Context): """Builds shareable, containerized components.""" + if ctx.invoked_subcommand is None: + click.echo(ctx.get_help()) + ctx.exit(0) @component.command() diff --git a/sdk/python/requirements.in b/sdk/python/requirements.in index 6837aed7c41..2443a7beda4 100644 --- a/sdk/python/requirements.in +++ b/sdk/python/requirements.in @@ -2,7 +2,7 @@ # the following in this folder: # pip-compile --no-emit-index-url requirements.in -click==8.1.8 +click>=8.1.8 click-option-group==0.5.7 docstring-parser>=0.7.3,<1 # Pin google-api-core version for the bug fixing in 1.31.5 diff --git a/sdk/python/requirements.txt b/sdk/python/requirements.txt index 858462e0e14..68d2b18cd9f 100644 --- a/sdk/python/requirements.txt +++ b/sdk/python/requirements.txt @@ -7,7 +7,7 @@ certifi==2025.10.5 # requests charset-normalizer==3.4.3 # via requests -click==8.1.8 +click>=8.1.8 # via # -r requirements.in # click-option-group