Skip to content
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

avro schema ui and validation #1107

Merged
merged 5 commits into from
Aug 1, 2023

Conversation

Big-Vi
Copy link
Contributor

@Big-Vi Big-Vi commented Jul 11, 2023

1 - Added https://github.com/apache/avro for front-end validation.
2 - Added node_module util to resolve polyfill issue - Stackoverflow
3 - Added https://github.com/hamba/avro for backend schema validation.

In progress #1061

avro

@idanasulin2706
Copy link
Contributor

@Big-Vi hi and thank you for this amazing contribution, we will take it to our side and keep you updated after reviewing your code and test it

@yanivbh1
Copy link
Contributor

@Avitaltrifsik FYI
That is amazing @Big-Vi ! Thank you.
Before exposing and releasing the feature, we also need to add support in the different SDKs. At least the major ones are GO, JS, Python. LMK if that is something you want to take on as well.
Huge thank you again.

@Big-Vi
Copy link
Contributor Author

Big-Vi commented Jul 13, 2023

@yanivbh1 Yes. I've worked on Go SDK already and code is in my local computer. If i get some reviews on this pull request, i can do some needed changes and can create pull request on Go SDK.
Yes. I can work on Python & Javascript SDKs as well. But I'm not familiar with other languages(.Net, Rust, & Kotlin) yet.

@Avitaltrifsik
Copy link
Contributor

@Big-Vi Hey I would love it if you can join our Discord channel :)

@Big-Vi
Copy link
Contributor Author

Big-Vi commented Jul 13, 2023

Hi, @Avitaltrifsik I've joined the channel already. Thanks 🙂

@Avitaltrifsik
Copy link
Contributor

@Big-Vi Awesome I DMed you :)

@Big-Vi Big-Vi force-pushed the feature/avro-schema branch from 6a87379 to 6f85542 Compare July 14, 2023 05:21
@Big-Vi Big-Vi force-pushed the feature/avro-schema branch from 6f85542 to 92dcdb2 Compare July 14, 2023 07:28
@@ -41,6 +42,7 @@
"reaflow": "5.0.6",
"recharts": "^2.1.16",
"sass": "^1.49.0",
"util": "^0.12.5",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are not using it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2023-07-24 at 9 36 34 AM

I had similar experience. as soon as i installed util module, polyfill error disappeared.

But I just pulled the recent code from upstream repo, It seems compiler not throwing any polyfill error locally. I guess something is fixed in upstream repo. I can remove util module i reckon.

value: 'avro',
label: 'Avro (Coming soon)',
value: 'Avro',
label: 'Avro (New)',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the (New)

value: 'avro',
label: 'Avro (Coming soon)',
value: 'Avro',
label: 'Avro (New)',
description: (
<span>
The popular. Apache Avro™ is the leading serialization format for record data, and first choice for streaming data pipelines. It offers excellent schema
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a note saying that at the moment it is only available here to create schemas but they are not enforced yet on the SDK.
Also, make sure that in case of an Avro schema attached to a station not causing issues for connected clients or for clients who trying to produce/consume data

Copy link
Contributor Author

@Big-Vi Big-Vi Jul 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a note saying that at the moment it is only available here to create schemas but they are not enforced yet on the SDK. Also, make sure that in case of an Avro schema attached to a station not causing issues for connected clients or for clients who trying to produce/consume data

I can't find any better way to prevent connected clients from error out if the Avro schema is attached to the station. Can we update all the SDKs and merge all PRs at the same time? I'm all ears if you have any other suggestion.
I already worked on Go, JS, and Python SDKs. I can create a pull request today or tomorrow.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So sure please open the PRs on the SDKs and we will merge this one only after it won't crash clients

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After merging the PRs of the SDKs please also update the readme file on this repo, you will find there a sdk features table

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So sure please open the PRs on the SDKs and we will merge this one only after it won't crash clients

Sweet as. Just to let you know I'm only familiar with the above mentioned languages. If somebody can work on the remaining SDKs(Java, .Net, and Rust), that would be great.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After merging the PRs of the SDKs please also update the readme file on this repo, you will find there a sdk features table

Yep. Sure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So sure please open the PRs on the SDKs and we will merge this one only after it won't crash clients

Sweet as. Just to let you know I'm only familiar with the above mentioned languages. If somebody can work on the remaining SDKs(Java, .Net, and Rust), that would be great.

Sure would you mind to open issues on those repositories?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. I'm on it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So sure please open the PRs on the SDKs and we will merge this one only after it won't crash clients

Sweet as. Just to let you know I'm only familiar with the above mentioned languages. If somebody can work on the remaining SDKs(Java, .Net, and Rust), that would be great.

Sure would you mind to open issues on those repositories?

Issues opened:
superstreamlabs/memphis.java#42
superstreamlabs/memphis.net#105

For Rust, there's already an open issue. Not sure i need to open another one.
turulix/memphis-rust-community#15

if err != nil {
return err
}
return nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to
return fmt.Errorf("your Avro file is invalid: %v", err.Error())


if schemaType == "protobuf" || schemaType == "json" || schemaType == "graphql" {
if schemaType == "protobuf" || schemaType == "json" || schemaType == "graphql" || schemaType == "avro" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not related to here but we have the "GetFilterDetails" endpoint in which you should also return the Avro type

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. Yep. missed that one.

go.mod Show resolved Hide resolved
@idanasulin2706
Copy link
Contributor

@Big-Vi I see your comments but not the code fixes, any chances you forgot to commit them?

@Big-Vi
Copy link
Contributor Author

Big-Vi commented Jul 25, 2023

@idanasulinmemphis I like to know if you want me to replace "hamba/avro" with linkedin module before i do code fixes.

@idanasulin2706
Copy link
Contributor

@idanasulinmemphis I like to know if you want me to replace "hamba/avro" with linkedin module before i do code fixes.

No that is ok to leave it as is

@Big-Vi
Copy link
Contributor Author

Big-Vi commented Jul 25, 2023

Great. I'll let you know once the fixes are done.

@idanasulinmemphis I like to know if you want me to replace "hamba/avro" with linkedin module before i do code fixes.

No that is ok to leave it as is

fixed ui filter
removed util module
better error handling
@idanasulin2706
Copy link
Contributor

Hi @Big-Vi is it already done and awaiting my review?

@Big-Vi
Copy link
Contributor Author

Big-Vi commented Jul 28, 2023

Hi @Big-Vi is it already done and awaiting my review?

I fixed the code that you commented on. Good to review once again.

Copy link
Contributor

@idanasulin2706 idanasulin2706 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Big-Vi approved, I'd like to thank you for this amazing contribution, it is much appreciated.
Before merging please resolve the conflict and that's it

@Big-Vi
Copy link
Contributor Author

Big-Vi commented Jul 31, 2023

@Big-Vi approved, I'd like to thank you for this amazing contribution, it is much appreciated. Before merging please resolve the conflict and that's it

Sweet as. Conflict resolved.

@idanasulin2706
Copy link
Contributor

@Big-Vi now it's ok, approved, and merged, will be released in the coming 1.1.2 version - next week

@idanasulin2706 idanasulin2706 merged commit 00b3053 into superstreamlabs:master Aug 1, 2023
@Big-Vi Big-Vi mentioned this pull request Aug 1, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants