-
Notifications
You must be signed in to change notification settings - Fork 382
Fix deprovisioning process in TestBroker #2656
Conversation
Welcome @jasiu001! |
Hi @jasiu001. 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. |
/ok-to-test |
@@ -318,6 +319,7 @@ func CreateController() controller.Controller { | |||
Bindable: true, | |||
PlanUpdateable: true, | |||
}, | |||
DeprovisionFailTimes: -1, |
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.
that needs to be fixed in code,
if you set DeprovisionFailTimes
to 0 then it should not fail at all. In your case you will have one fail and only the second call will be successful.
so basically this:
if instance.deprovisionAttempts <= service.DeprovisionFailTimes {
should be changed to:
if service.DeprovisionFailTimes > 0 && instance.deprovisionAttempts < service.DeprovisionFailTimes {
@jasiu001 you need to execute the |
/test pull-service-catalog-xbuild |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jasiu001, jberkhahn 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 |
* Fix deprovisioning process in TestBroker * Fix file format
This PR is a
What this PR does / why we need it:
The PR fixes deprovisioning
ServiceInstance
process intest-broker
.test-broker
controller contains few services, some of them are not deprovision asynchronous, it means they achieve this condition.The are two problems: first
deprovisionAttempts
field oftestServiceInstance
is not increase anywhere so it means condition will be always true. Second, if condition is true then status code0
is passed toNewErrorWithHTTPStatus
method which causes panic.Additionally, PR changes
DeprovisionFailTimes
(to 0) field for two services thanks to which they are removed immediately.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