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

flaky-test: TestManifestFilesAreEqual #2932

Closed
neolit123 opened this issue Sep 12, 2023 · 7 comments · Fixed by kubernetes/kubernetes#120602
Closed

flaky-test: TestManifestFilesAreEqual #2932

neolit123 opened this issue Sep 12, 2023 · 7 comments · Fixed by kubernetes/kubernetes#120602
Assignees
Labels
kind/flake Categorizes issue or PR as related to a flaky test. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Milestone

Comments

@neolit123
Copy link
Member

neolit123 commented Sep 12, 2023

kubernetes/kubernetes#120598
https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/120598/pull-kubernetes-unit/1701530801671245824
https://testgrid.k8s.io/presubmits-kubernetes-blocking#pull-kubernetes-unit

{Failed;Failed;Failed;  === RUN   TestManifestFilesAreEqual/manifests_are_not_equal
    utils_test.go:832: ManifestFilesAreEqual diff doesn't expected
        manifests are not equal
        	expected diff: 
        - 					"2",
        + 					"1",
        actual diff:   &v1.Pod{
          	TypeMeta:   {Kind: "Pod", APIVersion: "v1"},
          	ObjectMeta: {Name: "etcd", Namespace: "kube-system", Labels: {"component": "etcd", "tier": "control-plane"}},
          	Spec: v1.PodSpec{
          		Volumes:        nil,
          		InitContainers: nil,
          		Containers: []v1.Container{
          			{
          				Name: "",
          				Image: strings.Join({
          					"gcr.io/google_containers/etcd-amd64:3.1.1",
        - 					"2",
        + 					"1",
          				}, ""),
          				Command: nil,
          				Args:    nil,
          				... // 20 identical fields
          			},
          		},
          		EphemeralContainers: nil,
          		RestartPolicy:       "",
          		... // 34 identical fields
          	},
          	Status: {},
          }
    --- FAIL: TestManifestFilesAreEqual/manifests_are_not_equal (0.01s)
;=== RUN   TestManifestFilesAreEqual/manifests_are_not_equal_for_adding_new_defaults
    utils_test.go:832: ManifestFilesAreEqual diff doesn't expected
        manifests are not equal for adding new defaults
        	expected diff: 
        - 		RestartPolicy:                 "Always",
        + 		RestartPolicy:                 "",
        actual diff:   &v1.Pod{
          	TypeMeta:   {Kind: "Pod", APIVersion: "v1"},
          	ObjectMeta: {Name: "etcd", Namespace: "kube-system", Labels: {"component": "etcd", "tier": "control-plane"}},
          	Spec: v1.PodSpec{
          		... // 2 identical fields
          		Containers:                    {{Image: "gcr.io/google_containers/etcd-amd64:3.1.11"}},
          		EphemeralContainers:           nil,
        - 		RestartPolicy:                 "Always",
        + 		RestartPolicy:                 "",
          		TerminationGracePeriodSeconds: nil,
          		ActiveDeadlineSeconds:         nil,
          		... // 32 identical fields
          	},
          	Status: {},
          }
    --- FAIL: TestManifestFilesAreEqual/manifests_are_not_equal_for_adding_new_defaults (0.00s)
;=== RUN   TestManifestFilesAreEqual
--- FAIL: TestManifestFilesAreEqual (0.02s)
;}

are we catching the flakynes we are seeing in e2e CI with this?
related to this maybe:
#2927
?

@neolit123 neolit123 added priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. kind/flake Categorizes issue or PR as related to a flaky test. labels Sep 12, 2023
@neolit123 neolit123 added this to the v1.29 milestone Sep 12, 2023
@neolit123 neolit123 changed the title resolve TestManifestFilesAreEqual flakes flaky-test: TestManifestFilesAreEqual Sep 12, 2023
@neolit123
Copy link
Member Author

is this using the new deserializer from this PR?
kubernetes/kubernetes#120549

seems like it.

we need to see if the flake continues after removing the internal defaulters:
kubernetes/kubernetes#120561

cc @chendave @SataQiu is that change ready to go?

@SataQiu
Copy link
Member

SataQiu commented Sep 12, 2023

Is that change ready to go?

I think we're ready to go. feel free to cancel hold for kubernetes/kubernetes#120561
cc @neolit123 @pacoxu @chendave

@pacoxu
Copy link
Member

pacoxu commented Sep 12, 2023

Let's wait to see if it still flakes after kubernetes/kubernetes#120561 is merged..

@pacoxu
Copy link
Member

pacoxu commented Sep 12, 2023

I opened kubernetes/kubernetes#120601 to fix it.

@SataQiu
Copy link
Member

SataQiu commented Sep 12, 2023

Sorry for missing kubernetes/kubernetes#120601 @pacoxu @neolit123
Also opened kubernetes/kubernetes#120602 as a fix patch.

@pacoxu
Copy link
Member

pacoxu commented Sep 12, 2023

Sorry for missing kubernetes/kubernetes#120601 @pacoxu @neolit123

Also opened kubernetes/kubernetes#120602 as a fix patch.

No worry. Feel free to close mine. Your fix seems to be better in addressing the root cause. I just make a replaceall to hide the problem directly😄.

@neolit123
Copy link
Member Author

let's watch if our flakes at https://testgrid.k8s.io/presubmits-kubernetes-blocking#pull-kubernetes-unit stop.
k8s.io/kubernetes/cmd/kubeadm/app/util/staticpod.staticpod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/flake Categorizes issue or PR as related to a flaky test. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Projects
None yet
3 participants