Skip to content

fix: pass NodeList to processAllNodesForRule in tests#256

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
sahitya-chandra:fix/test-compile-processallnodesforrule
May 15, 2026
Merged

fix: pass NodeList to processAllNodesForRule in tests#256
k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
sahitya-chandra:fix/test-compile-processallnodesforrule

Conversation

@sahitya-chandra
Copy link
Copy Markdown
Contributor

@sahitya-chandra sahitya-chandra commented May 15, 2026

Description

main is currently broken. Lint, Tests and E2E all fail at go vet:

vet: internal/controller/nodereadinessrule_controller_test.go:1881:58: not enough arguments in call to failController.processAllNodesForRule
	have (context.Context, *NodeReadinessRule)
	want (context.Context, *NodeReadinessRule, *corev1.NodeList)

#226 changed processAllNodesForRule to take a *corev1.NodeList, but the two new tests added in #216 still call it with the old two-argument signature. Both PRs were green on their own branches; the test file only stopped compiling once #216 landed on top of #226 on main.

Fix wraps the test node in a *corev1.NodeList and passes it through, same as reconcileNormal does. Filtering still happens inside the function, so behaviour is unchanged.

Related Issue

None

Type of Change

/kind bug
/kind failing-test

Testing

  • make lint clean
  • make test passes

Checklist

  • make test passes
  • make lint passes

Does this PR introduce a user-facing change?

NONE

processAllNodesForRule now takes a *corev1.NodeList, but two tests
still called it with the old two-argument signature, breaking the
build on main. Pass a NodeList through, matching the production caller.

Signed-off-by: Sahitya Chandra <sahityajb@gmail.com>
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. labels May 15, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 15, 2026

Deploy Preview for node-readiness-controller canceled.

Name Link
🔨 Latest commit 145d2ac
🔍 Latest deploy log https://app.netlify.com/projects/node-readiness-controller/deploys/6a06e4155057340008064f35

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 15, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @sahitya-chandra. 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.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

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.

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 15, 2026
@AvineshTripathi
Copy link
Copy Markdown
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot 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 May 15, 2026
@ajaysundark
Copy link
Copy Markdown
Contributor

Thanks @sahitya-chandra !

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 15, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ajaysundark, sahitya-chandra

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 15, 2026
@k8s-ci-robot k8s-ci-robot merged commit b4a52fa into kubernetes-sigs:main May 15, 2026
11 checks passed
@sahitya-chandra sahitya-chandra deleted the fix/test-compile-processallnodesforrule branch May 15, 2026 20:14
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/bug Categorizes issue or PR as related to a bug. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. 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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants