Skip to content
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

Added non-serialized metrics for windows, for 3 pods #105854

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

NikhilSharmaWe
Copy link
Member

What type of PR is this?

Enhancement

What this PR does / why we need it:

Added non-serialized metrics for windows, for 3 pods

Which issue(s) this PR fixes:

Fixes #104418

Special notes for your reviewer:

I am not sure about this change, if this is wrong please guide me.

Does this PR introduce a user-facing change?


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


@k8s-ci-robot k8s-ci-robot 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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. 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 Oct 23, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @NikhilSharmaWe. 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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Oct 23, 2021
@k8s-ci-robot k8s-ci-robot added sig/testing Categorizes an issue or PR as relevant to SIG Testing. sig/windows Categorizes an issue or PR as relevant to SIG Windows. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 23, 2021
@shivanshuraj1333
Copy link
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 Oct 23, 2021
@marosset marosset added this to In Progress (v1.23) in SIG-Windows Nov 4, 2021
@marosset
Copy link
Contributor

marosset commented Nov 4, 2021

/assign

@@ -59,7 +59,7 @@ var _ = SIGDescribe("[Feature:Windows] Kubelet-Stats [Serial]", func() {

ginkgo.By("Getting kubelet stats 5 times and checking average duration")
iterations := 5
var totalDurationMs int64
var totalDurationMs int
Copy link
Contributor

Choose a reason for hiding this comment

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

duration.Milliseconds() returns int64 so we should keep this var int64 as well.
https://pkg.go.dev/time#Duration.Milliseconds

Copy link
Contributor

Choose a reason for hiding this comment

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

This should fix a lot of the build / typecheck errors too

@@ -99,6 +99,70 @@ var _ = SIGDescribe("[Feature:Windows] Kubelet-Stats [Serial]", func() {
})
})
})
var _ = SIGDescribe("[Feature:Windows] Kubelet-Stats", func() {
f := framework.NewDefaultFramework("kubelet-stats-test-windows")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make this unique (or add -serial to the one one line 39 above?)

framework.ExpectNoError(err, "Error finding Windows node")
framework.Logf("Using node: %v", targetNode.Name)

ginkgo.By("Scheduling 10 pods")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ginkgo.By("Scheduling 10 pods")
ginkgo.By("Scheduling 3 pods")
Suggested change
ginkgo.By("Scheduling 10 pods")
ginkgo.By("Scheduling 10 pods")

timeout := 3 * time.Minute
e2epod.WaitForPodsRunningReady(f.ClientSet, f.Namespace.Name, 3, 0, timeout, make(map[string]string))

ginkgo.By("Getting kubelet stats 5 times and checking average duration")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why this is querying the container stats 5 times?
I think it should be sufficient to just query stats once and ensure all of the values we expect to be non-zero are non-zero (bonus points if we can check to make sure they fall within an expected range).

@NikhilSharmaWe
Copy link
Member Author

NikhilSharmaWe commented Nov 6, 2021

@marosset could you please confirm on the changes made. Unable to figure out the cause of test fails.

@NikhilSharmaWe
Copy link
Member Author

@marosset this error is related to type of totalDurationMs, but I am unable to find out the cause of the error.
https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/105854/pull-kubernetes-verify-govet-levee/1456828807108366336

@marosset
Copy link
Contributor

marosset commented Nov 8, 2021

@marosset this error is related to type of totalDurationMs, but I am unable to find out the cause of the error. https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/105854/pull-kubernetes-verify-govet-levee/1456828807108366336

pull-kubernetes-typecheck has some details for the error

ERROR(linux/arm): /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/windows/kubelet_stats.go:132:6: invalid operation: mismatched types int and int64
ERROR(linux/arm): /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/windows/kubelet_stats.go:157:22: invalid operation: mismatched types int and int64

https://github.com/kubernetes/kubernetes/pull/105854/files#diff-36d32acf28aadd81b686bade1357da7735107d8037d36f1d727c2e368a82e0d7R126 likely needs to be updated to int64

@marosset
Copy link
Contributor

marosset commented Nov 8, 2021

/triage accepted
/priority important-longterm

@k8s-ci-robot k8s-ci-robot added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Nov 8, 2021
@k8s-ci-robot k8s-ci-robot added 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 Nov 8, 2021
@NikhilSharmaWe
Copy link
Member Author

@marosset Is this PR ready or is there something still to be worked on.

@marosset
Copy link
Contributor

marosset commented Nov 8, 2021

/lgtm
/approve

i see the test passing in the pull-kubernetes-e2e-aks-engine-windows-containerd PR job.

Thanks @NikhilSharmaWe

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 8, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: marosset, NikhilSharmaWe

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

The pull request process is described 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 8, 2021
@NikhilSharmaWe
Copy link
Member Author

@marosset it is showing that the PR needs kind label, what should be the kind for this PR or can you add an appropriate one.

@marosset
Copy link
Contributor

marosset commented Nov 8, 2021

/release-note-none
/kind cleanup

@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. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Nov 8, 2021
@k8s-ci-robot k8s-ci-robot merged commit 61138d3 into kubernetes:master Nov 8, 2021
SIG-Windows automation moved this from In Progress (v1.23) to Done (v1.23) Nov 8, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Nov 8, 2021
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. 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. 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. 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/testing Categorizes an issue or PR as relevant to SIG Testing. sig/windows Categorizes an issue or PR as relevant to SIG Windows. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
SIG-Windows
  
Done (v1.23)
Development

Successfully merging this pull request may close these issues.

Add non-serialized metrics tests for Windows
4 participants