pikaci: fast-path staged Linux runs on single-host Incus#726
pikaci: fast-path staged Linux runs on single-host Incus#726justinmoon wants to merge 1 commit intomasterfrom
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (12)
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| "" | "auto" => None, | ||
| "incus" => Some(RemoteLinuxVmBackend::Incus), | ||
| "microvm" => Some(RemoteLinuxVmBackend::Microvm), | ||
| _ => None, |
There was a problem hiding this comment.
🟡 forced_remote_linux_vm_backend silently ignores unknown env var values instead of failing
When an operator sets PIKACI_REMOTE_LINUX_VM_BACKEND to an unrecognized value (e.g., a typo like "Incus" or "mcrovm"), the _ => None catch-all silently falls through to auto-detection logic rather than returning an error. This is inconsistent with the analogous remote_linux_vm_incus_mode() at crates/pikaci/src/executor.rs:2264-2276 which explicitly bails on unrecognized values. Since the migration plan at docs/incus-migration-plan.md:862 describes this env var as the "rollback escape hatch," silently ignoring a typo could cause an operator to believe they've forced microvm rollback when auto-detection is actually selecting Incus.
Prompt for agents
In crates/pikaci/src/model.rs, the forced_remote_linux_vm_backend function at line 569-578 has a catch-all _ => None arm that silently ignores unrecognized PIKACI_REMOTE_LINUX_VM_BACKEND values. Change the _ => None arm to log a warning or return an error (bail!/panic) to match the fail-fast pattern used in remote_linux_vm_incus_mode() at crates/pikaci/src/executor.rs:2264-2276. For example, change it to something like:
_ => {
eprintln!("warning: unsupported {} value {:?} (expected 'incus', 'microvm', 'auto', or empty); falling through to auto-detection", REMOTE_LINUX_VM_BACKEND_ENV, raw);
None
}
Or, for a stricter approach matching the existing pattern, make the function return anyhow::Result<Option<RemoteLinuxVmBackend>> and bail on unknown values.
Was this helpful? React with 👍 or 👎 to provide feedback.
Uh oh!
There was an error while loading. Please reload this page.