[PR #205] [MERGED] Add workaround for broken pvesh output. #209

Closed
opened 2026-02-27 15:46:54 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/proxmoxer/proxmoxer/pull/205
Author: @reitermarkus
Created: 4/5/2025
Status: Merged
Merged: 4/27/2025
Merged by: @jhollowe

Base: developHead: pvesh-workaround


📝 Commits (2)

  • c16375a Add workaround for broken pvesh output.
  • 90d091c Add test for pvesh JSON preceded by non-JSON.

📊 Changes

2 files changed (+30 additions, -3 deletions)

View changed files

📝 proxmoxer/backends/command_base.py (+17 -3)
📝 tests/test_command_base.py (+13 -0)

📄 Description

Seeing as https://github.com/ansible-collections/community.general/pull/4027 is still not merged after over 3 years because https://bugzilla.proxmox.com/show_bug.cgi?id=4333 still isn't fixed, I'd suggest adding this more generic workaround here rather than the very specific one in https://github.com/ansible-collections/community.general/pull/4027.

Basically, pvesh can contain random output before the JSON message, so try parsing one fewer line with each try, until we reach the end of the output.

Seems like I actually suggested this 3 years ago: https://github.com/proxmoxer/proxmoxer/issues/117#issuecomment-1329343479


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/proxmoxer/proxmoxer/pull/205 **Author:** [@reitermarkus](https://github.com/reitermarkus) **Created:** 4/5/2025 **Status:** ✅ Merged **Merged:** 4/27/2025 **Merged by:** [@jhollowe](https://github.com/jhollowe) **Base:** `develop` ← **Head:** `pvesh-workaround` --- ### 📝 Commits (2) - [`c16375a`](https://github.com/proxmoxer/proxmoxer/commit/c16375ae0cd0dde9b1dd22c74158fb5e8ad333d8) Add workaround for broken `pvesh` output. - [`90d091c`](https://github.com/proxmoxer/proxmoxer/commit/90d091c90ea6d51120f1216490cb815a3911ed1e) Add test for `pvesh` JSON preceded by non-JSON. ### 📊 Changes **2 files changed** (+30 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `proxmoxer/backends/command_base.py` (+17 -3) 📝 `tests/test_command_base.py` (+13 -0) </details> ### 📄 Description Seeing as https://github.com/ansible-collections/community.general/pull/4027 is still not merged after over 3 years because https://bugzilla.proxmox.com/show_bug.cgi?id=4333 still isn't fixed, I'd suggest adding this more generic workaround here rather than the very specific one in https://github.com/ansible-collections/community.general/pull/4027. Basically, `pvesh` can contain random output before the JSON message, so try parsing one fewer line with each try, until we reach the end of the output. Seems like I actually suggested this 3 years ago: https://github.com/proxmoxer/proxmoxer/issues/117#issuecomment-1329343479 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 15:46:54 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmoxer#209
No description provided.