Giter Club home page Giter Club logo

Comments (7)

ImFlog avatar ImFlog commented on June 17, 2024

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.

dejank1986 avatar dejank1986 commented on June 17, 2024

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.

dejank1986 avatar dejank1986 commented on June 17, 2024

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.

ImFlog avatar ImFlog commented on June 17, 2024

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.

dejank1986 avatar dejank1986 commented on June 17, 2024

Thanks @ImFlog for the update. Looking forward to a solution.

from schema-registry-plugin.

ImFlog avatar ImFlog commented on June 17, 2024

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.

dejank1986 avatar dejank1986 commented on June 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.