Skip to content

CASSPYTHON-24 Remove Insights support#1301

Open
absurdfarce wants to merge 1 commit into
apache:trunkfrom
absurdfarce:casspython24
Open

CASSPYTHON-24 Remove Insights support#1301
absurdfarce wants to merge 1 commit into
apache:trunkfrom
absurdfarce:casspython24

Conversation

@absurdfarce

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread cassandra/cluster.py
import re
import queue
import socket
import sys

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

A drive-by fix. I noticed these two imports were unused while working on CASSPYTHON-13 with Brett, figured I'd clean them up next time I was in this code.

Comment thread cassandra/cluster.py
{key: ['{ip}:{port}'.format(ip=ip, port=port) for ip, port in value]
for key, value in strs_resolved_map.items() if value is not None}
)
raise UnresolvableContactPoints(endpoint_map)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Seems weird to me that we were re-using an Insights map in the exception that's thrown here.. but apparently we were. Moved the logic into this block (so that it's only executed if an exception actually occurs) and moved everything out of class state.

Comment thread cassandra/cluster.py
"""
A UUID that uniquely identifies this Session to Insights. This will be
generated automatically.
A UUID that uniquely identifies this Session. This will be generated automatically.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I had originally planned on removing this entirely but this ID is also used in column-level encryption (CLE)

@absurdfarce
absurdfarce requested a review from bschoening July 15, 2026 05:28
@absurdfarce

Copy link
Copy Markdown
Contributor Author

Forgot to mention: Jenkins run on this change looks pretty good

@bschoening

Copy link
Copy Markdown
Contributor

+1

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Removes DataStax Insights (monitor reporting) support from the driver, including the public API surface on Cluster/Session, the Insights implementation package, and related unit/integration tests.

Changes:

  • Deleted the cassandra.datastax.insights package (registry/serializers/reporter/util) and removed it from packaging (pyproject.toml).
  • Removed Insights-related constructor args/state and session startup logic from cassandra.cluster.Cluster / cassandra.cluster.Session.
  • Removed/updated tests that exercised Insights and the monitor_reporting_enabled knob.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/unit/advanced/test_insights.py Removed unit tests for Insights serialization/registry behavior.
tests/integration/standard/test_metrics.py Removed monitor_reporting_enabled usage from integration metrics tests.
tests/integration/standard/test_cluster.py Removed monitor_reporting_enabled usage from cluster integration tests.
tests/integration/simulacron/advanced/test_insights.py Removed simulacron integration tests for Insights RPC messages.
pyproject.toml Dropped cassandra.datastax.insights from the package discovery include list.
cassandra/datastax/insights/util.py Removed Insights utility helpers (namespace/version gating).
cassandra/datastax/insights/serializers.py Removed Insights serializers/registry initialization.
cassandra/datastax/insights/reporter.py Removed the monitor reporter thread and RPC sending logic.
cassandra/datastax/insights/registry.py Removed the Insights serializer registry implementation.
cassandra/datastax/insights/init.py Removed the Insights package initializer.
cassandra/cluster.py Removed Insights-related imports, Cluster init args/attributes, and Session monitor reporter startup/logging.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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