Fix/pve9 storage api version#8
Conversation
Replace the fixed api() => 11 with dynamic negotiation: report the running host's PVE::Storage::APIVER, clamped to the highest version we have validated ($TESTED_APIVER = 14). This loads cleanly without the "older storage API" warning across PVE 9.x point releases, whose APIVER differs. Falls back to the tested version if PVE::Storage is absent. Add get_identity() (storage API 14) returning a stable lightbits://<host>/<project> identifier so PVE recognises the same LightOS backend across nodes. Add t/api_version.t covering api() negotiation branches and get_identity(). Bump README compatibility to PVE 9.x (tested on 9.2).
Prevents accidentally committing .claude/settings.local.json, which may contain internal hostnames/IPs, in a public repo. Previously only shielded by a machine-local global ignore.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe Lightbits Storage Plugin is upgraded to support Proxmox VE 9.x by implementing dynamic storage API version negotiation that detects and reports compatible APIVER values, adding a stable backend identity function for cross-node storage matching, and including comprehensive test validation. Documentation is updated to reflect the new Proxmox 9.x baseline. ChangesProxmox VE 9.x API Version Negotiation and Backend Identity
🎯 3 (Moderate) | ⏱️ ~22 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@LightbitsPlugin.pm`:
- Around line 139-149: The api() function contains a dead APIAGE branch and a
misleading comment: remove the APIAGE-based condition (the "return
$TESTED_APIVER if $apiver - $apiage <= $TESTED_APIVER;" branch) so the function
simply returns $apiver when $apiver <= $TESTED_APIVER and otherwise returns
$TESTED_APIVER, and update the surrounding comment to correctly state that an
APIVER far ahead of TESTED_APIVER will be rejected by the loader (per the loader
rule) rather than "loads, warns"; also update the test t/api_version.t to
reflect the loader behavior (adjust the expectation for APIVER=99/APIAGE=2 to
match rejection or the new documented outcome).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 29fe342b-7e3e-4e96-8dcd-9aff114be42a
📒 Files selected for processing (5)
.gitignoreCHANGELOG.mdLightbitsPlugin.pmREADME.mdt/api_version.t
The api() APIAGE branch returned the same value as the fallthrough, so it was dead code. Remove it (and the now-unused APIAGE read) so api() simply returns the host APIVER when within our tested range, else the tested max. Correct the comment: a returned value below the loader's [APIVER - APIAGE, APIVER] window is rejected outright, not loaded with a warning. Update t/api_version.t labels to document loader accept/reject per case.
Description
What does this change do and why?
Type of change
Testing
perl -c LightbitsPlugin.pmpassesshellcheck scripts/install.sh scripts/uninstall.shpassesTest notes:
DCO
By submitting this pull request I certify that my contribution is made under the terms of the Developer Certificate of Origin and that each commit includes a
Signed-off-byline (git commit -s).Summary by CodeRabbit
New Features
Documentation
Tests
Chores