Skip to content

feat: add runtimes service and rescue mode support to VmClient#283

Open
aliel wants to merge 1 commit intomainfrom
aliel-feat-rescue-mode-and-runtimes-service
Open

feat: add runtimes service and rescue mode support to VmClient#283
aliel wants to merge 1 commit intomainfrom
aliel-feat-rescue-mode-and-runtimes-service

Conversation

@aliel
Copy link
Copy Markdown
Member

@aliel aliel commented Apr 15, 2026

No description provided.

Copy link
Copy Markdown

@foxpatch-aleph foxpatch-aleph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions
Copy link
Copy Markdown

Failed to retrieve llama text: POST 502: Bad Gateway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants