feat: add runtimes service and rescue mode support to VmClient#283
feat: add runtimes service and rescue mode support to VmClient#283
Conversation
foxpatch-aleph
left a comment
There was a problem hiding this comment.
The PR adds a new runtimes service and rescue mode support. However, there is a critical bug in runtimes.py line 55 where aggregate.runtimes is referenced but the field is actually named entries. Additionally, the enter_rescue method uses params for passing runtime_id while other similar operations (like restore_from_volume) use json_data for consistency.
src/aleph/sdk/client/services/runtimes.py (line 55): BUG: References aggregate.runtimes but the field in RuntimesAggregate is named entries (line 26). This will cause an AttributeError at runtime. Change to aggregate.entries.
src/aleph/sdk/client/vm_client.py (line 308): INCONSISTENCY: Uses params to pass runtime_id, but similar operations like restore_from_volume (lines 295-300) use json_data for request payloads. For consistency, consider changing to json_data={"runtime_id": runtime_id} if runtime_id else None.
src/aleph/sdk/client/services/runtimes.py (line 57): The get_default_runtime method requires runtime_type to be a non-optional str, but the docstring example shows it could be "rescue" or "instance". Consider adding a type hint or Enum for valid runtime types to help callers.
|
Failed to retrieve llama text: POST 502: Bad Gateway |
No description provided.