Skip to content
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

Session rename, commit CLI commands not working due to invalid initialization #3202

Open
jopemachine opened this issue Dec 5, 2024 · 2 comments · May be fixed by #3222
Open

Session rename, commit CLI commands not working due to invalid initialization #3202

jopemachine opened this issue Dec 5, 2024 · 2 comments · May be fixed by #3222
Assignees
Labels
comp:cli Related to CLI component type:bug Reports about that are not working

Comments

@jopemachine
Copy link
Member

jopemachine commented Dec 5, 2024

What Operating System(s) are you seeing this problem on?

Linux (x86-64)

Backend.AI version

main

Describe the bug

❯ ./backend.ai session rename 534d186c-f73b-4e1d-b96d-846b51accabc name
✘ BackendAPIError: 404 Not Found
  No such session.
  ➜ Message: Session (id=None) does not exist.

The "Rename" command is not working.
This is because the API should receive session_name, but since the ComputeSession is created via from_session_id, session_name is set to None.

To Reproduce

Use the CLI command.

Expected Behavior

Rename should work

Anything else?

None

@jopemachine jopemachine changed the title session rename command not working Session rename CLI command not working Dec 5, 2024
@jopemachine jopemachine added comp:cli Related to CLI component type:bug Reports about that are not working labels Dec 5, 2024
@jopemachine jopemachine self-assigned this Dec 5, 2024
@achimnol
Copy link
Member

achimnol commented Dec 5, 2024

This is ultimately related to a missing async attribute population after creating ComputeSession instances using the from_session_id() classmethod.

@jopemachine jopemachine changed the title Session rename CLI command not working Session rename, commit CLI command not working Dec 6, 2024
@jopemachine
Copy link
Member Author

jopemachine commented Dec 6, 2024

I have confirmed that the session commit command also causes the same error for the same reason.

❯ ./backend.ai session create python
∙ Session ID 32083c8d-0aa8-4d2a-9cd2-65701e22752a is created and ready.
∙ This session provides the following app services: sshd, ttyd, jupyter, jupyterlab

❯ ./backend.ai session commit 32083c8d-0aa8-4d2a-9cd2-65701e22752a
✘ BackendAPIError: 404 Not Found
  No such session.
  ➜ Message: Session (id=None) does not exist.

@jopemachine jopemachine changed the title Session rename, commit CLI command not working Session rename, commit CLI commands not working due to invalid initialization Dec 6, 2024
@jopemachine jopemachine linked a pull request Dec 8, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:cli Related to CLI component type:bug Reports about that are not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants