Skip to content

[PodLevelResources] Add more comprehensive test cases to kubelet #132601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

toVersus
Copy link
Contributor

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Added comprehensive test cases to the kubelet unit tests and node E2E tests. For the node E2E tests, I've added test cases based on the table in the Comprehensive Tabular View section of the PodSpec Validation Rules in the KEP.

Which issue(s) this PR is related to:

KEP: kubernetes/enhancements#2837

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

[KEP]: https://github.com/kubernetes/enhancements/issues/2837

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 29, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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 the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 29, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @toVersus. Thanks for your PR.

I'm waiting for a kubernetes 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.

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 the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Jun 29, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: toVersus
Once this PR has been reviewed and has the lgtm label, please assign random-liu for approval. For more information see the Code Review Process.

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

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 area/kubelet area/test sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jun 29, 2025
@k8s-ci-robot k8s-ci-robot requested a review from tzneal June 29, 2025 03:18
@@ -165,7 +165,7 @@ func podLevelResourcesTests(f *framework.Framework) {

tests := []testCase{
{
name: "Guaranteed QoS pod with container resources",
name: "Guaranteed QoS pod with only container resources",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed this because it was duplicated with the test case name at l.188.

name: "Guaranteed QoS pod with container resources",

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for fixing this and also for the PR :)

@toVersus
Copy link
Contributor Author

/cc @ndixita

@k8s-ci-robot k8s-ci-robot requested a review from ndixita June 29, 2025 03:20
@toVersus toVersus force-pushed the test/more-pod-level-resources branch from 027447e to dddda58 Compare June 29, 2025 06:16
@hshiina
Copy link
Contributor

hshiina commented Jun 29, 2025

/ok-to-test
/test pull-kubernetes-node-kubelet-serial-podresources

@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 Jun 29, 2025
@toVersus
Copy link
Contributor Author

pull-kubernetes-unit failed with the following error, but it's unrelated.

{Failed  === RUN   TestStreamTranslator_BlockRedirects
    streamtranslator_test.go:828: expected redirect not allowed error, got (closed all streams)
--- FAIL: TestStreamTranslator_BlockRedirects (0.06s)
}

pull-kubernetes-unit-windows-master failed with the following error, which is a known flake (see #131320).

{Failed  === RUN   TestEviction/add
=== PAUSE TestEviction/add
=== CONT  TestEviction/add
(...)
    device_taint_eviction_test.go:1378: FATAL ERROR: 
        Timed out after 30.007s.
        pod evicted
    device_taint_eviction_test.go:1356: Waiting for goroutine termination...
--- FAIL: TestEviction/add (30.05s)

=== RUN   TestEviction
=== PAUSE TestEviction
=== CONT  TestEviction
--- FAIL: TestEviction (0.13s)
}

/retest

@toVersus
Copy link
Contributor Author

/test pull-kubernetes-unit

{"component":"entrypoint","file":"sigs.k8s.io/prow/pkg/entrypoint/run.go:173","func":"sigs.k8s.io/prow/pkg/entrypoint.Options.ExecuteProcess","level":"error","msg":"Entrypoint received interrupt: terminated","severity":"error","time":"2025-06-30T00:26:14Z"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubelet area/test 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. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. 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. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Development

Successfully merging this pull request may close these issues.

4 participants