Skip to content

reverseproxy: skip unavailable upstream with a single weighted_round_robin weight - #8320

Merged
steadytao merged 2 commits into
caddyserver:masterfrom
BenMacha:fix-weighted-round-robin-single-weight
Nov 3, 2026
Merged

steadytao merged 2 commits into
caddyserver:masterfrom
BenMacha:fix-weighted-round-robin-single-weight

Conversation

@BenMacha

@BenMacha BenMacha commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

With fewer than two weights, WeightedRoundRobinSelection returned the
first upstream without checking that it is available.

Assistance Disclosure

The bug was found during a code review done with Claude Code (Anthropic), which also drafted the fix and the test. I reviewed the change, can explain every line, and ran go test -race -short on the affected package before opening this PR.

…robin weight

With fewer than two weights, WeightedRoundRobinSelection returned the
first upstream without checking that it is available.
@caddy-cla

caddy-cla Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

✅ Contributor License Agreement

All identified contributors have signed the CLA. Thank you!

@steadytao steadytao added the bug 🐞 Something isn't working label Nov 3, 2026
@steadytao steadytao added this to the v2.12.0 milestone Nov 3, 2026
@steadytao
steadytao enabled auto-merge (squash) November 3, 2026 06:54
@steadytao
steadytao merged commit aeea18b into caddyserver:master Nov 3, 2026
27 checks passed
This was referenced Nov 3, 2026
NickCao pushed a commit to NickCao/caddy that referenced this pull request Nov 4, 2026
…robin weight (caddyserver#8320)

With fewer than two weights, WeightedRoundRobinSelection returned the
first upstream without checking that it is available.

(cherry picked from commit aeea18b)
@francislavoie francislavoie modified the milestones: v2.12.0, v2.11.8 Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐞 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants