Skip to content

Fixing k8s.io/kubernetes/pkg/kubelet/kuberuntime unit tests on Windows #130182

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

marosset
Copy link
Contributor

What type of PR is this?

/kind failing-test

What this PR does / why we need it:

This PR fixes unit test failures in k8s.io/kubernetes/pkg/kubelet/kuberuntime when run on Windows

Which issue(s) this PR fixes:

Part of #130149

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


/sig windows node
/milestone v1.33

@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label Feb 14, 2025
@k8s-ci-robot k8s-ci-robot added this to the v1.33 milestone Feb 14, 2025
@k8s-ci-robot k8s-ci-robot added kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. sig/windows Categorizes an issue or PR as relevant to SIG Windows. sig/node Categorizes an issue or PR as relevant to SIG Node. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 14, 2025
@marosset
Copy link
Contributor Author

/test pull-kubernetes-unit-windows-master
This is expected to fail but the results should validate that k8s.io/kubernetes/pkg/kubelet/kuberuntime is clean on Windows

@marosset
Copy link
Contributor Author

/assgin @tallclair

@ffromani
Copy link
Contributor

/triage accepted
/priority important-longterm

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 16, 2025
@marosset
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Feb 18, 2025

@marosset: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-unit-windows-master c8f9e62 link false /test pull-kubernetes-unit-windows-master

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@marosset
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce

@marosset
Copy link
Contributor Author

/assign @tallclair
This skips a few more tests that require IPPVS support on Windows

@marosset
Copy link
Contributor Author

The unit test job is failing but all the tests in this package are passing in the PR job

@@ -237,6 +237,9 @@ func TestToKubeContainerStatus(t *testing.T) {
// TestToKubeContainerStatusWithResources tests the converting the CRI container status to
// the internal type (i.e., toKubeContainerStatus()) for containers that returns Resources.
func TestToKubeContainerStatusWithResources(t *testing.T) {
if goruntime.GOOS == "windows" {
t.Skip("InPlacePodVerticalScaling is not currently supported on Windows.")
}
Copy link
Member

Choose a reason for hiding this comment

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

The individual test cases below have a skipOnWindows option. If we're blanket skipping this whole test, can we remove that per-testcase version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

let me check the list of tests we are skipping against what is currently failing.
If it is only a few additional tests that need skipping i'll update the skipOnWindows, otherwise I can skip them all and drop the skipOnWindows per-testcase

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 removed the skipOnWindows support here.
thanks!

Copy link
Member

Choose a reason for hiding this comment

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

EDIT: never mind the previous (deleted) comments - looking at the code I see the resource conversion is gated on InPlacePodVerticalScaling and only performed for linux.

@marosset marosset force-pushed the windows-unit-tests-pkg-kubelet-kuberuntime-fixes branch from c8f9e62 to 3c77e05 Compare February 20, 2025 23:34
@k8s-ci-robot k8s-ci-robot removed the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 20, 2025
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 20, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: marosset
Once this PR has been reviewed and has the lgtm label, please ask for approval from tallclair. 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

@stmcginnis
Copy link
Contributor

Hello @marosset and @tallclair!

This pr has not been updated for about a week, so I'd like to check what's the status. If there's anything we can do, please let us know.

The code freeze is starting 02:00 UTC Friday 21st March 2025 (about 4 weeks from now), and while there is still time, we want to ensure that each PR has a chance to be merged on time.

As the issue is tagged for 1.33, is it still planned for this release? Thanks!

@haircommander haircommander moved this from Triage to PRs - Needs Reviewer in SIG Node CI/Test Board Feb 26, 2025
@stmcginnis
Copy link
Contributor

👋 Hello!

It looks like this PR might be getting a little too late. Is the plan still to resolve it for v1.33 release?

If so, a gentle reminder that the code freeze has started 02:00 UTC Friday 21st March 2025 . Please make sure any PRs have both lgtm and approved labels ASAP, and file an Exception if you haven't done it yet.

Thanks!

@liggitt liggitt modified the milestones: v1.33, v1.34 Apr 9, 2025
@@ -237,6 +237,9 @@ func TestToKubeContainerStatus(t *testing.T) {
// TestToKubeContainerStatusWithResources tests the converting the CRI container status to
// the internal type (i.e., toKubeContainerStatus()) for containers that returns Resources.
func TestToKubeContainerStatusWithResources(t *testing.T) {
if goruntime.GOOS == "windows" {
t.Skip("InPlacePodVerticalScaling is not currently supported on Windows.")
}
Copy link
Member

Choose a reason for hiding this comment

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

EDIT: never mind the previous (deleted) comments - looking at the code I see the resource conversion is gated on InPlacePodVerticalScaling and only performed for linux.

expected *kubecontainer.Status
skipOnWindows bool
input *runtimeapi.ContainerStatus
expected *kubecontainer.Status
}{
"container reporting cpu and memory": {
Copy link
Member

Choose a reason for hiding this comment

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

If we're skipping this test on windows, can we remove the windows conditional when setting the resources? (if goruntime.GOOS == "windows" below)

@Rajalakshmi-Girish Rajalakshmi-Girish moved this from Tracked to Pending inclusion in [sig-release] Bug Triage May 21, 2025
@tico88612
Copy link
Member

Hi @tallclair @marosset
This PR has not been updated for 1 month, so I'd like to check the status. If there's anything we can do, please let us know.
The code freeze is starting 02:00 UTC Friday 25th July 2025 (about 3 weeks from now). Please make sure the PR has both lgtm and approved labels before the code freeze. Thanks!

@tico88612 tico88612 moved this from Pending inclusion to Tracked in [sig-release] Bug Triage Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. 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/windows Categorizes an issue or PR as relevant to SIG Windows. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Status: PRs - Needs Reviewer
Status: Tracked
Development

Successfully merging this pull request may close these issues.

7 participants