Skip to content

Normalize explicit ssl_options={} handling across reactors and Insights #937

Description

@dkropachev

Summary

PR #936 fixed shard-aware port selection to treat an explicitly supplied ssl_options={} as SSL-enabled. Other connection paths still use truthiness checks, so they may treat ssl_options={} like omitted ssl_options=None.

Places to check

  • cassandra/connection.py: Connection.__init__ normalizes omitted and empty ssl_options to {} and only builds ssl_context when options are truthy.
  • cassandra/io/eventletreactor.py: SSL mode and handshake checks use truthiness.
  • cassandra/io/twistedreactor.py: SSL dependency checks and endpoint selection use truthiness.
  • cassandra/io/asyncioreactor.py: SSL setup is driven by ssl_context, so legacy empty ssl_options behavior should be verified.
  • cassandra/datastax/insights/reporter.py: sslConfigured.enabled uses truthiness and can misreport explicit empty SSL options.

Expected outcome

Define and apply one SSL-enabled predicate across connection setup and reporting: ssl_context is not None or ssl_options is not None. Preserve the distinction between omitted ssl_options and explicit ssl_options={} where needed, and add focused reactor/reporting coverage.

Follow-up from PR #936 review: #936 (review)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions