Skip to content

Add Connection.get_routing_table() for client-side routing (mgclient 1.6.0)#84

Merged
mattkjames7 merged 10 commits into
masterfrom
update-mgclient
Jul 1, 2026
Merged

Add Connection.get_routing_table() for client-side routing (mgclient 1.6.0)#84
mattkjames7 merged 10 commits into
masterfrom
update-mgclient

Conversation

@mattkjames7

@mattkjames7 mattkjames7 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Updates the bundled mgclient submodule to 1.6.0 and adds Connection.get_routing_table() for client-side routing.

@mattkjames7 mattkjames7 self-assigned this Jun 18, 2026
@mattkjames7 mattkjames7 added enhancement enhancement Docs - changelog only Docs - changelog only labels Jun 18, 2026
@mattkjames7 mattkjames7 changed the title update mgclient submodule to 1.6.0 Add Connection.get_routing_table() for client-side routing (mgclient 1.6.0) Jun 29, 2026
@mattkjames7 mattkjames7 requested a review from Copilot June 29, 2026 13:22

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

Adds a low-level Python API for fetching Memgraph HA routing topology by exposing mgclient’s ROUTE primitive as Connection.get_routing_table(...), plus basic validation/bad-state tests.

Changes:

  • Add Connection.get_routing_table(routing_context=None, bookmarks=None, extra=None) implemented in the C extension and returning a Python dict.
  • Export mg_map_to_py_dict() in glue.h for cross-module reuse and wire up internal error handling for the new call.
  • Add tests for argument validation and error on invalid connection state.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

File Description
test/test_connection.py Adds tests for get_routing_table argument validation and invalid connection state.
src/glue.h Exposes mg_map_to_py_dict() so connection.c can convert route results to Python.
src/connection.h Exposes connection_handle_error() prototype for use from connection.c.
src/connection.c Implements Connection.get_routing_table() and registers it on the Python type.

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

Comment thread src/connection.c Outdated
Comment thread src/connection.c
Comment thread test/test_connection.py Outdated

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

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Comment thread src/connection.c
Comment thread .github/workflows/reusable_buildtest.yml
Comment thread .github/workflows/reusable_buildtest.yml Outdated
Comment thread test/common.py
@mattkjames7 mattkjames7 requested a review from as51340 June 30, 2026 11:19
Comment thread test/test_connection.py Outdated
@mattkjames7 mattkjames7 merged commit c472ff1 into master Jul 1, 2026
48 of 49 checks passed
@mattkjames7 mattkjames7 deleted the update-mgclient branch July 1, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs - changelog only Docs - changelog only enhancement enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants