Conversation
Reorder statements in ArangoDB AQL query to apply filters before computationally expensive operations like counting and graph queries. Co-authored-by: tomchop <1257972+tomchop@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Add `neighbor_acl_filter` to `graph_query_string` to ensure that ACL rules are enforced on linked objects fetched during graph traversals. Also added a unit test to verify that linked object ACLs are respected. Co-authored-by: tomchop <1257972+tomchop@users.noreply.github.com>
The CI was failing because `entities[0]` might not have a `links` attribute if the query filters out the links completely, so trying to call `len(entities[0].links)` caused an `AttributeError`. The `ruff format` also caused a CI failure which has been corrected. Co-authored-by: tomchop <1257972+tomchop@users.noreply.github.com>
Removed `test_extra.py` that was created during manual testing and caused `ruff` linting checks to fail in CI. Co-authored-by: tomchop <1257972+tomchop@users.noreply.github.com>
…espects_acls The test was failing because the link created was `observable1 -> entity1`, but the query was searching for `outbound` links from `entity1` which would naturally be empty. Updated the query to search for `inbound` links instead. Co-authored-by: tomchop <1257972+tomchop@users.noreply.github.com>
Removed `test_extra.py` which was accidentally created and caused `ruff` checks to fail on the previous run. Co-authored-by: tomchop <1257972+tomchop@users.noreply.github.com>
Use `LET neighbor_acl = FIRST(...) OR false \n FILTER neighbor_acl` in `neighbor_acl_filter` to ensure correct AQL syntax. Change test `graph_queries` field to `"name|value"` so observables (which use `value`) are properly keyed in the result instead of being dropped or yielding a `"null"` key. Co-authored-by: tomchop <1257972+tomchop@users.noreply.github.com>
Removed `test_extra.py` and `run_test.py` that were created during manual testing and caused `ruff` linting checks to fail in CI. Co-authored-by: tomchop <1257972+tomchop@users.noreply.github.com>
Splits the combined boolean assertion into more specific ones (`hasattr`, `assertIsInstance`, `assertEqual(len, 1)`, and `assertIn` contents) to clarify the exact behavior under test. Co-authored-by: tomchop <1257972+tomchop@users.noreply.github.com>
Fix RBAC related performance issues by modifying the ArangoDB query in
core/database_arango.pyto filter the data sooner, reducing the number of elements processed by subsequent statements.PR created automatically by Jules for task 7128753377011748572 started by @tomchop