Skip to content

fix(instanceset): round rolling update percentages up#10676

Open
leon-ape wants to merge 1 commit into
mainfrom
bugfix/rolling-update-roundup
Open

fix(instanceset): round rolling update percentages up#10676
leon-ape wants to merge 1 commit into
mainfrom
bugfix/rolling-update-roundup

Conversation

@leon-ape

Copy link
Copy Markdown
Collaborator

Summary

  • calculate rollingUpdate.replicas percentages with round-up semantics
  • calculate rollingUpdate.maxUnavailable percentages with round-up semantics
  • add regression coverage for a 34% value across three instances

The API documentation specifies that percentage values are rounded up; the previous implementation passed roundUp=false in both the legacy Pod and Instance API paths.

Tests

  • go test -mod=mod ./pkg/controller/instanceset2 -run TestParseReplicasNMaxUnavailableRoundsPercentUp -count=1
  • go test -mod=mod ./pkg/controller/instanceset -run TestParseReplicasNMaxUnavailableRoundsPercentUp -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 63.92%. Comparing base (12611aa) to head (42e0fd4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10676      +/-   ##
==========================================
- Coverage   63.97%   63.92%   -0.05%     
==========================================
  Files         520      520              
  Lines       62887    62887              
==========================================
- Hits        40229    40199      -30     
- Misses      19071    19092      +21     
- Partials     3587     3596       +9     
Flag Coverage Δ
unittests 63.92% <100.00%> (-0.05%) ⬇️

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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 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