spring-projects / spring-aot-smoke-tests

Smoke tests for Spring's AOT and native support
https://spring-team-aot-smoke-tests-dashboard.azuremicroservices.io/
51 stars 35 forks source link

Update Datastax Cassandra driver to 4.17.0 (fix nativeCompile) #185

Closed onobc closed 1 year ago

onobc commented 1 year ago

This change overrides the Datastax Cassandra driver from 4.15.0 to 4.17.0 to pickup the fix and verify the fix for https://github.com/datastax/java-driver/pull/1674/files which allows nativeCompile to succeed for Spring Data Cassandra.

NOTE: The driver will not be updated in the SDC 4.1.x line - but rather in the 4.2.x line (see https://github.com/spring-projects/spring-data-cassandra/issues/1416). This means this change in the 3.1.x smoke tests represents and verifies the workaround (not the fix) for SDC 4.1.x users. As such, it will make the SDC smoke tests go 🟢 but we should document this workaround in SDC docs somewhere (@christophstrobl wdyt?).

In SB 3.1.x the relevant dependency tree/chain is as follows:

SB 3.1.x -> Datastax Cassandra driver 4.15.0

SB 3.1.x -> SD bom 2023.0.2 -> SDC 4.1.2 -> Datastax Cassandra driver 4.15.0

sdeleuze commented 1 year ago

@mhalbritter @wilkinsona Are you ok merging this dependency override in order to have a working smoke test or do you prefer waiting for Spring Boot 3.2?

mhalbritter commented 1 year ago

Ideally we want the smoke tests to reflect what the users get if they use Spring (Boot) out of the box.

The problem here is that, if we don't include that workaround, it will always be broken for 3.1 if I get that right.

WDYT, @wilkinsona ?

wilkinsona commented 1 year ago

I think this is fine as long as:

  1. We mention the need for an override in Boot's wiki
  2. The Data team are happy supporting older versions of SDC with the latest driver. Ideally that would cover both Boot 3.0 and 3.1.
onobc commented 1 year ago

I had mixed feelings about submitting the PR (same points as @mhalbritter) but like @wilkinsona, I was "ok" with - the key being "this is fine as long as....

mp911de commented 1 year ago

Looking at the build history, the Cassandra tests didn't ever work. So if the tests want to reflect what's supported with Boot 3.1 OOTB, we should remove these for the 3.1.x branch.

Most Data modules can be used with newer driver versions. Specifically, past Cassandra driver upgrades didn't require any behavioral or API adjustments to pass Spring Data test suites.

The Data team are happy supporting older versions of SDC with the latest driver. Ideally that would cover both Boot 3.0 and 3.1.

I verified that Cassandra driver 4.17.0 passes the Spring Data Cassandra 4.0.8 test suite.

onobc commented 1 year ago

So if the tests want to reflect what's supported with Boot 3.1 OOTB, we should remove these for the 3.1.x branch.

True. I think It may be valuable to leave them in here (w/ override) though w/ the understanding that it is supported with Boot 3.1 OOTB + override. That way the smoke tests would test the claim that w/ the override it works in SB 3.1.x.

sdeleuze commented 1 year ago

@mhalbritter I will let you decide what to do on this one.

mhalbritter commented 1 year ago

Thanks all! I documented the override here: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-with-GraalVM#cassandra