-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🐛 Use a different object name for each ClusterResultSet test case #4081
🐛 Use a different object name for each ClusterResultSet test case #4081
Conversation
/test pull-cluster-api-test-main |
2 similar comments
/test pull-cluster-api-test-main |
/test pull-cluster-api-test-main |
/test pull-cluster-api-test-main |
4 similar comments
/test pull-cluster-api-test-main |
/test pull-cluster-api-test-main |
/test pull-cluster-api-test-main |
/test pull-cluster-api-test-main |
72a5865
to
4ae0733
Compare
@vincepri @jsturtevant @furkatgofurov7 PTAL With this change, the ClusterResultSet test seems to be consistently passing |
I pulled your change into my branch and ran it locally via in goland and still see errors:
From my investigation what seems to be happening is the test client doesn't see the configMap right away (my custom logging):
and it quietly returns cluster-api/exp/addons/controllers/clusterresourceset_controller.go Lines 280 to 283 in 1ac7896
to
Seems like there are two things happening... The test controller doesn't get the value correctly (initially) and second if the the resource isn't there (maybe because of delay or caching) the reconciliation might not happen. |
looks like the test failed in prow as well :-( I saw this comment: Currently if the resource is not found it doesn't re-trigger reconciliation unless something else re-triggers it later. Should we consider adding this as an error and retrying reconciliation with a back-off in cases where the resource is missing? |
@jsturtevant the prow failure is in the machinepool test, and it is tracked in #4068 |
I see that now. looked too quick. These are the rough changes with the logging for debugging and retry: https://github.com/kubernetes-sigs/cluster-api/compare/master...jsturtevant:crs-objects-not-found-retry?expand=1. Seems that this is mainly caused by something in the test client caching (since retries fix it) but it might make the CRS more resilient in the cases that something wasn't on the cluster when the reconciliation happened for what ever reason. I also found that in this case where the ConfigMap object isn't found the |
/retest |
/test pull-cluster-api-test-main |
1 similar comment
/test pull-cluster-api-test-main |
/test pull-cluster-api-test-main |
aa7a57d
to
c69f3e8
Compare
@jsturtevant thanks! |
/milestone v0.4.0 |
Name: "test-clusterresourceset", | ||
Name: clusterResourceSetName, |
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.
Could we use generate name instead?
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.
/milestone v0.4.0
c69f3e8
to
90dfe19
Compare
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vincepri 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 |
What this PR does / why we need it:
Fix ClusterResultSet test flakes by ensuring that each test case uses a different CRS object name (instead of reusing always the same name).
Which issue(s) this PR fixes:
Fixes #4075