Giter Club home page Giter Club logo

Comments (12)

pcharisius avatar pcharisius commented on July 24, 2024 1

Hey,
sorry I had some issues with the notification mail.

I tried your advise to force the version of jackson but without success. I tried various versions and also to force the version of swagger core.

Im not sure how much I should trust the IntelliJs debugging, but when I am at the class and hovering over the classname during debugging, IntelliJ is saying that the class is provided by your kafka schema registry plugin. So the version restriction was not successful.

I did the following in the build.gradle.kts

plugins {
    kotlin("jvm") version "1.9.21"
    id("com.github.imflog.kafka-schema-registry-gradle-plugin") version "1.12.0"
    id("org.openapi.generator") version "7.1.0"
}

buildscript {
    configurations.all {
        resolutionStrategy.eachDependency {
            if (this.requested.group.startsWith("com.fasterxml.jackson")) {
                this.useVersion("2.15.3")
            }
        }
        
    }
}

...

from schema-registry-plugin.

ImFlog avatar ImFlog commented on July 24, 2024 1

I've rolled back the changes around the fat jar.
Will merge this with the new features that will soon land (proto local reference and rulesets ...).
Hope it will fix your issue and let you upgrade to new versions 🙏

If the issue persist after the new version, do not hesitate to reopen an issue.

from schema-registry-plugin.

ImFlog avatar ImFlog commented on July 24, 2024

Hello,
Given your configuration i don't see the link with the schema registry plugin ?
Is it a shared dependency that is not in the right version that impacts the openapi-plugin ?

from schema-registry-plugin.

ryanrrbsoenergy avatar ryanrrbsoenergy commented on July 24, 2024

Just to confirm that we hit this issue as well when trying to use 1.12.0. As soon as there is a dependency on both of these plugins, the openApiGenerate task fails with the error above.

Our workaround was to use 1.11.1, though would appreciate any solutions people discover!

from schema-registry-plugin.

ImFlog avatar ImFlog commented on July 24, 2024

Since version 1.12 we use a "fat jar" to simplify the configuration process.
I think the issue here is that the jackson library has a mismatched version that breaks the openapi plugin.
We use the transitive dependency from apache.avro which use the 2.14.2 while openapi plugin is probably 2.15.3.

Could you try to add this to your buildscript configuration and see if it fixes the issue:

configurations.all {
    resolutionStrategy.eachDependency {
        if (this.requested.group.startsWith("com.fasterxml.jackson")) {
            this.useVersion("2.15.3")
        }
    }
}

This will have the effect of forcing the version of jackson to 2.15.3 (or whatever version openapi expects).

I will probably not fix the version of jackson in this plugin because it would be risky as It's a transitive dependency.

from schema-registry-plugin.

ImFlog avatar ImFlog commented on July 24, 2024

Sorry to hear that @pcharisius :(
Can you try to build a local version of this project with a greater Jackson version and see if it fixes your issue (the README provides some pointers about how to do that) ?

If it does fix your issue, and that it breaks nothing elsewhere we might merge a PR that fixes a greater version.

from schema-registry-plugin.

ImFlog avatar ImFlog commented on July 24, 2024

@pcharisius got any news about this ? Did you manage to try with a local version ?
Else can you publish a reproducible repo where I could try it myself ?

from schema-registry-plugin.

pcharisius avatar pcharisius commented on July 24, 2024

@ImFlog sorry, I could not get it to work. I have published a minimal example that you can try to solve the problem.

You can find it here: https://github.com/pcharisius/minimal_example

from schema-registry-plugin.

ImFlog avatar ImFlog commented on July 24, 2024

Thank you, I will take a look before the end of the week 🙏

from schema-registry-plugin.

ImFlog avatar ImFlog commented on July 24, 2024

I took another shot at trying to understand the issue.
It in fact seems that the version is taken from the Kafka Schema registry dependency (for some reason there are still in 2.14.2). And even though the avro dependency requires 2.15.3, that's the confluent version that takes the precedence.
If I require a 2.15.3 version on the project I have an issue with Jackson and Gradle. I think I should update to Gradle 8 to fix it.

I am thinking about going back to the non fat-jar deploy to allow end-user to manage the dependency version as they like, that would fix the issue while adding just a bit of boring repositories to the buildscript phase.

Sorry for the delay on this but I will keep you posted when I get some time to work on this.

from schema-registry-plugin.

ImFlog avatar ImFlog commented on July 24, 2024

I tried to release a new version today. I fall into a new error when I try the example directory with the new version. It seems that the Kotlin version required by one of the dependency conflicts with the Gradle one.
I only manage to make the plugin work with Gradle 8.X.

I am not sure what commit makes this fail. I will have to try each commit separately and see why It does not work. I don't really understand why the integration tests / build works in CI and locally and not when I use the published version. This makes no sense (maybe I have this error locally only ?).

That will delay a bit the release 🙇

from schema-registry-plugin.

ImFlog avatar ImFlog commented on July 24, 2024

Should be good by using version 2.0.0 and Gradle > 8.
Sorry for the delay 🙇

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.