Repository navigation
Add Range42 stack previews and improve runtime reliability - #154
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a6d3b6be02
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| profile, _ = runtime_snapshot() | ||
| if not native_contract(profile): |
There was a problem hiding this comment.
Move runtime fingerprinting off the event loop
When requires_native_contract is enabled and a scenario requests an optional bootstrap feature, this synchronous call runs from the async preflight and deployment paths. runtime_snapshot() walks and hashes every declared runtime component, and native_contract() then hashes the bundle and controller trees again; with a large installed runtime this blocks the single Uvicorn worker, delaying unrelated API requests and SSE streams. Run this verification in a worker thread or reuse a safely cached verified snapshot.
Useful? React with 👍 / 👎.
| if result.returncode: | ||
| raise ValueError(value.get('error', 'Platform component could not be generated')) | ||
| if value.get('version') != 1 or not isinstance(value.get('files'), dict): |
There was a problem hiding this comment.
Validate generator JSON is an object before calling
.get
If an incompatible or malfunctioning installed generator emits valid JSON that is a list, scalar, or null, either .get call raises AttributeError, which is not caught by this handler. The preview endpoint therefore returns an internal 500 instead of the intended PLATFORM_COMPONENT_INVALID 422; explicitly require a dictionary before inspecting its fields.
Useful? React with 👍 / 👎.
The backend can now generate a reviewable Range42 stack for the project canvas. The UI receives the planned machines, network and project files before the user adds the stack. Previewing a stack does not create or change Proxmox resources.
What changes:
Companion UI: range42/range42-deployer-ui#115
Deployment dependency: stack previews require the generator from the playbooks feature branch, installed on the backend and selected through
RANGE42_PLATFORM_PLAYBOOKS_DIR. The container also includes the file-transfer tool needed by the native workflow.Validation at revision
a6d3b6b: