Skip to content

JAVA-2813: Don't fail when secure bundle is specified together with other options#1476

Merged
tomekl007 merged 15 commits into
4.xfrom
JAVA-2813
Jul 23, 2020
Merged

JAVA-2813: Don't fail when secure bundle is specified together with other options#1476
tomekl007 merged 15 commits into
4.xfrom
JAVA-2813

Conversation

@tomekl007

@tomekl007 tomekl007 commented Jul 20, 2020

Copy link
Copy Markdown
Contributor

todo:

  • don't fail for local-dc

@tomekl007 tomekl007 requested review from adutra and olim7t and removed request for adutra July 20, 2020 09:37
Comment thread core/src/main/java/com/datastax/oss/driver/api/core/session/SessionBuilder.java Outdated
@tomekl007 tomekl007 requested a review from adutra July 20, 2020 10:44
Comment thread core/src/main/java/com/datastax/oss/driver/api/core/session/SessionBuilder.java Outdated
Comment thread core/src/main/java/com/datastax/oss/driver/api/core/session/SessionBuilder.java Outdated
Comment thread core/src/main/java/com/datastax/oss/driver/api/core/session/SessionBuilder.java Outdated
@tomekl007 tomekl007 requested a review from adutra July 21, 2020 12:32

@olim7t olim7t left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation looks good to me (pending the additional local DC check requested by Alexandre).

I'm not sure I agree with the change though: we decided to fail fast precisely because we didn't want to miss the fact that some options were going to be ignored. So it sounds consistent that tools would have to add logic to work around that.

@adutra

adutra commented Jul 22, 2020

Copy link
Copy Markdown
Contributor

I'm not sure I agree with the change though: we decided to fail fast precisely because we didn't want to miss the fact that some options were going to be ignored. So it sounds consistent that tools would have to add logic to work around that.

The issue is with frameworks that provide some form of support for creating CqlSession instances in a more or less automated way. Take Spring Boot, for instance: the default CassandraProperties bean exposes contact points and local datacenter. These are then automatically applied in CassandraAutoConfiguration. If you are using Astra, the defaults in Spring Boot won't let you connect, and your only option is to actually bypass CassandraAutoConfiguration completely – which, admittedly, defeats the purpose of using Spring Boot in the first place.

(And it's not realistic to offer to add support to Astra directly in Spring Boot: Astra being proprietary and commercial, it's likely that such a contribution would meet some resistance to say the least.)

Comment thread core/src/main/java/com/datastax/oss/driver/api/core/session/SessionBuilder.java Outdated
Comment thread core/src/main/java/com/datastax/oss/driver/api/core/session/SessionBuilder.java Outdated
Comment thread core/src/main/java/com/datastax/oss/driver/api/core/session/SessionBuilder.java Outdated
Comment thread core/src/main/java/com/datastax/oss/driver/api/core/session/SessionBuilder.java Outdated
Comment thread core/src/main/java/com/datastax/oss/driver/api/core/session/SessionBuilder.java Outdated
Comment thread core/src/main/java/com/datastax/oss/driver/api/core/session/SessionBuilder.java Outdated
tomekl007 and others added 7 commits July 22, 2020 15:07
…ssionBuilder.java

Co-authored-by: Alexandre Dutra <adutra@users.noreply.github.com>
…ssionBuilder.java

Co-authored-by: Alexandre Dutra <adutra@users.noreply.github.com>
…ssionBuilder.java

Co-authored-by: Alexandre Dutra <adutra@users.noreply.github.com>
@tomekl007 tomekl007 requested a review from adutra July 22, 2020 14:09
@tomekl007 tomekl007 merged commit 83eec17 into 4.x Jul 23, 2020
@tomekl007 tomekl007 deleted the JAVA-2813 branch July 23, 2020 08:00
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.

3 participants