Skip to content

KeyError when optional CLI arg --parent-activity is omitted #359

@andmat900

Description

@andmat900

Description

When the optional --parent-activity argument is not given to etosctl, there is a KeyError before None can be assigned.

Traceback (most recent call last):
  File "/home/user/etos/cli/etosctl/__main__.py", line 106, in run
    main(sys.argv[1:])
  File "/home/user/etos/cli/etosctl/__main__.py", line 101, in main
    main.start()
  File "/home/user/etos/cli/etosctl/__main__.py", line 93, in start
    self.run(args)
  File "/home/user/etos/cli/etosctl/command/command.py", line 107, in run
    return self.subcommand.run(args)
  File "/home/user/etos/cli/etosctl/command/command.py", line 107, in run
    return self.subcommand.run(args)
  File "/home/user/etos/cli/etosctl/command/command.py", line 107, in run
    return self.subcommand.run(args)
  File "/home/user/etos/cli/etos_client/etos/v1alpha/subcommands/start.py", line 73, in run
    result = etos.run()
  File "/home/user/etos/cli/etos_client/etos/v1alpha/etos.py", line 80, in run
    response, error = self.__start()
  File "/home/user/etos/cli/etos_client/etos/v1alpha/etos.py", line 101, in __start
    request = self.start_request.from_args(self.args)
  File "/home/user/etos/cli/etos_client/etos/v0/schema/request.py", line 42, in from_args
    parent_activity=args["--parent-activity"] or None,
KeyError: '--parent-activity'/

Additional Context

No response

Logs

Expected Behavior

It shall be possible to use etosctl without providing --parent-activity.

Steps To Reproduce

No response

The version of this project/repo, if applicable

No response

The version/edition of the Eiffel Protocol used, if applicable

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions