-
Notifications
You must be signed in to change notification settings - Fork 518
fix tests - adding missing role, increase timeout #1655
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
Conversation
@@ -237,7 +237,7 @@ func DeployOperator(ctx context.Context, config TestConfig, resourceName string, | |||
return err | |||
} | |||
|
|||
if err := wait.PollUntilContextTimeout(ctx, time.Second, 60*time.Second, true, hasDeploymentRequiredReplicas(&dep)); err != nil { | |||
if err := wait.PollUntilContextTimeout(ctx, time.Second*2, 120*time.Second, true, hasDeploymentRequiredReplicas(&dep)); err != 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.
looking at the recent test failures, it was due to the fact that the deployment needed a bit more than 60 seconds to stablize
2m2s Normal Created pod/mongodb-kubernetes-operator-6c5f7d74b9-6qb6m spec.containers{mongodb-kubernetes-operator} kubelet, kind-control-plane Created container mongodb-kubernetes-operator 2m2s 1 mongodb-kubernetes-operator-6c5f7d74b9-6qb6m.18194a55944214a5
61s Warning FailedScheduling pod/mongodb-kubernetes-operator-57d64f66d7-9dmm5 default-scheduler 0/1 nodes are available: 1 node(s) didn't match pod affinity/anti-affinity rules, 1 node(s) didn't match pod anti-affinity rules. 2m2s 3 mongodb-kubernetes-operator-57d64f66d7-9dmm5.18194a559645561a
45s Normal Killing pod/mongodb-kubernetes-operator-6c5f7d74b9-6qb6m spec.containers{mongodb-kubernetes-operator} kubelet, kind-control-plane Stopping container mongodb-kubernetes-operator 45s 1 mongodb-kubernetes-operator-6c5f7d74b9-6qb6m.18194a6763ffc4de
14s Normal Scheduled pod/mongodb-kubernetes-operator-57d64f66d7-9dmm5 default-scheduler Successfully assigned default/mongodb-kubernetes-operator-57d64f66d7-9dmm5 to kind-control-plane 14s 1 mongodb-kubernetes-operator-57d64f66d7-9dmm5.18194a6eb254d17d
13s Normal Started
{ | ||
Role: "MongodbAutomationAgentUserRole", | ||
DB: "admin", | ||
Privileges: []mdbv1.Privilege{ | ||
{ | ||
Resource: mdbv1.Resource{ | ||
AnyResource: true, | ||
}, | ||
Actions: []string{"bypassDefaultMaxTimeMS"}, | ||
}, | ||
}, | ||
Roles: []mdbv1.Role{}, | ||
}, | ||
} |
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.
Correct me if I'm wrong, but we added this because the automation config sometimes had this role without us specifying it?
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.
No - I think this test consistently fails IIUC. It seems the last time the ci was fully green was 4 months ago: https://github.com/mongodb/mongodb-kubernetes-operator/actions/workflows/e2e.yml?query=is%3Asuccess.
It would be nice to see single test history ...
Alternatively, we can cut that agent out from the received list.
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.
Alright, thanks. Feel free to resolve
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.
LGTM
Summary:
from test
https://github.com/mongodb/mongodb-kubernetes-operator/actions/runs/12671524133/job/35384225989#step:13:314
its passing now: https://github.com/mongodb/mongodb-kubernetes-operator/actions/runs/12707699284/job/35423341022?pr=1655