feat: Optimize PG graph database wipes - BED-8787#99
Conversation
WalkthroughAdds a ChangesWipeGraph driver method and integration tests
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
zinic
left a comment
There was a problem hiding this comment.
Only note is that making this function available in the PG driver does not immediately expose it to consumers of the top-level graph interfaces. There may be some additional noodling here required to make this more accessible to library users.
Truncate statement looks good to me 👍
Description
Implements the new WipeGraph function supported optionally on DAWGS drivers to execute rapid graph wiping if supported. Initially, this is supported on PostgreSQL drivers utilizing TRUNCATE on node/edge tables. Additionally, adds an integration test to ensure that
MigrationDatanode is retained post-truncation.This is a requirement for SpecterOps/BloodHound#2936, however merging may occur in any order as the implementation is optional on all graph drivers.
Resolves: BED-8787
Type of Change
Testing
make test_allwithCONNECTION_STRINGset)Screenshots (if appropriate):
Driver Impact
drivers/pg)drivers/neo4j)Checklist
go.mod/go.sumare up to date if dependencies changedSummary by CodeRabbit