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
Add dependencies/references support #560
Conversation
There is some "copyright" lint check which is not passed on github but locally it is passed. Question is what this check means? |
The copyright check is now in the pre-commit hooks: 1fd5ff7 I run this using It looks like the 3.11 failures are just enum types in error message and can be fixed (for all python versions): |
|
Debian 11 pre-commit rule not works probably because of this error: |
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.
Just some quick notes, so you know that we are looking at this!
I'm not asking for any changes yet -- I like to think a review is a collaboration and I still have quite a bit to get through. Don't hesitate to let me know if I've read or misunderstoon, and I'll keep on going through!
Co-authored-by: Ryan Skraba <ryan@skraba.com>
…into pr3_squash
Co-authored-by: Ryan Skraba <ryan@skraba.com>
@RyanSkraba all issues above are fixed |
Thanks for the merge with master -- I did this locally and it wasn't too difficult, but I appreciate that it's constant effort. I should have another round of review for you in the protobuf area very soon! |
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.
Hey,
I've finally gotten all of this code pretty thoroughly reviewed, and again, thanks for your patience! For me, this is a pretty good feature to ramp up on my Karapace and get some more modern python experience, so I appreciate it.
I really tried to limit myself to noting things that might be breaking changes, since the priority must be to avoid any regressions with customers not using this feature.
There's a couple of things introduced in this PR that could be improved, but I think it's wise to create issues and fix them incrementally! I'm willing to take on some of this work and I hope you'll stick around to help review future changes in this area :D
Just for discussion: some of the things that I would like to see applied on top of this PR:
-
Restricting the scope as tight as possible helps reviews because we can tell the scope where a method applies.
-
Some field, file and class names aren't very helpful. While this often applies to Karapace as a whole, we specifically end up with
dependency.schema.schema
constructions which is hard on the eyes. -
and of course, more extensive unit testing to catch regressions earlier.
To be clear, I'm not looking for the magic PR that makes everybody perfectly happy today! If we can do a round-trip on these comments, that might be enough to allow the above things to be gradually fixed while providing the references feature to those looking forward to it immediately.
all, What do you think?
Co-authored-by: Ryan Skraba <ryan@skraba.com>
@RyanSkraba I fixed all issues from Your comments. Most tests I ported from Wire (a java protobuf parser) or inspired by the code of Schema Registry. Of course, they do not cover all issues. You show an issue with an empty package name where one letter name will raise an exception. I will add there a simple test for one-letter names. |
Hello! Thanks again for doing yet another merge with master -- it looks like there were a couple of hiccups with the merge with formatting and whitespace (which is now a lint error). The good news is that I think that once the lint is fixed, this LGTM sufficiently to merge it and make any other requested fixes iteratively! |
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.
LGTM, thanks for your continued work!
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.
all changes was implemented
@RyanSkraba I suppose we waiting for @jjaakola-aiven approval now... |
@jjaakola-aiven I see "changes requested" in this thread. But all changes are done and all code comments are outdated. Could You take a look at Your change request and approve it? |
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.
All requested changes were fixed.
Thanks so much, all is well, I was doing some follow-up in the meantime -- let's merge this before |
Some necessary changes can be made in future PRs
Protobuf references support:
Add references to Protobuf schemas,
Support compare protobuf schemas with references,
Support serialization/deserialization of protobuf schemas with dependencies.