-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: session get command now supports multiple ids #40
base: main
Are you sure you want to change the base?
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see why you think it's better for canceling, deleting, etc. to support only one session at a time. However, in order to maintain some form of cli unity I would prefer this to be the case.
5967b6a
to
1777fb2
Compare
Made said changes. |
@base_command | ||
def session_cancel(endpoint: str, output: str, session_id: str, debug: bool) -> None: | ||
"""Cancel a session.""" | ||
def session_cancel(endpoint: str, output: str, session_ids: List[str], debug: bool) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implement the same logic as the one for delete result data with confirmation for each session.
@base_command | ||
def session_close(endpoint: str, output: str, session_id: str, debug: bool) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here again implement the confirmation logic.
@base_command | ||
def session_purge(endpoint: str, output: str, session_id: str, debug: bool) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here again implement the confirmation logic.
@base_command | ||
def session_delete(endpoint: str, output: str, session_id: str, debug: bool) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here again implement the confirmation logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove session_argument at the beginning of the file and rename the list command function.
Motivation
Other get commands for the CLI support multiple ids, it makes sense to homogonize them.
Description
session get
now supports multiple ids.Testing
Unit tests pass.
Impact
None.
Additional Information
@qdelamea-aneo With the nature of sessions being a less prevalent entity in ArmoniK in comparison to tasks and results, it feels to me like it wouldn't make sense to allow the user to cancel or delete multiple sessions at once. There is no "performance benefit" to it too since the session commands only take in one argument. What do you think ?
Checklist