Skip to content

fix(api): allow PodGroup minMember of 0 (v0.14 backport) - #2085

Merged
gshaibi merged 2 commits into
v0.14from
backport-1989-to-v0.14
Aug 19, 2026
Merged

fix(api): allow PodGroup minMember of 0 (v0.14 backport)#2085
gshaibi merged 2 commits into
v0.14from
backport-1989-to-v0.14

Conversation

@gshaibi

@gshaibi gshaibi commented Aug 17, 2026

Copy link
Copy Markdown
Member

Description

Backport of #1989 to v0.14.

Adapted for this branch: MinMember here is a plain int32 (not *int32 as on main) and minSubGroup does not exist, so:

  • CRD/kubebuilder marker relaxed from Minimum=1 to Minimum=0: explicit minMember: 0 (e.g. knative scale-to-zero podgroups) is no longer rejected by the API server.
  • The scheduler's existing default of minAvailable 1 is kept: since a non-pointer int32 with omitempty cannot distinguish unset from explicit 0, honoring 0 would silently flip gang semantics for PodGroups created without minMember (this is asserted by TestSnapshotPodGroups). The full elastic minMember=0 behavior from main is therefore not backported.
  • The minSubGroup webhook/e2e changes from the original PR are dropped (field does not exist on this branch).

Same adaptation as #2086 (v0.12).

Related Issues

Backport of #1989.

Checklist

  • Self-reviewed
  • Added/updated tests (if needed)
  • Updated documentation (if needed)
  • Added a changelog fragment via make changelog (or applied the skip-changelog label). Do not edit CHANGELOG.md directly — pending fragments are folded into it at release time.

Breaking Changes

None.

Additional Notes

Unit tests pass locally for pkg/scheduler/api/podgroup_info, pkg/scheduler/cache/..., pkg/podgrouper/.../knative, and pkg/apis/scheduling/v2alpha2. The v0.9 backport (#2087) was closed: that branch never had the Minimum=1 marker, so the bug does not exist there.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 326396a4-5307-455b-962e-2e334588f532

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

davidLif
davidLif previously approved these changes Aug 17, 2026
Adapted backport: MinMember is a non-pointer int32 on this branch, so
unset and explicit 0 are indistinguishable. The CRD now accepts 0, but
the scheduler keeps defaulting minAvailable to 1 to preserve existing
gang semantics for PodGroups created without minMember.

Signed-off-by: lin121291 <4jp33f9e@gmail.com>
(cherry picked from commit 62c594b)
Signed-off-by: gshaibi <gshaibi@nvidia.com>
@gshaibi
gshaibi force-pushed the backport-1989-to-v0.14 branch from f774024 to d72e59d Compare August 17, 2026 13:06
@gshaibi
gshaibi disabled auto-merge August 19, 2026 07:30
@gshaibi
gshaibi enabled auto-merge (squash) August 19, 2026 07:30
@gshaibi
gshaibi merged commit 4528af7 into v0.14 Aug 19, 2026
12 checks passed
@gshaibi
gshaibi deleted the backport-1989-to-v0.14 branch August 19, 2026 08:00
@KaiPilotBot

Copy link
Copy Markdown
Collaborator

📝 Changelog fragment recorded

Thanks! This PR added the changelog fragment(s) below. Pending fragments are folded into CHANGELOG.md at release time, so it was intentionally not modified by this PR — your entry will appear in the next release:

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants