-
Notifications
You must be signed in to change notification settings - Fork 28
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
JAVA-2682: Create a Quarkus Cassandra extension #1
Conversation
…gin.version` 3.0.0-M4 to start all Junit5 tests
General remark: I'm surprised by the general layout.
I haven't looked more in detail but it seems that the general structure of the project could be much simpler. |
Overall, I wanted to mirror the structure from:
So I totally agree that it could be simplified, but If we want to be unified with |
…Item` and `JniRuntimeAccessBuildItem`. Set `TIMESTAMP_GENERATOR_FORCE_JAVA_CLOCK` to `true` because jnr is not supported
… to return always false. It will not call `Native.getProcessId` and JNR
…f to Native image, instead of additionalArgs in maven
Omitting the suffix for the runtime module is a Quarkus naming convention, see the extension guide. On that note, the Quarkus maven plugin has a EDIT - output of the Maven plugin (but I think it's intended for a project that already has the
|
Yes, I was using that, but exactly what you wrote " I think it's intended for a project that already has the extensions/ module", also this is intended only for extensions that are in the quarkus repo and rely on the structure that it's in that repo, so we cannot use it for our case. |
…orted in the BOM of this project
To reviewers: I pushed a few commits:
|
runtime/src/main/java/com/datastax/oss/quarkus/runtime/AbstractCassandraClientProducer.java
Show resolved
Hide resolved
runtime/src/main/java/com/datastax/oss/quarkus/runtime/AbstractCassandraClientProducer.java
Show resolved
Hide resolved
runtime/src/main/java/com/datastax/oss/quarkus/runtime/AbstractCassandraClientProducer.java
Show resolved
Hide resolved
import com.oracle.svm.core.annotate.TargetClass; | ||
|
||
@TargetClass(Native.class) | ||
final class NativeSubstitutions { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm musing a bit here... do we want to include isCurrentTimeMicrosAvailable() here as well (with a constant return value of false) until we get the native stuff sorted out? We're side-stepping the issue entirely now by forcing the use of a Java clock but my thought was that that's an indirect consequence of not having native support.
On the other hand that clock is the only consumer of this functionality... so I can see a counter-argument which says adding it here is just one more thing we have to unset/change when we want to confirm native functionality is fine.
I guess I could go either way here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will improve it - see my comments here:
https://datastax-oss.atlassian.net/browse/JAVA-2696
I think that Substitutions
should be used only if there is no other way to tackle the problem.
For the isCurrentTimeMicrosAvailable
we have force_java_clock
setting so it should be ok to use it.
deployment/src/test/java/com/datastax/oss/quarkus/CassandraClientConfigTest.java
Show resolved
Hide resolved
...ion-tests/src/main/java/com/datastax/oss/quarkus/dao/nameconverters/NameConverterEntity.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While working on other things I wasn't closely following the earlier conversations around simplifying the overall structure. But what we have now looks entirely reasonable to me; it seems like a robust skeleton on which we can base future work. All of my comments reflect future work; I don't see anything which prevents us from merging this PR now, especially since this is pretty foundational code.
All pending comments were addressed as separate JIRA tickets, see: |
* Set version to 1.2.0-alpha1-SNAPSHOT * Upgrade to Quarkus 3.0.0.Alpha4 * Bulk replace javax.* with jakarta.* * Update Mutiny code for Quarkus 3 * Add missing Override annotations * Update to Quarkus 3.0.0.Beta1 (#1) Co-authored-by: Madhavan Sridharan <madhavan.sridharan@datastax.com> --------- Co-authored-by: Madhavan <msmygit@users.noreply.github.com> Co-authored-by: Madhavan Sridharan <madhavan.sridharan@datastax.com>
No description provided.