Comments (7)
Hello @dejank1986, thank you for your intested in this plugin.
It indeed looks like a bug, can you share the gradle configuration linked to the error (the schema registry part) ?
From what I understand in the error message this may be due to the fact that we inline the record where it is referenced and thus if we try to do it twice, it fails -> can't redefine: com.test.seller.EntitlementDetails
.
I need to check what could be done in Avro to bypass this limitation.
I will probably have a bit of time next week to look more into this issue, but If you are willing to help on this, a reproducing test would be a great start and the local reference replacement is in the AvroSchemaParser
file.
Thank you
from schema-registry-plugin.
Gradle config:
def subjects = [
[subject: 'seller-event-com.test.seller.event.SellerUpdated', schema: 'src/main/avro/seller/seller-updated.avsc',
dependencies: [
[name: 'com.test.seller.FeatureEntitlements', path: 'src/main/avro/seller/feature-entitlements.avsc'],
[name: 'com.test.seller.EntitlementDetails', path: 'src/main/avro/seller/entitlement-details.avsc']
]
]
]
compatibility {
subjects.each {
s ->
def subject = subject(s.subject, s.schema)
s.dependencies.each {
d -> subject.addLocalReference(d.name, d.path)
}
}
}
Steps to reproduce:
- Use plugin version 1.8.0
- Create avro schema SellerUpdated with local references (provided in first comment)
- Publish first schema version
- Update plugin version to 1.9.0
- Test compatibility (should fail with error from first comment)
from schema-registry-plugin.
Hi @ImFlog, any update on this issue? I see it's still present even after upgrading plugin to version 1.11.0
.
from schema-registry-plugin.
The version 1.11.0 only brings a new feature.
I am close to merge this PR #132 that should help for your issue.
Will keep you posted when done to let you test with the new version.
Sorry for the troubles.
from schema-registry-plugin.
Thanks @ImFlog for the update. Looking forward to a solution.
from schema-registry-plugin.
Hello @dejank1986, I've just released the version 1.11.1. Can you try with this version to see if the issue was related ?
NB: It requires to add Jitpack in the build repository (see README) because we are now using a custom Avro version to allow us to handle correctly local + remote dependency mixing in Avro.
Thanks
from schema-registry-plugin.
Hi @ImFlog,
I've just gave it a try and it works well. Thanks a lot of addressing this issue.
from schema-registry-plugin.
Related Issues (20)
- Enhance RegisterSchemasTask to print/save the IDs of the published schemas HOT 2
- Querying multiple registries HOT 3
- Use resources files in tests instead of ArgumentProvider HOT 1
- Update example to display local + remote references usage
- Feature Request: Provide a common subject declaration for register and compatibility tasks HOT 3
- cannot find io.confluent:kafka-schema-registry-parent:7.3.1 HOT 5
- Feature Request: Download and save schema metadata HOT 4
- Duplicate type definitions occur when a reference is used more than once. HOT 4
- Registry task fails after updating to 1.9.0 from 1.8.0 HOT 7
- Plugin dependency org.apache.avro:avro:1.12.0-ImFlog missing in version 1.11.1 HOT 2
- Dependency avro-1.11.2 not found HOT 1
- JSON local reference HOT 4
- Support for attaching @Nullable annotation on nullable fields HOT 2
- SchemaParseException during testSchemasTask HOT 2
- Dependency "com.github.ImFlog.avro:avro:1.11.2" not resolvable HOT 1
- Handle local references for JSON
- Handle local references for Protobuf HOT 4
- Mix Avro local and remote dependencies HOT 6
- Run IT on multiple Kafka versions without code duplication
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from schema-registry-plugin.