-
Notifications
You must be signed in to change notification settings - Fork 385
Improve caching OSB clients #2577
Improve caching OSB clients #2577
Conversation
Hi @piotrmiskiewicz. Thanks for your PR. I'm waiting for a kubernetes-incubator or kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
a8d665d
to
5fa284b
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.
looks good, add an error check and I think you are good to go.
if !found { | ||
return nil, fmt.Errorf("OSB client not found for the broker %s", broker.Name) | ||
} | ||
brokerClient, err = c.clusterServiceBrokerClient(broker) |
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.
check for non-nil err after this
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.
you are right, the check is missing, added
7f0923d
to
cbae253
Compare
Thanks @piotrmiskiewicz! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jboyd01 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 |
Do you think it would be possible add a new test to replace the one removed in controller_servicebroker_test.go? Something to test the new client fetching the auth info? |
Hi, I'm planning rewrite integration tests as a part of switching to CRDs. The PR is not yet prepared, but I have a controller test which covers the scenario. I've just cherry-picked the commit to the branch with refreshing auth info and I've created a branch to show you how it will looks like. The test is passing, see: https://github.com/piotrmiskiewicz/service-catalog/blob/osb-test/test/controller/flow_test.go#L13 You can see there:
|
I realized the test TestReconcileServiceBrokerUpdatesBrokerClient still can work, I've restored it. |
33bb5bd
to
166ccbc
Compare
/lgtm |
Hmm, the git robot didn't assign the issue to me when i commented on Friday. Weird. |
This PR is a
What this PR does / why we need it:
The idea of caching OSB clients was changed:
Which issue(s) this PR fixes
Fixes #2576
Fixes #2563
Please leave this checklist in the PR comment so that maintainers can ensure a good PR.
Merge Checklist:
breaking the chart release and existing clients who provide a
flag that will get an error when they try to update