fix(proxmox): fix add-remote IPC failure and URL construction #122
No reviewers
Labels
No Label
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sarman/tftsr-devops_investigation#122
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/proxmox-add-remote"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
password: &strin async Tauri v2 commandadd_proxmox_clusterfails IPC deserialization at runtime (Tauri v2 requiresDeserializeOwned + Send;&stris lifetime-bound, not owned). Changed topassword: String.ProxmoxClient::get_api_url()andauthenticate()were building URLs withouthttps://protocol or port — all API calls would have silently failed. Fixed to construct fullhttps://{host}:{port}/api2/json/...URLs (frontend strips protocol before sending the bare hostname).AddRemoteForm.tsxerror handler usederr instanceof Errorcheck which always falls back to the generic"Failed to add remote"string when Tauri returns a plain string error. Changed toString(err)so the actual backend error is shown.ProxmoxClientunit tests to reflect the bare-hostname input contract (no scheme inbase_url).Test plan
cargo clippy -- -D warningspassescargo test: 416 tests passtsc --noEmitpasseseslint --max-warnings 0passesAutomated PR Review (qwen3.5-122b-think via liteLLM):\n\n
Summary
The PR correctly addresses three distinct issues: Tauri v2 IPC deserialization failure (changing
&strtoString), broken URL construction inProxmoxClient(now includeshttps://protocol and port), and improved error handling in the frontend (shows actual backend errors). All changes are well-justified and align with the stated fixes.Findings
[WARNING] src/components/Proxmox/AddRemoteForm.tsx:97 - URL protocol stripping not visible in changed code
Evidence: The PR description states "frontend strips protocol before sending the bare hostname" but the
AddRemoteForm.tsxcomponent doesn't show any URL parsing logic to striphttps://from user input before passing to the backendFix: Either add URL parsing in this component (e.g.,
const cleanUrl = config.url.replace(/^https?:\/\//, '').replace(/\/$/, '')) or verify the parent component/callback handles this stripping[SUGGESTION] src-tauri/src/proxmox/client.rs:105 - Hardcoded HTTPS protocol may not work with PBS
Evidence: Proxmox Backup Server (PBS) can operate over HTTP, but the code always constructs
https://URLsFix: Consider making protocol configurable based on cluster type or add a flag to allow HTTP for PBS clusters
Verdict: APPROVE
The core changes are correct and address the stated issues. The URL protocol stripping concern should be verified in the parent component or
onAddcallback implementation (not visible in this PR). The HTTPS hardcoding is a minor concern for PBS clusters but may be intentional given the security requirements.