quarkus-operator-sdk icon indicating copy to clipboard operation
quarkus-operator-sdk copied to clipboard

Mismatched dependency versions

Open AleksanderBrzozowski opened this issue 1 year ago • 4 comments

Hi!

I've generated a new project using Quarkus starter, with Kotlin and Operator SDK selected, and Quarkus version 3.13.0 (the newest one). However, when building the project, I see such warning:

Mismatched Quarkus version found: "3.13.0", expected: "3.11.0" by at least a minor version and things might not work as expected.
Mismatched JOSDK Fabric8 Kubernetes Client version found: "6.13.1", expected: "6.12.1" by at least a minor version and things might not work as expected.
Mismatched Quarkus-provided Fabric8 Kubernetes Client version found: "6.13.1", expected: "6.12.1" by at least a minor version and things might not work as expected.

The same happens when Quarkus version is 3.12.3:

Mismatched Quarkus version found: "3.12.3", expected: "3.11.0" by at least a minor version and things might not work as expected.
Mismatched JOSDK Fabric8 Kubernetes Client version found: "6.13.1", expected: "6.12.1" by at least a minor version and things might not work as expected.
Mismatched Quarkus-provided Fabric8 Kubernetes Client version found: "6.13.1", expected: "6.12.1" by at least a minor version and things might not work as expected.

Here is the dependencies list from build.gradle.kts file:

dependencies {
    implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}"))
    implementation(enforcedPlatform("${quarkusPlatformGroupId}:quarkus-operator-sdk-bom:${quarkusPlatformVersion}"))
    implementation("io.quarkus:quarkus-kotlin")
    implementation("io.quarkiverse.operatorsdk:quarkus-operator-sdk")
    implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
    implementation("io.quarkus:quarkus-arc")
    testImplementation("io.quarkus:quarkus-junit5")
}

I am guessing that there is a mismatch between versions declared by the Operator SDK, and the ones that are in the Quarkus BOM. What we should do with it? Removing the Operator SDK dependency fixes the issue.

AleksanderBrzozowski avatar Aug 06 '24 12:08 AleksanderBrzozowski

Hi @AleksanderBrzozowski, I guess this is because QOSDK didn't release Quarkus 3.13.0 in time. This is already fixed in main. So if you can, just update the QOSDK dependency to 6.7.2:

 <dependency>
    <groupId>io.quarkiverse.operatorsdk</groupId>
    <artifactId>quarkus-operator-sdk-bom</artifactId>
    <version>6.7.2</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>

@metacosm did I miss anything?

xstefank avatar Aug 06 '24 15:08 xstefank

Indeed. Some of this is explained in https://developers.redhat.com/articles/2023/09/19/write-operators-java-josdk-part-4-upgrading-strategies#strategies_for_qosdk_and_quarkus_updates. Note also that the warnings are just informative since it is recommended to use versions that align but usually, things still work even when they don't. Having warnings when versions are not aligned might help diagnose issues.

metacosm avatar Aug 06 '24 16:08 metacosm

Thanks guys for your responses!

I have a question, though. This happened for both 3.13.0 and 3.12.3 Quarkus versions. And these projects were generated from the scratch, it wasn't part of an update. So, I was wondering - can we do something in the future to avoid such situations? I am not a Quarkus expert, but maybe there is something wrong with the release process? 🙂

I would like to avoid having a mismatch in versions between the Operator and Quarkus 🙂

AleksanderBrzozowski avatar Aug 07 '24 06:08 AleksanderBrzozowski

Agreed. We're looking into possible solutions to this issue.

metacosm avatar Aug 07 '24 10:08 metacosm

@metacosm There isn't much we can do about this. We can either:

  • Really make these warnings always debug level. Also when they are different by more than a minor version.
  • Disable the warnings altogether with a config. If the user sets this configuration, they acknowledge that they need to manually track potential disalignments.

I'm not sure what would be the best approach because these minor difference was made WARN because of some reason that I don't understand. But I agree, we should have a way to disable this warning because we cannot guarantee that we will be always updating QOSDK together with Quarkus platform.

xstefank avatar Aug 29 '25 12:08 xstefank

@AleksanderBrzozowski as a user, what would you prefer?

metacosm avatar Sep 01 '25 08:09 metacosm

I guess it would be nice if the versions were aligned between the Operator SDK and Quarkus SDK 🙂

AleksanderBrzozowski avatar Sep 01 '25 08:09 AleksanderBrzozowski

I guess it would be nice if the versions were aligned between the Operator SDK and Quarkus SDK 🙂

Sure but it's not going to happen because we won't release a new QOSDK version for every Quarkus release, unfortunately, so there will be times when versions are not aligned. The question is more about how to deal with this situation when it happens than preventing it altogether.

metacosm avatar Sep 01 '25 08:09 metacosm

Understood. For me, as a user, when I see this kind of log it makes me think that something might not be working properly, or there is a chance that something can fail.

I guess one of the options is to list out which versions are supported by QOSDK - or in other words, what versions they were tested with - I am thinking about some kind of matrix (?).

Usually, minor versions mismatch shouldn't cause troubles, but who knows :)

AleksanderBrzozowski avatar Sep 01 '25 11:09 AleksanderBrzozowski

The issue is mostly with minor Fabric8 kubernetes client versions which have been known to cause issues, though that seems now a thing of the past. The warning is indeed issued because it happened that things didn't work properly due to misaligned versions so we decided to output such a warning in this situation to let users know that they might want to check if issues they were seeing might be due to this.

metacosm avatar Sep 01 '25 16:09 metacosm