CASSPYTHON-24 Remove Insights support#1301
Conversation
| import re | ||
| import queue | ||
| import socket | ||
| import sys |
There was a problem hiding this comment.
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.
| {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) |
There was a problem hiding this comment.
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.
| """ | ||
| 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. |
There was a problem hiding this comment.
I had originally planned on removing this entirely but this ID is also used in column-level encryption (CLE)
|
Forgot to mention: Jenkins run on this change looks pretty good |
|
+1 |
There was a problem hiding this comment.
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.insightspackage (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_enabledknob.
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.
No description provided.