Skip to content

fix(instanceset): normalize planner role priorities - #10700

Merged
leon-ape merged 1 commit into
mainfrom
bugfix/instanceset-role-case
Jul 22, 2026
Merged

fix(instanceset): normalize planner role priorities#10700
leon-ape merged 1 commit into
mainfrom
bugfix/instanceset-role-case

Conversation

@leon-ape

@leon-ape leon-ape commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • normalize every InstanceSet role-priority lookup before reading the lower-case priority map
  • preserve BestEffortParallel quorum layers when ReplicaRole.Name uses mixed case
  • add a regression test covering mixed-case follower and leader roles across the actual update layers

Why

ComposeRolePriorityMap stores role names in lower case, but the BestEffort planner calculated its quorum and leader thresholds with the original ReplicaRole.Name. Names such as Follower and Leader therefore resolved to the default priority and could place multiple quorum members in the same update layer.

This is the InstanceSet counterpart to #10677.

Validation

go test ./pkg/controller/instanceset -count=1

Fixes #10641

@apecloud-bot

Copy link
Copy Markdown
Collaborator

Auto Cherry-pick Instructions

Usage:
  - /nopick: Not auto cherry-pick when PR merged.
  - /pick: release-x.x [release-x.x]: Auto cherry-pick to the specified branch when PR merged.

Example:
  - /nopick
  - /pick release-1.1

CLA Recheck Instructions

Usage:
  - /recheck-cla: Trigger a re-check of CLA status for this pull request.
Example:
  - /recheck-cla

@github-actions github-actions Bot added the size/M Denotes a PR that changes 30-99 lines. label Jul 22, 2026
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.05%. Comparing base (b1e0fcf) to head (5b8205b).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10700      +/-   ##
==========================================
+ Coverage   63.94%   64.05%   +0.11%     
==========================================
  Files         520      520              
  Lines       63013    63014       +1     
==========================================
+ Hits        40291    40363      +72     
+ Misses      19116    19059      -57     
+ Partials     3606     3592      -14     
Flag Coverage Δ
unittests 64.05% <100.00%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leon-ape leon-ape added the pick-1.1 Auto cherry-pick to release-1.1 when PR merged label Jul 22, 2026
@leon-ape
leon-ape marked this pull request as ready for review July 22, 2026 06:04
@leon-ape
leon-ape requested a review from a team as a code owner July 22, 2026 06:04
@leon-ape

Copy link
Copy Markdown
Collaborator Author

/approve

@apecloud-bot apecloud-bot added the approved PR Approved Test label Jul 22, 2026
@leon-ape
leon-ape merged commit 9106a97 into main Jul 22, 2026
48 of 49 checks passed
@leon-ape
leon-ape deleted the bugfix/instanceset-role-case branch July 22, 2026 06:28
@github-actions github-actions Bot added this to the Release 1.2.0 milestone Jul 22, 2026
@apecloud-bot

Copy link
Copy Markdown
Collaborator

/cherry-pick release-1.1

@apecloud-bot

Copy link
Copy Markdown
Collaborator

🤖 says: cherry pick action finished successfully 🎉!
See: https://github.com/apecloud/kubeblocks/actions/runs/29896873672

apecloud-bot pushed a commit that referenced this pull request Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved PR Approved Test pick-1.1 Auto cherry-pick to release-1.1 when PR merged size/M Denotes a PR that changes 30-99 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] KB v1.0.2 instanceUpdateStrategy/rollingUpdate/replicas no longer limit the updated pods

2 participants