Skip to content

Remove unused resource.IsZero function - #14546

Merged
kubernetes-prow[bot] merged 1 commit into
kubernetes-sigs:mainfrom
kavix:issue-14545
Aug 18, 2026
Merged

kubernetes-prow[bot] merged 1 commit into
kubernetes-sigs:mainfrom
kavix:issue-14545

Conversation

@kavix

@kavix kavix commented Aug 17, 2026 •

Copy link
Copy Markdown
Member

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Removes the unused IsZero function from pkg/util/resource.

Which issue(s) this PR fixes:

Fixes #14545

Special notes for your reviewer:

This pull request was prepared with AI assistance.

Does this PR introduce a user-facing change?

NONE

@kubernetes-prow kubernetes-prow Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. labels Aug 17, 2026
@netlify

netlify Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit bdb5e0c
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-kueue/deploys/6a83ff86b89e1b00074e5b34

@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: kavix / name: Kavindu Sachinthe (19f5b95)

@kubernetes-prow

Copy link
Copy Markdown

Welcome @kavix!

It looks like this is your first PR to kubernetes-sigs/kueue 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kueue has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@kubernetes-prow kubernetes-prow Bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 17, 2026
@kubernetes-prow

Copy link
Copy Markdown

Hi @kavix. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubernetes-prow kubernetes-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 17, 2026
@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d37d9aa0-21a6-4628-9864-8058b27af1a0

📥 Commits

Reviewing files that changed from the base of the PR and between 456c96f and bdb5e0c.

📒 Files selected for processing (1)
  • pkg/util/resource/resource.go
💤 Files with no reviewable changes (1)
  • pkg/util/resource/resource.go

Included review availability: Your plan includes up to 8 reviews per rolling hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The exported IsZero helper was removed from pkg/util/resource/resource.go. Extended-resource detection remains unchanged.

Changes

Resource helper removal

Layer / File(s) Summary
Remove IsZero helper
pkg/util/resource/resource.go
Removes the unused exported IsZero function and its empty-list and zero-quantity checks.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to bdb5e

This localized fix makes zero-valued non-empty ResourceLists evaluate correctly, with no actionable merge-blocking risk remaining beyond normal checks and review.

Suggested reviewers: kannon92

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The change removes IsZero but does not implement the documented zero-only ResourceList behavior or add the requested regression test [#14545]. Implement IsZero so empty and zero-only lists return true, mixed lists return false, and add focused regression tests.
✅ Passed checks (4 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The only reported change removes the IsZero helper, which is directly related to the linked issue and contains no unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the removed unused resource.IsZero function, which is the only change in the provided changeset.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 17, 2026
@mbobrovskyi

Copy link
Copy Markdown
Contributor

/ok-to-test

@kubernetes-prow kubernetes-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 18, 2026
Comment thread pkg/util/resource/resource.go
@kubernetes-prow kubernetes-prow Bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 18, 2026
@kavix
kavix requested a review from mbobrovskyi August 18, 2026 06:45
@pajakd

pajakd commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Please fix the PR description, title and set the relnotes to NONE.

@kavix kavix changed the title Fix resource.IsZero returning false for zero-valued ResourceLists Remove unused resource.IsZero function Aug 18, 2026
@kubernetes-prow kubernetes-prow Bot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Aug 18, 2026
@kavix

kavix commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

Please fix the PR description, title and set the relnotes to NONE.

Updated the PR title, description, kind to cleanup, and set the release notes to NONE. Thanks!

@kubernetes-prow kubernetes-prow Bot added the release-note-none Denotes a PR that doesn't merit a release note. label Aug 18, 2026
@kubernetes-prow kubernetes-prow Bot removed the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Aug 18, 2026
@tenzen-y

Copy link
Copy Markdown
Member

/kind cleanup

@kubernetes-prow kubernetes-prow Bot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Aug 18, 2026
@tenzen-y

Copy link
Copy Markdown
Member

/remove-kind bug

@kubernetes-prow kubernetes-prow Bot removed the kind/bug Categorizes issue or PR as related to a bug. label Aug 18, 2026

@tenzen-y tenzen-y left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.
/lgtm
/approve

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 18, 2026
@kubernetes-prow

Copy link
Copy Markdown

LGTM label has been added.

DetailsGit tree hash: 605be17f4f4a4fbc2581377e359577d4306ddc01

@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kavix, tenzen-y

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 18, 2026
@kubernetes-prow
kubernetes-prow Bot merged commit fbb60cc into kubernetes-sigs:main Aug 18, 2026
56 checks passed
@kubernetes-prow kubernetes-prow Bot added this to the v0.20 milestone Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the unused IsZero() function

4 participants