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
Bug 1908891: test/e2e: Block on TestCoreDNSImageUpgrade image revert #226
Conversation
@sgreene570: This pull request references Bugzilla bug 1908891, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
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. |
6bc962f
to
b6cddee
Compare
@sgreene570: This pull request references Bugzilla bug 1908891, which is valid. 3 validation(s) were run on this bug
In response to this:
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. |
test/e2e/operator_test.go
Outdated
for _, pod := range podList.Items { | ||
for _, container := range pod.Spec.Containers { | ||
if container.Name == "dns" { | ||
if container.Image == expectedImage { | ||
return true, nil | ||
} | ||
break | ||
} | ||
} | ||
} | ||
return false, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to verify that every pod has the expected image, but it looks like this logic only makes sure that some pod does. We need to invert the logic as follows:
for _, pod := range podList.Items { | |
for _, container := range pod.Spec.Containers { | |
if container.Name == "dns" { | |
if container.Image == expectedImage { | |
return true, nil | |
} | |
break | |
} | |
} | |
} | |
return false, nil | |
for _, pod := range podList.Items { | |
for _, container := range pod.Spec.Containers { | |
if container.Name == "dns" { | |
if container.Image != expectedImage { | |
return false, nil | |
} | |
break | |
} | |
} | |
} | |
return true, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh, nice catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
b6cddee
to
9bc1bef
Compare
/lgtm |
It worked! It's failing on |
Maybe need to increase the timeout in |
9bc1bef
to
fad7cc2
Compare
bumped the timeout in |
/retest |
/test e2e-aws-operator |
@Miciah For the operator e2e test, could it be the case that the cluster version operator is reverting changes made to the CoreDNS Image env variable by the operator test's |
I think you're right, and the test needs fundamental changes. For now, I'd suggest adding |
TestCoreDNSImageUpgrade: Ensure that the CoreDNS image change for default DNS is completely reverted before moving onto the next test. TestDNSForwarding: Ensure that DNS pods are all available before verifying Corefile contents from each DNS pod. Also, log pod status if a given pod's Corefile doesn't meet the test's expectations. This commit enhances the DNS operator tests to resolve BZ#1908891, in which TestDNSForwarding is noted as very flakey due to TestDNSForwarding's image revert rollout not blocking the premature execution of TestDNSFowarding.
Done. I also created a bugzilla to track this fix (and mentioned it in code comments above the skip statement). |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Miciah, sgreene570 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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
/test e2e-upgrade |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
@sgreene570: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
@sgreene570: All pull requests linked via external trackers have merged: Bugzilla bug 1908891 has been moved to the MODIFIED state. In response to this:
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. |
Block on TestCoreDNSImageUpgrade image revert
TestCoreDNSImageUpgrade: Ensure that the CoreDNS image change for default DNS is completely reverted before moving onto the next test.
TestDNSForwarding: Ensure that DNS pods are all available before verifying Corefile contents from each DNS pod. Also, log pod status if a given pod's Corefile doesn't meet the test's expectations.
This commit enhances the DNS operator tests to resolve BZ#1908891, in which TestDNSForwarding is noted as very flakey due to TestDNSForwarding's image revert rollout not blocking the premature execution of TestDNSFowarding.