Skip to content

Conversation

@IlyaasK
Copy link
Contributor

@IlyaasK IlyaasK commented Dec 22, 2025

Summary

This PR updates the Neo4j Python driver dependency to allow version 6.0.0 (<7.0.0). It addresses the deprecation of read_transaction and write_transaction methods by migrating all occurrences to their modern equivalents, execute_read and execute_write, ensuring compatibility with the new driver version.

Related issues or links

Checklist

Provide proof that this works (this makes reviews move faster). Please perform one or more of the following:

  • Update/add unit or integration tests.
  • Include a screenshot showing what the graph looked like before and after your changes.
  • Include console log trace showing what happened before and after your changes.
    If you are changing a node or relationship:
  • Update the schema and readme.
    If you are implementing a new intel module:
  • Use the NodeSchema data model.
  • Confirm that the linter actually passes (submitting a PR where the linter fails shows reviewers that you did not test your code and will delay your review).

Detailed Changes

Dependencies (pyproject.toml)

  • Updated neo4j dependency constraint from <6.0.0 to <7.0.0.
    Core Client (cartography/client/core/tx.py, cartography/graph/statement.py)
  • Replaced read_transaction with execute_read.
  • Replaced write_transaction with execute_write.
    AWS Client & Intel Modules
  • Migrated legacy transaction calls in:
    • cartography/client/aws/init.py
    • cartography/client/aws/ecr.py
    • cartography/client/aws/iam.py
    • cartography/intel/aws/route53.py
    • cartography/intel/aws/ecr_image_layers.py
    • cartography/intel/aws/resourcegroupstaggingapi.py
      Other Modules
  • Migrated legacy transaction calls in:
    • cartography/intel/okta/awssaml.py
    • cartography/driftdetect/get_states.py
      Tests
  • Updated mocks and method calls in unit and integration tests to mirror the changes in the source code.
    • tests/unit/driftdetect/test_detector.py
    • tests/unit/cartography/intel/aws/test_resourcegroupstaggingapi.py
    • tests/unit/cartography/client/test_core.py
    • tests/integration/cartography/client/test_core.py

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 15 files

@IlyaasK IlyaasK force-pushed the update-neo4j-driver branch from e9963ea to 42a2ad4 Compare December 22, 2025 22:23
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.

1 participant