Closed mszostok closed 4 years ago
I don't think we should display bad SC if all plans schemas are broken because we should not bother the user with not usable functionality:
also please take a look on OSB API spec: https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#input-parameters-schema-object
instanceUpdateParameterSchema cannot be empty string. It must be a JSON schema object
@derberg I know what is in OSB API and because of that I only said that for now, the error on UI is misleading.
I'm expecting sth like that:
UI-API-Layer handles the wrong schemas in ClusterServicePlans/ServicePlans more gracefully. E.g. returning error that the schemas cannot be decoded but I can still see the ServiceClass details. The provisioning can be blocked
IMO your suggestion about hiding invalid classes is also misleading. We should be transparent. Why just do not display that the schemas are wrong? Thanks to that I will know that broker has this classes but they are incorrect, so I know what kind of action I should take.
I agree we have a bug and we need to fix it but first we need to find a common ground. For now UI has a bug because the expectation is that all connected brokers are created in respect with OSB API
Even though you bolded out some content I don't really take it 😄
As of now when we work on designs and development we envision different personas using the Console UI. So we have an operator that registers the brokers and we have a developer that consumes the classes. With this approach me, as an operator, I would not like my consumers to see classes that are useless/broken
.
Don't get me wrong, I get your point, but you're view on this issue is from a service catalog contributor and a guy that writes brokers. Consumer of the catalog should not see broken classes, it should be seen only by the person that has rights to register brokers. UI is not the only layer for the user, he also has API and CLI, so the same level of awareness and transparency should be available on all layers, not just the UI. I hope you get my point here, but please try to understand my point too.
@PK85 maybe we should hold some meeting, and sync all together on short term and mid term approach here. Short term let us just hide broken classes, long term let us work on some proposal, maybe core service catalog contribution or some custom validation controller? or even a validation webhook service configured to always validate service classes and plans created in the catalog
ok, long term approach confirmed: https://github.com/kubernetes-incubator/service-catalog/issues/2088 Service catalog is the one that should fail with registration of the broker that is not fully following the OSB API
short term, let us make sure we are handling errors properly and we do not display broken service classes. @pkosiec how much is https://github.com/kyma-project/kyma/issues/2113 addressing the errors problem?
@derberg Sorry, I missed that. The #2113 doesn't have anything related to this bug.
The easiest and quickest improvement would be to make (Cluster)ServicePlans field nullable. Then the other (Cluster)ServiceClass details would be returned correctly.
This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed due to the lack of recent activity.
This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs. Thank you for your contributions.
Description
When ClusterServicePlan/ServicePlan have incorrect schemas then ui-api-layer cannot convert it.
Example ClusterServicePlan
Log from ui-api-layer pod:
Expected result
UI-API-Layer handles the wrong schemas in ClusterServicePlans/ServicePlans more gracefuly. E.g. returning error that the schemas cannot be decoded but I can still see the ServiceClass details.
Actual result
Returns nothing saying error:
And on UI it's even worst because this internal error is converted to the misleading message:
Steps to reproduce Edit any kind of available ClusterServicePlan/ServicePlan on your cluster and add just the schema with empty string, like this one:
"instanceUpdateParameterSchema": ""