-
Notifications
You must be signed in to change notification settings - Fork 70
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
APB tool does not catch invalid Specs #244
Comments
@dymurray |
I'm genuinely curious how the APB tool is going to do validation that even the Broker is not doing. Is this validation something that we should be pushing onto the broker? What I do know about the From an APB developer's perspective, this is totally something that we should be catching. I'm just not sure what the existing thoughts are on how to fix it. |
Exactly correct!
I don't actually think this is a bad thing? I just want to see everyone using the same rules. If we can catch it in the client using the same logic the broker does, that's great. I've been pushing for a libapb (now lib-bundle) because I want to see a reusable lib that canonically defines what a bundle is, and can validate whether or not it is valid. The broker ultimately shouldn't care or take any opinion on the topic; it will delegate to |
The Open Service Broker API spec has restrictions on names. e.g. description* string A short description of the plan. MUST be a non-empty string. So these kinds of constraint checking would aid in debugging. |
+1, I am definitely opposed to closing this. This is a real crappy experience for a developer and it would be pretty trivial to put client side validation to prevent this. |
That was totally my fault. I was trying to exit out of a reply to @eriknelson and hit the "Close and comment" because I always confuse it for "Cancel". I agree that this is a crappy experience and should be fixed. @eriknelson had a great point when he said:
|
Another issue is the parameter names used internally by the APB "_apb_plan_id":"default", If the user created a parameter called namespace they won't know its reserved and would end up overwriting it |
I also had a hard time debugging an invalid plan name (#244 (comment)) and agree that client-side checking of the spec would help a lot in development of apbs. |
The APB tool needs better linting of the APB spec. You can break
apb push
by setting a blank description. The broker bootstraps the spec successfully and an error only occurs when the Service Catalog tries to list the catalog. To reproduce:apb.yml
Do a successful
apb push
.See this in the controller manager logs:
The text was updated successfully, but these errors were encountered: