From 4d3111407e40e3d9a788da2391d242fb1badc174 Mon Sep 17 00:00:00 2001 From: Edward Oakes Date: Tue, 8 Aug 2023 11:24:24 -0500 Subject: [PATCH] [Serve] Fix `serve run` help message (#37859) (#38018) Re: https://github.com/ray-project/ray/pull/35754 We previously added `-h` help command to the serve cli's click group. This caused the autogenerated help message to take `-h` as the default help command. For `serve run` we have a collusion on `-h` as it's used for host option as well. This PR changed the order of the click help option so the `--help` will be used in autogenerated help messages. Signed-off-by: Edward Oakes Co-authored-by: Gene Der Su --- python/ray/serve/scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ray/serve/scripts.py b/python/ray/serve/scripts.py index bf7d9eccec8f..9676497dd4e4 100644 --- a/python/ray/serve/scripts.py +++ b/python/ray/serve/scripts.py @@ -124,7 +124,7 @@ def convert_args_to_dict(args: Tuple[str]) -> Dict[str, str]: @click.group( help="CLI for managing Serve applications on a Ray cluster.", - context_settings=dict(help_option_names=["-h", "--help"]), + context_settings=dict(help_option_names=["--help", "-h"]), ) def cli(): pass