-
Notifications
You must be signed in to change notification settings - Fork 382
Make timeout of any request to the broker globally configurable #2666
Conversation
Hi @viviyww. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
/assign @jberkhahn |
/assign @mszostok |
/ok-to-test |
const testOSBTimeOut = time.Second * 80 | ||
_, _, _, testController, _ := newTestController(t, getTestCatalogConfig()) | ||
testController.OSBAPITimeOut = testOSBTimeOut | ||
if err := reconcileClusterServiceBroker(t, testController, getTestClusterServiceBroker()); 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.
u still have wrong expectation :)
if err := reconcileClusterServiceBroker(t, testController, getTestClusterServiceBroker()); err != nil {
t.Fatalf("Unexpected reconcileClusterServiceBroker failure: %v", err)
}
@@ -286,6 +286,19 @@ func TestReconcileClusterServiceBrokerExistingServiceClassAndServicePlan(t *test | |||
assertNumberOfActions(t, kubeActions, 0) | |||
} | |||
|
|||
func TestReconcileClusterServiceBrokerSetOSBTimeOut(t *testing.T) { |
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 is a pattern that each test have a description, e.g. https://github.com/kubernetes-sigs/service-catalog/blob/48e6805363476ffb91faabf6aca6d03c96d123b0/pkg/controller/controller_clusterservicebroker_test.go#L692-L695
so please add sth similar also here
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.
ok, I will recheck it, thanks.
/test pull-service-catalog-unit |
/ok-to-test |
748a72c
to
840e137
Compare
@mszostok It is ok now, thanks. |
/assign @jberkhahn |
/lgtm |
/assign @MHBauer |
/assign @jberkhahn Please help to review it or merge it, thanks. |
t.Fatalf("This should not fail : %v", err) | ||
} | ||
createdClient := testController.brokerClientManager.clients[NewClusterServiceBrokerKey(getTestClusterServiceBroker().Name)] | ||
if createdClient.clientConfig.TimeoutSeconds != int(testController.OSBAPITimeOut.Seconds()) { |
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.
shouldn't this match the constant on 239? both client.config/timeoutseconds and testcontroller.osbapitimeout.seconds?
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, it should not be the same. It is just a test case. Thanks for review 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.
you set them to be the same on line 241. why bother having the const then?
clientConfig := osb.DefaultClientConfiguration() | ||
clientConfig.Name = meta.Name | ||
clientConfig.URL = commonSpec.URL | ||
clientConfig.AuthConfig = authConfig | ||
clientConfig.EnableAlphaFeatures = true | ||
clientConfig.Insecure = commonSpec.InsecureSkipTLSVerify | ||
clientConfig.CAData = commonSpec.CABundle | ||
clientConfig.TimeoutSeconds = int(osbAPITimeOut.Seconds()) |
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 don't really like that this is a float, but it's what we got.
I'm confused about where the value is used. |
Please see this issue #2657. I think it needs to be configurable. Take one of our usage scenarios, in the broker we developed, the response time exceeds 60s. And right now we can't use it. |
We find the delay in creating instance binding varies. The current default is to wait one minute, otherwise the creation is considered a failure. So I do this patch to solve this problem. And I think this delay is configured for different usage scenarios or brokers. For example, when the maximum response time of my service is 1 minute, we may set it to be 60, While yours is 3 minutes, and then you should set it to be 180.
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jberkhahn, viviyww 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 |
/lgtm |
/test pull-service-catalog-xbuild |
2 similar comments
/test pull-service-catalog-xbuild |
/test pull-service-catalog-xbuild |
@mszostok This test case failed for the pkg in the vendor. Maybe it needs to be updated. This problem has little to do with the patch itself. Thanks. |
Fix test case pull-service-catalog-xbuild about issue kubernetes-retired#2666
@viviyww but in logs I can see that |
/retest |
We find the delay in creating instance binding varies. The current
default is to wait one minute, otherwise the creation is considered
a failure. So I do this patch to solve this problem. And I think this
delay is configured for different usage scenarios or brokers.
For example, when the maximum response time of my service is 1 minute,
we may set it to be 60, While yours is 3 minutes, and then you should
set it to be 180.
This PR is a
What this PR does / why we need it:
Which issue(s) this PR fixes
Fixes #
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