-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
io.fabric8:kubernetes-client in main is not binary compatible with the one in Quarkus 3.13 #42656
Comments
I'm pretty sure that @manusa is already aware (I think there are other open issues that duplicate this) |
Hey, I've seen fabric8io/kubernetes-client#6249 in the client lib so far and one in Quarkus quickstarts (quarkusio/quarkus-quickstarts#1442), but not one in Quarkus repo yet. Didn't see anything in Quarkus repo itself, and it's not mentioned in migration either - but maybe it would be nice to have a note about it. |
👌 |
What's the use case for this exactly? Because I don't expect Quarkus to be binary compatible. We never promised that and never will. You need to use the BOM and use versions that are enforced in the BOM. And as for external libraries and their binary compatibility, that's really on them. As for the Kubernetes Client compatibility break, I agree that what they did in a micro is by far not ideal. |
Our framework uses the bom. I also think Quarkus has a pretty good track in compatibility, as we don't usually see this kind of issue. The use case is that we run OpenShift testing weekly with Quarkus from main, but we release our test framework from latest release to spot issues. Considering 3.14 is in CR, I think we'll be able to bump to it pretty soon, but I think it would still be good to have a notice about this change in migration guide. Despite no guarantees on binary compatibility, we usually don't encounter issues like this, and I think if we encounter it, somebody else may too, so maybe at least a mention could be made in migration. At the same time, I don't think this setup is very common, but hard for me to tell |
This is very different from ensuring binary compatibility. Binary compatibility is extremely hard to obtain: it basically means that you can never change a return type for instance and that even having a method returning void changed to returning something is forbidden. And you would end up adding bridge methods to ensure you don't break existing apps. We might have few issues but we don't give this guarantee (EAP on the other hand has some level of guarantee for the binary compatibility). Personally, I think this is a slippery slope. All the libraries we include will break break binary compatibility one way or another at some point. We don't check it and I don't want us to be responsible of that. Note that it might end up being an issue for extensions using the Kubernetes Client such as the issue we had with Stork. There's really nothing we can do on our side, except maybe reverting the update but I think this ship has sailed. BTW, good opportunity to make sure our friends at Camel Quarkus are aware of the issue: /cc @ppalaga @jamesnetherton . |
BTW, if it wasn't the middle of the summer, we would probably have pushed for a new release of the Kubernetes Client bringing back the compatibility but it's how it is, unfortunately. |
Yeah, it was already observed on our nightly builds. The next release of Camel will be aligned to the updated k8s client, which seems to fix things for us. |
Yes, I'm aware of this.
Regarding the compatibility (As far as I've gathered from the distance), 6.13.3 is source compatible (you'll notice because bumping is flaw-less).
Just to reiterate, there hasn't even been a method signature change (from the source reference perspective). A method exposed by a builder-generated-class was moved from an intermediate (generated) class to another. Note that recompiling the affected components with the lates client version should require no code changes and will fix the issue (as long as they converge) This convergence problem has been seen before because there are many extensions that depend on the client too, so it makes the client the most delicate component. As we can see in this example, it's not even about guaranteeing backwards compatibility and non-breaking source changes, but binary/bytecode issues too. |
* Due to quarkusio/quarkus#42656, this implements a workaround where we manage fabric8 version ourselves rather than letting Quarkus manage it, as this leads to binary incompatible versions of library.
* Due to quarkusio/quarkus#42656, this implements a workaround where we manage fabric8 version ourselves rather than letting Quarkus manage it, as this leads to binary incompatible versions of library.
I will close this one. It's good to have it around so that people can find some info about the issue if they stumble upon it. |
* Due to quarkusio/quarkus#42656, this implements a workaround where we manage fabric8 version ourselves rather than letting Quarkus manage it, as this leads to binary incompatible versions of library.
Describe the bug
Using the client compiled with Quarkus 3.13 and main built from main after #42450 produces
NoSuchMethod
exceptions in runtime, e.g.The other way is broken too - compiling with Quarkus built from main and running with Quarkus 3.13 produces similar exception, albeit with different package signature:
Expected behavior
The client is binary compatible and no runtime exceptions are produced
Actual behavior
Runtime exceptions are produced
How to Reproduce?
Output of
uname -a
orver
Linux tigris 6.10.5-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 14 15:49:44 UTC 2024 x86_64 GNU/Linux
Output of
java -version
openjdk version "17.0.12" 2024-07-16
Quarkus version or git rev
Since #42450
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Additional information
No response
The text was updated successfully, but these errors were encountered: