-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
🌱 Cleanup separate unstructuredCachingClient #10692
🌱 Cleanup separate unstructuredCachingClient #10692
Conversation
/test pull-cluster-api-e2e-main |
/hold to check logs of #10691 e2e-min for uncached unstructured get/list occurences first |
/hold cancel Test results from #10691
I think in all 3 cases it's okay to also use cached calls. So I think it's fine to just always cache unstructured. |
(I'll take a look at the unit test failures) |
Signed-off-by: Stefan Büringer buringerst@vmware.com
1824136
to
4714c48
Compare
@@ -338,7 +338,7 @@ func TestCloneConfigsAndGenerateMachine(t *testing.T) { | |||
}, | |||
}, | |||
} | |||
g.Expect(env.Create(ctx, genericInfrastructureMachineTemplate)).To(Succeed()) | |||
g.Expect(env.CreateAndWait(ctx, genericInfrastructureMachineTemplate)).To(Succeed()) |
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.
I think I had to change this because now the tests are also using cached unstructured get/list calls (production code in KCP always did)
/test pull-cluster-api-e2e-main |
@sbueringer: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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-sigs/prow repository. I understand the commands that are listed here. |
/lgtm |
LGTM label has been added. Git tree hash: ff72e4c0092ffbea477e7b93a5a8d3427ce933b7
|
@@ -42,29 +42,26 @@ import ( | |||
|
|||
// ClusterReconciler reconciles a Cluster object. | |||
type ClusterReconciler struct { | |||
Client client.Client |
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.
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.
I can add the fields here again (with //Deprecated and without using them) if you want.
This would allow folks one more minor release to not set these fields. Not sure if it makes much difference to be honest
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
Nice cleanup!
I have only one question: is there a way to check if before this change the regular Client was used for reading unstructured somewhere, and check if this code might be relying to the fact that the read was not cached?
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
[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 |
I basically did the following:
This way I identified the following cases: (see diff on #10691 for the first two)
After that I looked manually at the cases and they all seem safe to me. I think aparat from that we would have the following options. To identify those cases:
To assess if these cases are problematic:
|
Signed-off-by: Stefan Büringer buringerst@vmware.com
What this PR does / why we need it:
Noticed that we still have the separate unstructuredCachingClient when reviewing Christians CRS PR.
This PR removes the separate client and instead configured the manager default client to cache all unstructured calls.
I've opened a separate PR (#10691) to check if we were still using uncached unstructured get/list calls anywhere (to see if thoes additional usages are safe).
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #