-
Notifications
You must be signed in to change notification settings - Fork 103
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
Adding Support for Schema References. #92
base: master
Are you sure you want to change the base?
Conversation
* master: Fix test failures tweak error message to be more explicit Add tests for schemas without a namespace Clean up and differentiate Schema type Treat namespace as required only when necessary
@whizzzkid, is there an ETA on when it will be possible to use schema references? :) |
@alonpi we are using PS: I noticed the v2 release, will resolve the conflicts shortly. |
I can try to help, but I have never heard of schema references until now, so I have some catching up to do. One thing I can say for sure is that any contribution that adds functionality like this needs to be tested. We generally favor integration tests, so if you can describe the expected usage, it should be pretty straightforward to write a test that does exactly that. From my very brief reading of confluentinc/schema-registry#1280, this seems to be a feature that exists for not just Avro, but also JSON Schema and Protobuf. We haven't really decided on a policy of how to keep the different schema types in feature parity. Would you be able to drive this change also for Protobuf or JSON Schema? Without having delved into it, I don't know if doing this is a large or small effort. |
@Nevon Schema References were added in v5.5 of Confluent Platform: https://docs.confluent.io/platform/current/schema-registry/serdes-develop/index.html#referenced-schemas So essentially any newer implementation should support this. This was a blocker for our (AppDirect) kafka deployment, and this was the easiest fix. The ask for the support has been since November in #82. I can look into implementing this change for protobuf and JSON schemas too and fix the test cases as you mentioned. Before that I will need to understand what changes does v2 bring in. I'll get back to you in a few days! |
@whizzzkid are you still working on this PR? We are trying to use the lib and would love to use schema references as part of schema creation through this package. Thanks for working on adding this feature. |
@whizzzkid: As @Nevon mentioned earlier, is there way to help add some integration testing for this? I guess it can get slightly complex because of the nature of schema references. |
@whizzzkid Thank you a lot for this schema reference AVRO contribution! I wonder is there a description of how to use your commit? How should I register my producer on a nesting schema, is it still
? Thank you! I also noticed that the code based on which you modified on is not the current code in master branch. Thus I cannot simply copy paste the your "changed line" under my node_modules folder. Can you tell about which version of |
@whizzzkid Hi! I couldn't figure out how to use your fork.
If I changed
According to your reply above, your fork seems to work for you. Can you describe more about how you installed your fork? Thank you very much. |
@300LiterPropofol that will not work because you need to build the module first, This project uses Azure to build the module. Internally we added a manual build step in our infrastructure to publish this to our own internal npm instance which works. You can build the fork locally and then use: |
Thank you very much for your response. @whizzzkid , sorry that I am not very familiar with nodejs. Could you explain more about how to build the packages locally? |
|
@whizzzkid Thank you very much! I will give a try. |
@whizzzkid Sorry to disturb you again. I tried to build the module locally and installed from local. I hit an error that
I wonder how deep your schema reference feature can go, I have a schema structure like: Update on the above comment: |
@300LiterPropofol There shouldn't be a limit on the depth of the schema, glad the naming worked out for you. We can fix the naming, but I am not sure if that would be a good idea. I am looking into fixing the 👇🏽 conflicts first. Thanks for validating :) |
Is there any update on this? |
Just a heads up: I've started a discussion around references in the related issue here: #82 I think we are a bunch who are interested in this and I think we could team up and produce the changes needed together in uniform 👍 |
I guess this is dead by now, is it? 🤔 |
@WhereIsMyRum this was working as is in production without any failures. Then I switched jobs, had some personal commitments and got covid, I hope it's still working there. I'll see if I can find sometime to get this through in the next few weeks, or will close this PR. |
Namaste Team
In this PR:
SchemaReferences
using a combination oftypeHook
andlogicalType
avsc
: Support for external schema references mtth/avsc#309 but they will not have a solution unless they would like to make api calls to the registry.Issues Touched: