Skip to content

Commit

Permalink
fix: Remove the containers entry from session list --format (#1766)
Browse files Browse the repository at this point in the history
Backported-from: main
Backported-to: 23.09
Co-authored-by: Joongi Kim <[email protected]>
  • Loading branch information
Yaminyam and achimnol committed Dec 7, 2023
1 parent 52a2566 commit 5e2e1b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changes/1766.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove the `containers` field, which is awkward in table format `session list` output, from the `session list --format` item.
2 changes: 1 addition & 1 deletion src/ai/backend/client/cli/admin/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def list(
elif format is not None:
options = format.split(",")
for opt in options:
if opt not in session_fields:
if opt not in session_fields or opt == "containers":
ctx.output.print_fail(f"There is no such format option: {opt}")
sys.exit(ExitCode.INVALID_ARGUMENT)
fields = [session_fields[opt] for opt in options]
Expand Down

0 comments on commit 5e2e1b6

Please sign in to comment.