Skip to content

Commit 8a49cde

Browse files
committed
fix: Explicitly name click objects that end with magic suffixes (ENG-5110)
Click 8.2.0 includes this change: "When generating a command’s name from a decorated function’s name, the suffixes _command, _cmd, _group, and _grp are removed.". That renamed our `user ensure-group` command to `user ensure`, and caused our `account-group` group to now clobber the `account` group. This broke platform functional tests.
1 parent a60ccd1 commit 8a49cde

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

stacklet/client/platform/commands/accountgroup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ class RemoveAccountGroupItem(StackletGraphqlSnippet):
305305
parameter_types = {"provider": "CloudProvider!"}
306306

307307

308-
@click.group(short_help="Run account group queries/mutations")
308+
@click.group("account-group", short_help="Run account group queries/mutations")
309309
@default_options()
310310
@click.pass_context
311311
def account_group(*args, **kwargs):

stacklet/client/platform/commands/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def add(ctx, username, password, email=None, phone_number=None, permanent=True):
4242
)
4343

4444

45-
@user.command()
45+
@user.command("ensure-group")
4646
@click.option("--username", required=True, help="the user to add to the group")
4747
@click.option(
4848
"--group", required=True, help="the group to add the user to (if it exists)"

0 commit comments

Comments
 (0)