mirror of
https://github.com/ivenator1/proxmox-management.git
synced 2026-07-18 11:28:21 +08:00
[PR #16] [MERGED] Fix review findings: locale/Alpine bugs, de-duplication, and regression tests #16
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ivenator1/proxmox-management#16
Loading…
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/ivenator1/proxmox-management/pull/16
Author: @ivenator1
Created: 6/3/2026
Status: ✅ Merged
Merged: 6/3/2026
Merged by: @ivenator1
Base:
testing← Head:claude/testing-branch-pull-tEqHP📝 Commits (2)
aad0c8dFix review findings: locale pinning, Alpine shell, dedup, and regression tests774ff47Lint tests/ with ruff and widen the ruff CI job to cover tests📊 Changes
30 files changed (+526 additions, -331 deletions)
View changed files
📝
.github/workflows/ci.yml(+10 -0)📝
proxmox_fleet/driver.py(+42 -78)➕
proxmox_fleet/flows/_pkg.py(+60 -0)📝
proxmox_fleet/flows/custom.py(+7 -5)📝
proxmox_fleet/flows/lxc.py(+29 -24)📝
proxmox_fleet/flows/node.py(+6 -12)📝
proxmox_fleet/flows/remote.py(+5 -40)📝
proxmox_fleet/flows/vm.py(+5 -40)📝
proxmox_fleet/inventory.py(+32 -101)📝
proxmox_fleet/models/settings.py(+13 -1)📝
proxmox_fleet/models/state.py(+3 -2)📝
proxmox_fleet/status.py(+3 -3)📝
proxmox_fleet/steps.py(+8 -2)📝
pyproject.toml(+11 -0)📝
tests/unit/test_deps.py(+0 -1)📝
tests/unit/test_flow_custom.py(+0 -1)📝
tests/unit/test_flow_lxc.py(+49 -4)📝
tests/unit/test_flow_node.py(+1 -2)📝
tests/unit/test_flow_remote.py(+1 -2)📝
tests/unit/test_flow_vm.py(+1 -2)...and 10 more files
📄 Description
Summary
Addresses the findings from the code review of
proxmox_fleet/: four correctness bugs, heavy duplication across the flows, and a few dead-code/doc items — each backed by new regression tests, plus a ruff CI guard so they can't silently drift back.Per direction, the "unfinished feature" scaffolding is retained (orphaned Ansible primitives,
MaintenanceWindow, dead helper functions, and thedump_for_ansible/from_rawmachinery which is live for molecule).Correctness bugs
flows/lxc.py_read_versionnow reads~/.scriptnamewith the OS-appropriate shell (ashon Alpine, not a hardcodedbashthat Alpine containers often lack).LC_ALL=Cis pinned on every apt/apk/dnf upgrade + dpkg-hash command, andwindow.pyuses a fixed weekday list instead of locale-sensitivestrftime('%a'). Without this, change detection reports "changed" on every run on a non-English host.step.delay—steps.run_stepsnow honours each step'sdelaybetween failed retries (injectable sleep keeps tests fast).inventory.load_proxmox_nodesmergeshost_varsso a node whoseansible_hostlives only there resolves to the IP (it becomes the snapshotapi_host, which must be an IP), not the bare name.GlobalSettingscoerces{101: 5}keys tostrso natural integer vmids invars.ymlload instead of raising a pydanticstring_typeerror on startup.De-duplication
flows/_pkg.pycentralisesdetect_pkg_mgr/upgrade_cmd/kuma_healthy(previously copy-pasted across vm, remote, lxc, custom, and node).inventory.py— a single_iter_sectionscanner backs all four loaders (~130 lines of copy-paste removed).driver.py— one_fold_outcomereplaces five near-identical fold helpers.Cleanup & guard
fleet-update.yml.[tool.ruff]config coveringproxmox_fleet/ tests/to guard against dead-code regressions.Tests
tests/unit/test_pkg.py, plus cases for Alpine/locale, step-delay timing, integer kuma keys, and node/vm/remote host_vars.ruffandmypyboth clean.https://claude.ai/code/session_01J7Xw8eqUZADBzKo6cqiWLy
Generated by Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.