[PR #376] [MERGED] Fix enforce_affinity boolean inversion #172

Closed
opened 2026-03-02 05:14:53 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/gyptazy/ProxLB/pull/376
Author: @Thalagyrt
Created: 11/26/2025
Status: Merged
Merged: 11/27/2025
Merged by: @gyptazy

Base: mainHead: patch-affinity-rebalance


📝 Commits (1)

  • a70330d Fix enforce_affinity boolean inversion

📊 Changes

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

View changed files

.changelogs/1.1.11/335_fix_affinity_matrix_prevalidation.yml (+2 -0)
📝 proxlb/models/calculations.py (+1 -1)

📄 Description

During runs in which affinity checks determine balancing actions, there was a small error in a boolean calculation that caused ProxLB to always rebalance, as it exited the verification loop with a failure the first time it saw a VM that actually passed affinity checks.

Fixes: #335

Apologies, unsure what to do on changelogs, as the directories there seem to only mention existing releases - is there something I'm missing to note this patch down? I also ran flake8 locally per contributing.md, and it complained about nearly every file, and pytest in the repo root said no tests run, so I figure CI may be configured to do something different there. If anything fails on this PR I'll fix it after CI runs it. :)


🔄 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/gyptazy/ProxLB/pull/376 **Author:** [@Thalagyrt](https://github.com/Thalagyrt) **Created:** 11/26/2025 **Status:** ✅ Merged **Merged:** 11/27/2025 **Merged by:** [@gyptazy](https://github.com/gyptazy) **Base:** `main` ← **Head:** `patch-affinity-rebalance` --- ### 📝 Commits (1) - [`a70330d`](https://github.com/gyptazy/ProxLB/commit/a70330d4c318a4f2d12e3b6814c7f46ee0669ea7) Fix enforce_affinity boolean inversion ### 📊 Changes **2 files changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `.changelogs/1.1.11/335_fix_affinity_matrix_prevalidation.yml` (+2 -0) 📝 `proxlb/models/calculations.py` (+1 -1) </details> ### 📄 Description During runs in which affinity checks determine balancing actions, there was a small error in a boolean calculation that caused ProxLB to always rebalance, as it exited the verification loop with a failure the first time it saw a VM that actually passed affinity checks. Fixes: #335 Apologies, unsure what to do on changelogs, as the directories there seem to only mention existing releases - is there something I'm missing to note this patch down? I also ran flake8 locally per contributing.md, and it complained about nearly every file, and pytest in the repo root said no tests run, so I figure CI may be configured to do something different there. If anything fails on this PR I'll fix it after CI runs it. :) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 05:14:53 +03:00
Sign in to join this conversation.
No labels
pull-request
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/ProxLB-gyptazy#172
No description provided.