Skip to content

fix(instanceset): round rolling update replicas up - #10676

Merged
leon-ape merged 3 commits into
mainfrom
bugfix/rolling-update-roundup
Aug 14, 2026
Merged

fix(instanceset): round rolling update replicas up#10676
leon-ape merged 3 commits into
mainfrom
bugfix/rolling-update-roundup

Conversation

@leon-ape

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

Copy link
Copy Markdown
Collaborator

Summary

  • calculate percentage-based rollingUpdate.replicas by rounding up in both the legacy Pod and Instance API update paths
  • preserve the conservative rollingUpdate.maxUnavailable behavior: round percentages down and clamp the result to at least 1
  • correct the API documentation and regenerate the affected CRD and API reference artifacts
  • keep the regression coverage in the conventional reconciler_update_test.go files
  • synchronize the branch with the latest main

For three instances with both fields set to 34%, the resolved quotas are replicas: 2 and maxUnavailable: 1. This lets the requested rollout window make progress without increasing the established unavailability budget.

Tests

  • scripts/codex-go-test.sh ./pkg/controller/instanceset -run TestAPIs -ginkgo.focus="update reconciler test" -count=1
  • scripts/codex-go-test.sh ./pkg/controller/instanceset2 -run TestParseReplicasNMaxUnavailable -count=1

Fixes #10641

@leon-ape
leon-ape requested a review from a team as a code owner July 15, 2026 15:08
@github-actions github-actions Bot added the size/M Denotes a PR that changes 30-99 lines. label Jul 15, 2026
@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

@leon-ape leon-ape added pick-1.0 Auto cherry-pick to release-1.0 when PR merged pick-1.1 Auto cherry-pick to release-1.1 when PR merged labels Jul 15, 2026
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10676      +/-   ##
==========================================
+ Coverage   64.85%   64.94%   +0.09%     
==========================================
  Files         506      506              
  Lines       63316    63335      +19     
==========================================
+ Hits        41062    41132      +70     
+ Misses      18611    18571      -40     
+ Partials     3643     3632      -11     
Flag Coverage Δ
unittests 64.94% <100.00%> (+0.09%) ⬆️

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.

@github-actions github-actions Bot added size/L Denotes a PR that changes 100-499 lines. and removed size/M Denotes a PR that changes 30-99 lines. labels Aug 14, 2026
@leon-ape leon-ape changed the title fix(instanceset): round rolling update percentages up fix(instanceset): round rolling update replicas up Aug 14, 2026
@leon-ape leon-ape added nopick Not auto cherry-pick when PR merged and removed pick-1.0 Auto cherry-pick to release-1.0 when PR merged pick-1.1 Auto cherry-pick to release-1.1 when PR merged labels Aug 14, 2026
@leon-ape

Copy link
Copy Markdown
Collaborator Author

/approve

@apecloud-bot apecloud-bot added the approved PR Approved Test label Aug 14, 2026
@leon-ape leon-ape added this to the Release 1.2.0 milestone Aug 14, 2026
@leon-ape
leon-ape merged commit 6d7846f into main Aug 14, 2026
49 checks passed
@leon-ape
leon-ape deleted the bugfix/rolling-update-roundup branch August 14, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved PR Approved Test nopick Not auto cherry-pick when PR merged size/L Denotes a PR that changes 100-499 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