-
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
feat: Replace sessions
, kernels
's status_history
's type dict
with list
#3201
base: main
Are you sure you want to change the base?
feat: Replace sessions
, kernels
's status_history
's type dict
with list
#3201
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
@HyeockJinKim How can we specifically implement a length restriction? |
656df34
to
dceabcc
Compare
Broken CI will be fixed in #3235. |
850165f
to
98c21c0
Compare
@@ -844,48 +846,63 @@ def logs(session_id: str, kernel: str | None) -> None: | |||
sys.exit(ExitCode.FAILURE) | |||
|
|||
|
|||
@session.command("status-history") | |||
@session.command() |
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 don't know much about session.command
, but can you subtract the internal string "status-history"?
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.
backend.ai/src/ai/backend/client/cli/session/lifecycle.py
Lines 59 to 61 in 42b4030
@main.group() | |
def session(): | |
"""Set of compute session operations""" |
Looking at the code, it seems that the decorator itself does not perform any operations on the arguments.
So, I think it would be better to leave the arguments empty, as is currently done in most of the other code.
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 think this is using overload
to overload the function for the last implementation, can you double check? @jopemachine
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.
If no value is passed as an argument, the decorated function name is automatically used as the CLI command.
If we pass an arbitrary string, that string can be used as the CLI command instead of changing the function name.
So, let's leave the arguments empty here, just like with the other functions.
case JSONArrayFieldItem(_col_name, _conditions, _key_name): | ||
# TODO: Implement this. | ||
pass | ||
# ... |
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.
Was it handled in a follow-up PR?
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.
This code requires discussion before going ahead.
I created a Teams thread, but I haven’t received any responses yet.
Copilot
AI
left a comment
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.
Copilot reviewed 6 out of 21 changed files in this pull request and generated 1 comment.
Files not reviewed (15)
- src/ai/backend/manager/api/schema.graphql: Language not supported
- src/ai/backend/manager/models/minilang/queryfilter.py: Evaluated as low risk
- src/ai/backend/client/cli/session/lifecycle.py: Evaluated as low risk
- src/ai/backend/client/output/fields.py: Evaluated as low risk
- src/ai/backend/client/utils.py: Evaluated as low risk
- changes/3201.feature.md: Evaluated as low risk
- src/ai/backend/manager/server.py: Evaluated as low risk
- src/ai/backend/manager/scheduler/dispatcher.py: Evaluated as low risk
- src/ai/backend/manager/registry.py: Evaluated as low risk
- src/ai/backend/manager/models/utils.py: Evaluated as low risk
- src/ai/backend/manager/models/session.py: Evaluated as low risk
- src/ai/backend/manager/models/resource_usage.py: Evaluated as low risk
- src/ai/backend/manager/api/resource.py: Evaluated as low risk
- src/ai/backend/manager/models/gql_models/kernel.py: Evaluated as low risk
- src/ai/backend/manager/models/minilang/ordering.py: Evaluated as low risk
Co-authored-by: octodog <[email protected]>
…201.feature.md Co-authored-by: octodog <[email protected]>
0eb0792
to
2b58767
Compare
Resolves #3200 (BA-20), Part of #3214 (BA-14).
Refs #412, follow-up to #480.
The current implementation saves only the most recent timestamp whenever status information in
status_history
is updated, and all previous information is deleted.This PR prevents the loss of timestamp information by changing the data structure of
sessions
,kernels
'sstatus_history
to List.Previous format:
New format:
Checklist: (if applicable)
📚 Documentation preview 📚: https://sorna--3201.org.readthedocs.build/en/3201/
📚 Documentation preview 📚: https://sorna-ko--3201.org.readthedocs.build/ko/3201/