mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-25 23:45:55 +03:00
[PR #449] [MERGED] fix: make nextid get next id #479
Labels
No labels
good first issue
issue/confirmed
issue/critical
proposal/accepted
pull-request
type/bug
type/enhancement
type/feature
type/question
type/refactoring
type/testing
type/testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmox-api-go#479
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/Telmate/proxmox-api-go/pull/449
Author: @jedrw
Created: 8/18/2025
Status: ✅ Merged
Merged: 8/22/2025
Merged by: @Tinyblargon
Base:
master← Head:nextID📝 Commits (1)
d864f3cfix: make nextid get nextid📊 Changes
2 files changed (+17 additions, -2 deletions)
View changed files
📝
cli/command/get/id/get-id-next.go(+13 -2)📝
proxmox/client.go(+4 -0)📄 Description
The proxmox API returns an error (rightly or wrongly?) when an in-use vmid is passed as a parameter to the API call.
e.g. from pvesh on my 8.3.5 cluster:
from a proxmox-api-go debug log:
My expectation would be that the next available id would be returned instead of the error, this was the case in previous versions of proxmox-api-go until this commit
github.com/Telmate/proxmox-api-go@9b95514b3fremoved the recursive call which increments the id each time until a valid one is found.I can see a world in which it is expected that the user should implement the retry logic as that is how the proxmox API behaves but I think it's a better user experience if it just does what the name of the function implies.
I've also updated the new cli to accept a positional arg since I was using that to test this.
Please let me know your thoughts.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.