kafka-ui icon indicating copy to clipboard operation
kafka-ui copied to clipboard

Display a clear warning message for wrong schema`s type and invalid schema`s syntax.

Open agolosen opened this issue 3 years ago • 5 comments

Is your proposal related to a problem?

(Write your answer here.) If you try to create a schema with invalid syntax or incorrect type now is displaying an unclear message (the same for already existing name, invalid syntax, incorrect schema`s type).

Describe the solution you'd like

(Describe your proposed solution here.) Display a clear warning message what the problem is, i.e. for invalid syntax 'Invalid syntax for schema', for incorrect type - 'Wrong schema type' or more precise 'There is not AVRO schema'.

Describe alternatives you've considered

(Write your answer here.)

Additional context

(Write your answer here.)

agolosen avatar Jan 13 '22 20:01 agolosen

Related #1386.

Haarolean avatar Jan 20 '22 09:01 Haarolean

@mikhailalekseevprv need to map SR errors to some of ours and return a humanized error message image

Haarolean avatar Apr 18 '22 14:04 Haarolean

Trying to reproduce this one with no success, I think it could probably be already fixed. When I follow the steps described in the issue i just get the following: Screen Shot 2022-08-08 at 14 05 49 @agolosen could you confirm please? cc @Haarolean

daching-provectus avatar Aug 08 '22 20:08 daching-provectus

Also, take into consideration that these errors come from the Schema Registry API which contains the logic to add and validate the schemas.

daching-provectus avatar Aug 08 '22 20:08 daching-provectus

@armenuikafka PTAL

Haarolean avatar Aug 09 '22 14:08 Haarolean

@Haarolean will take a look

armenuikafka avatar Aug 16 '22 15:08 armenuikafka

Here are 4 cases I have checked:

  • Wrong syntax - message should say that syntax is wrong

https://user-images.githubusercontent.com/104780608/185387306-76870f9a-0330-4244-91ee-104d05a2ccdc.mov

  • The already existing schema with the same name and type - if create new schema, with the same type (JSON) and the same Subject, system editing the existing schema

https://user-images.githubusercontent.com/104780608/185388420-ab4860e9-776b-4020-b07a-20e4b8bfa594.mov

  • The same subject but other type - if create new schema with the same subject but the other type (Protobuf), message should say that Schema in Json type with the same Subject already exists

https://user-images.githubusercontent.com/104780608/185389327-762224c5-33eb-4f5b-9370-473d09d12151.mov

  • The wrong type syntax- if create new Schema, add type (JSON), but select the wrong type(Protobuf), message should say that wrong type is selected

https://user-images.githubusercontent.com/104780608/185389414-b9e54bb7-3cb8-4a63-a157-548879abbb34.mov

armenuikafka avatar Aug 18 '22 12:08 armenuikafka