fix(proxmox): parse port from URL when adding remote #100
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#100
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/proxmox-remote-add-error"
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
Fixes the issue where users could not add Proxmox remotes with URLs containing port numbers (e.g.,
https://172.0.0.18:8006).Problem
When adding a remote with a URL like
https://172.0.0.18:8006, the application was:172.0.0.18:80068006Solution
handleAddRemote()andhandleEditRemote()functionsChanges
src/pages/Proxmox/RemotesPage.tsx: Fixed URL parsing in add/edit remote handlers1.2.3to1.2.4Testing
Commits
666de6dd- fix(proxmox): parse port from URL when adding remote58cbe525- chore: bump version to 1.2.40b409c32- chore: update Cargo.lock and schema for v1.2.4Automated PR Review (qwen3-coder-next via liteLLM):\n\nSummary
The PR addresses a bug where Proxmox remote URLs containing ports (e.g.,
https://172.0.0.18:8006) were being incorrectly parsed, leading to malformed connection strings. The fix extracts the port from the URL if present, stripping it from the hostname, and falls back to default ports otherwise. Changes are applied consistently tohandleAddRemoteandhandleEditRemote.After thorough review across all agents:
Findings
[WARNING] src/pages/Proxmox/RemotesPage.tsx:78-84 and 105-112 - Potential port mismatch in edit flow
Evidence: In
handleEditRemote, after removing the existing remote and adding a new one with updated URL/port, theloadRemotes()call happens afteraddProxmoxCluster, but ifremoveProxmoxClustersucceeds andaddProxmoxClusterfails, the remote is lost andloadRemotes()will show a gap where the original remote used to be.Fix: Wrap both operations in a try/catch block around the delete+add pair, and only call
loadRemotes()after successful completion of both, or revert to a safer pattern (e.g., single update command if the backend supported it). Alternatively, add a clear comment documenting the risk.[WARNING] src/pages/Proxmox/RemotesPage.tsx:78-84 and 105-112 - Port parsing duplicates identical logic in two functions
Evidence:
handleAddRemoteandhandleEditRemoteeach contain nearly identical port-parsing blocks:Fix: Extract to a helper function to avoid drift. Example:
Verdict: REQUEST CHANGES
While the core logic is correct and the fix properly resolves the original issue, the duplicated logic and lack of atomicity in the edit path are valid concerns that should be addressed before merging.
Automated PR Review (qwen3-coder-next via liteLLM):\n\nSummary
This PR fixes the Proxmox remote URL parsing bug where ports were not properly extracted from URLs, causing malformed connection strings. The changes correctly parse the port from the URL when present and fall back to default ports when not specified. Both
handleAddRemoteandhandleEditRemoteare updated with consistent logic.Findings
[WARNING] src/pages/Proxmox/RemotesPage.tsx:78-84 and 105-112 - Duplicated port-parsing logic in
handleAddRemoteandhandleEditRemoteEvidence:
This block is duplicated identically in both functions.
Fix: Extract to a helper function to avoid future drift:
[WARNING] src/pages/Proxmox/RemotesPage.tsx:105-112 - Non-atomic edit operation risks remote loss on partial failure
Evidence:
If
removeProxmoxClustersucceeds butaddProxmoxClusterfails, the remote is permanently lost.Fix: Wrap both operations in a single try/catch or add a backup mechanism. At minimum, document this risk.
Verdict: REQUEST CHANGES
The duplicated logic and non-atomic edit operation are valid concerns that should be addressed before merging. While the core fix is correct, these issues could lead to future bugs or data loss.
Automated PR Review (qwen3-coder-next via liteLLM):\n\nLooking at the PR and the previous review context, I can see that both issues identified in the prior automated review have been addressed:
parseRemoteUrl()helper functionLet me verify the current state of the code and check for any new issues introduced.
Summary
This PR fixes Proxmox remote URL parsing to properly extract ports from URLs like
https://172.0.0.18:8006. The review feedback from prior rounds has been addressed by extracting the parsing logic into a helper function and documenting the known atomicity limitation of the edit operation.Findings
No findings.
Verdict: APPROVE
The changes correctly address the original issue and resolve all concerns from prior review rounds:
parseRemoteUrl()helper functionhandleEditRemoteis documented with a clear commentAutomated PR Review (qwen3-coder-next via liteLLM):\n\nSummary
This PR fixes a Proxmox remote URL parsing bug where ports in URLs like
https://172.0.0.18:8006were not being extracted correctly. The code has been updated with a helper functionparseRemoteUrl()to extract hostname and port, and both add and edit flows have been aligned. Prior automated review concerns about code duplication and atomicity have been addressed per theREVIEW_FIX_SUMMARY.md.Findings
Verdict: APPROVE