Skip to content

metadata: remove DSE-only schema parsing - #1129

Open
roydahan wants to merge 1 commit into
masterfrom
remove/dse-schema-parsing
Open

roydahan wants to merge 1 commit into
masterfrom
remove/dse-schema-parsing

Conversation

@roydahan

Copy link
Copy Markdown
Collaborator

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • I added relevant tests for new features and bug fixes.
  • All commits compile, pass static checks and pass test.
  • PR description sums up the changes and reasons why they should be introduced.
  • I have provided docstrings for the public items that I want to introduce.
  • I have adjusted the documentation in ./docs/source/.
  • I added appropriate Fixes: annotations to PR description.

(Single commit by design. No new public items are introduced. The API docs edited are in docs/api/. There is no linked issue.)

Summary

Removes DataStax Enterprise (DSE)-only schema parsing and metadata from cassandra/metadata.py. Follow-up to #1128 ("graph: remove DSE Graph support"). Please merge after #1128: on current master, Session._resolve_execution_profile_options (graph code) reads KeyspaceMetadata.graph_engine. #1128 removes that reader and this PR removes the attribute. The two PRs conflict only in the CHANGELOG.rst "Removed" section, which needs a trivial merge.

Why

ScyllaDB never sets system.local.dse_version, so get_schema_parser() never picks the DSE parsers against ScyllaDB. The graph (vertex/edge), graph_engine and RLAC metadata they produce is never populated. The code was already excluded from coverage for that reason.

What's removed

  • SchemaParserDSE60, SchemaParserDSE67, SchemaParserDSE68, and the dse_version branch in get_schema_parser().
  • TableMetadataDSE68 (with vertex/edge), VertexMetadata, EdgeMetadata, and the vertex-first table ordering in KeyspaceMetadata.export_as_string().
  • Breaking: KeyspaceMetadata.graph_engine, the graph_engine constructor argument, the graph_engine clause in as_cql_query(), and KeyspaceMetadata.is_graph_enabled.
  • Breaking: RLACTableExtension (DSE_RLACA).
  • The DSE 6.0 nodesync entry in TableMetadataV3.option_maps. Only the DSE parsers ever produced that option.
  • get_schema_parser() keeps its dse_version parameter for positional compatibility but ignores it. When release_version is unknown, it no longer sends the extra system.local query for dse_version, which ScyllaDB and Cassandra reject. Host.dse_version is unchanged.
  • API doc entries, pyproject.toml coverage exclusions for the removed code, and DSE-only test code: the parser selection and graph CQL tests, the simulacron vertices/edges priming, the integration 'graph' workload JVM sizing, and the RLAC entry in the extension registry count.
  • New generic unit tests for TableMetadataV3 CQL export, registered table extensions and qualified replication class names. The removed graph tests used to exercise these paths indirectly.

Coverage (unit only, scripts/coverage.sh, same environment)

Before After
TOTAL 67.49% (18075 stmts, 5193 missed) 67.56% (18063 stmts, 5180 missed)
cassandra/metadata.py 59.73% (1851 stmts, 655 missed) 60.51% (1839 stmts, 641 missed)

Verification

  • Ran:
    • Unit suite as wheel CI, Cython build with the compress-lz4 extra, CASS_DRIVER_NO_SKIP=1: 1576 passed, 0 skipped.
    • EVENT_LOOP_MANAGER=asyncio reactor tests: 41 passed.
    • make -C docs test: passes.
    • pyflakes on metadata.py and the edited tests: no new warnings.
    • Grep for removed names: only the CHANGELOG and the cluster.py line graph: remove DSE Graph support #1128 removes.
    • git merge-tree against graph: remove DSE Graph support #1128: conflict only in CHANGELOG.rst.
    • Combined tree (master + graph: remove DSE Graph support #1128 + this PR, CHANGELOG conflict resolved): no remaining references to the removed names. With CASS_DRIVER_NO_CYTHON=1 CASS_DRIVER_NO_SKIP=1, the unit suite (excluding the Cython-only tests) gives the same failure/error set as plain master. All of those fail on master in the same environment too.
  • Not run: integration tests (ScyllaDB/Cassandra CCM and simulacron). The integration edits are limited to code that only DSE reaches, plus the registry count.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QYcPjKDEQaQTfxpdfsFjZA


Generated by Claude Code

ScyllaDB never sets system.local.dse_version, so get_schema_parser()
never selected the DataStax Enterprise (DSE) schema parsers against it,
and the graph/RLAC metadata they produced could never be populated. The
code was already excluded from coverage for that reason. This follows
the removal of DSE Graph support (#1128).

Removed from cassandra/metadata.py:
- SchemaParserDSE60, SchemaParserDSE67, SchemaParserDSE68 and the
  `if dse_version:` selection block in get_schema_parser().
- TableMetadataDSE68 and its vertex/edge attributes, VertexMetadata and
  EdgeMetadata (DSE 6.8 graph schema from system_schema.vertices/edges),
  and the vertex-first table ordering in KeyspaceMetadata.export_as_string().
- KeyspaceMetadata.graph_engine, its constructor argument, the
  graph_engine clause in as_cql_query(), and is_graph_enabled.
- RLACTableExtension (DSE_RLACA row-level access control extension).
- The DSE 6.0 'nodesync' entry in TableMetadataV3.option_maps; only the
  DSE parsers ever put that option into table options.

get_schema_parser() keeps its dse_version parameter so positional
callers are not silently shifted, but now ignores it. When
release_version is unknown it no longer issues a second system.local
query for dse_version (which ScyllaDB and Cassandra reject).
Metadata.refresh() passes None for it. Host.dse_version is untouched:
cluster.py still reads it for DSE native_address handling.

Tests: drop the DSE parser selection and graph CQL export tests, the
simulacron priming of the vertices/edges queries, the integration
'graph' workload JVM sizing, and the RLAC entry in the integration
extension registry count. Add generic TableMetadataV3 CQL export,
registered table extension and qualified replication class tests,
which the removed graph tests used to exercise indirectly.

Also drop the removed classes from the API docs and their coverage
exclusions in pyproject.toml, and add a CHANGELOG entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QYcPjKDEQaQTfxpdfsFjZA
@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 32 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: e059717d-b57d-402f-824a-b1fbe6712073

📥 Commits

Reviewing files that changed from the base of the PR and between 168e479 and 18e7ff1.


📒 Files selected for processing (9)
  • CHANGELOG.rst
  • cassandra/metadata.py
  • docs/api/cassandra/metadata.rst
  • pyproject.toml
  • tests/integration/__init__.py
  • tests/integration/simulacron/utils.py
  • tests/integration/standard/test_metadata.py
  • tests/unit/advanced/test_metadata.py
  • tests/unit/test_metadata.py

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.46%. Comparing base (168e479) to head (18e7ff1).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1129      +/-   ##
==========================================
+ Coverage   86.41%   86.46%   +0.05%     
==========================================
  Files          43       43              
  Lines       18075    18063      -12     
  Branches     2776     2775       -1     
==========================================
  Hits        15619    15619              
+ Misses       1836     1821      -15     
- Partials      620      623       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@roydahan roydahan mentioned this pull request Oct 25, 2026
5 of 8 tasks

This branch has not been deployed

No deployments
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.

2 participants