Skip to content

Implement a compile time check of the Quarkus version #460

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

Closed
wants to merge 5 commits into from

Conversation

andreaTP
Copy link
Contributor

This is a naive implementation of a compile time check for the Quarkus version.

Unfortunately the version returned from quarkus.platform.version is 999-SNAPSHOT and is not usable ...

@andreaTP
Copy link
Contributor Author

This works as expected now, and this is an example produced StackTrace on a demo project:

[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:2.14.0.Final:build (default) on project bink8s: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR]         [error]: Build step io.quarkiverse.operatorsdk.deployment.OperatorSDKProcessor#createConfigurationServiceAndOperator threw an exception: java.lang.RuntimeException: Incompatible Quarkus version, found: "2.14.0.Final", expected: "2.15.0.Final"
[ERROR]         at io.quarkiverse.operatorsdk.deployment.OperatorSDKProcessor.createConfigurationServiceAndOperator(OperatorSDKProcessor.java:149)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR]         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR]         at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
[ERROR]         at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
[ERROR]         at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
[ERROR]         at java.base/java.lang.Thread.run(Thread.java:829)
[ERROR]         at org.jboss.threads.JBossThread.run(JBossThread.java:501)

@andreaTP andreaTP marked this pull request as ready for review December 16, 2022 13:26
@metacosm
Copy link
Member

metacosm commented Dec 16, 2022

Now the question becomes whether we want to enforce this or not… More specifically, should we be completely strict and require exact version matching or allow for some leeway… because, while the specific Quarkus version might have an impact, the real constraint is whether the fabric8 client version used by Quarkus is compatible with the version used by the bundled JOSDK version. So ideally, we'd need to compare these two versions.

@andreaTP
Copy link
Contributor Author

@metacosm the exception can now be avoided using a configuration value.
I went ahead and submitted 2 additional PRs to Quarkus and JOSDK to propagate the relevant information about the fabric8 kubernetes-client versions used respectively.

If I'm not missing invariants with this approach we should finally be able to have an effective check in this and the user's codebases.

@metacosm
Copy link
Member

metacosm commented Jan 6, 2023

Superseded by #478.

@metacosm metacosm closed this Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants