-
Notifications
You must be signed in to change notification settings - Fork 157
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
fix: Broken session CLI commands due to invalid initialization of ComputeSession
#3222
base: main
Are you sure you want to change the base?
Conversation
session rename
commandrename, commit
command
rename, commit
commandrename
, commit
command
rename
, commit
commandComputeSession
dd8e2c3
to
8d8e412
Compare
try: | ||
session_id = uuid.UUID(session_name_or_id) | ||
compute_session = session.ComputeSession.from_session_id(session_id) | ||
except ValueError: | ||
compute_session = session.ComputeSession(session_name_or_id, owner_access_key) |
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.
The intention of the code appears to be to raise a ValueError
if session_name_or_id
is a str that is not a UUID
, and to call from_session_id
if it is a session ID. Otherwise, the default constructor is intended to be called.
However, when from_session_id
is called, the name
field is not populated, which causes the code to not function correctly.
Additionally, it seems to be a mistake that owner_access_key
is not set when session_id
is of UUID type.
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.
lgtm
Fix #3202 (BA-19)
This PR fixes following broken session CLI commands.
session rename
session set-priority
session events
session commit
About milestone (24.09)
Starting from version
24.09
, the code usessession_id
(UUID) as an argument to create aComputeSession
object by callingfrom_session_id
. However, this approach does not populate theComputeSession.name
field. As a result, it sends API calls like/session/None (session_id_or_name)/rename?name=new-name
, leading to incorrect behavior.So this PR only needs to be backported to version
24.09
.Checklist: (if applicable)