Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade to neo4j 5.26 #5241

Draft
wants to merge 1 commit into
base: stable
Choose a base branch
from
Draft

Conversation

fatih-acar
Copy link
Contributor

@fatih-acar fatih-acar commented Dec 17, 2024

I don't think we want this in 1.1 so I'll leave it draft.
We need to fix the following warning anyway:

2024-12-17T18:07:50.896674Z [warning  ] Received notification from DBMS server: {severity: WARNING} {code: Neo.ClientNotification.Statement.FeatureDeprecationWarning} {category: DEPRECATION} {title: This feature is deprecated and will be removed in future versions.} {description: CALL subquery without a variable scope clause is now deprecated. Use CALL (object_permission) { ... }} {position: line: 38, column: 1, offset: 1748} for query: 'MATCH (account_role:CoreAccountRole)\nWHERE account_role.uuid = $role_id\nCALL {\nWITH account_role\nMATCH (account_role)-[r:IS_PART_OF]-(root:Root)\nWHERE ((r.branch IN $branch0 AND r.from <= $time0 AND r.to IS NULL)\nOR (r.branch IN $branch0 AND r.from <= $time0 AND r.to >= $time0))\nRETURN account_role as account_role1, r as r1\nORDER BY r.branch_level DESC, r.from DESC\nLIMIT 1\n}\nWITH account_role, r1 as r\nWHERE r.status = "active"\nWITH account_role\nCALL {\nWITH account_role\nMATCH (account_role)-[r1:IS_RELATED]->(:Relationship {name: "role__permissions"})<-[r2:IS_RELATED]-(object_permission:CoreObjectPermission)\nWHERE all(r IN [r1, r2] WHERE (((r.branch IN $branch0 AND r.from <= $time0 AND r.to IS NULL)\nOR (r.branch IN $branch0 AND r.from <= $time0 AND r.to >= $time0))))\nWITH object_permission, r1, r2, (r1.status = "active" AND r2.status = "active") AS is_active\nORDER BY object_permission.uuid, r2.branch_level DESC, r2.from DESC, r1.branch_level DESC, r1.from DESC\nWITH object_permission, head(collect(is_active)) as latest_is_active\nWHERE latest_is_active = TRUE\nRETURN object_permission\n}\nWITH object_permission\nCALL {\nWITH object_permission\nMATCH (object_permission)-[r1:HAS_ATTRIBUTE]->(:Attribute {name: "namespace"})-[r2:HAS_VALUE]->(object_permission_namespace:AttributeValue)\nWHERE all(r IN [r1, r2] WHERE (((r.branch IN $branch0 AND r.from <= $time0 AND r.to IS NULL)\nOR (r.branch IN $branch0 AND r.from <= $time0 AND r.to >= $time0))))\nRETURN object_permission_namespace, (r1.status = "active" AND r2.status = "active") AS is_active\nORDER BY r2.branch_level DESC, r2.from DESC, r1.branch_level DESC, r1.from DESC\nLIMIT 1\n}\nWITH object_permission, object_permission_namespace, is_active AS opn_is_active\nWHERE opn_is_active = TRUE\nCALL {\nWITH object_permission\nMATCH (object_permission)-[r1:HAS_ATTRIBUTE]->(:Attribute {name: "name"})-[r2:HAS_VALUE]->(object_permission_name:AttributeValue)\nWHERE all(r IN [r1, r2] WHERE (((r.branch IN $branch0 AND r.from <= $time0 AND r.to IS NULL)\nOR (r.branch IN $branch0 AND r.from <= $time0 AND r.to >= $time0))))\nRETURN object_permission_name, (r1.status = "active" AND r2.status = "active") AS is_active\nORDER BY r2.branch_level DESC, r2.from DESC, r1.branch_level DESC, r1.from DESC\nLIMIT 1\n}\nWITH object_permission, object_permission_namespace, object_permission_name, is_active AS opn_is_active\nWHERE opn_is_active = TRUE\nCALL {\nWITH object_permission\nMATCH (object_permission)-[r1:HAS_ATTRIBUTE]->(:Attribute {name: "action"})-[r2:HAS_VALUE]->(object_permission_action:AttributeValue)\nWHERE all(r IN [r1, r2] WHERE (((r.branch IN $branch0 AND r.from <= $time0 AND r.to IS NULL)\nOR (r.branch IN $branch0 AND r.from <= $time0 AND r.to >= $time0))))\nRETURN object_permission_action, (r1.status = "active" AND r2.status = "active") AS is_active\nORDER BY r2.branch_level DESC, r2.from DESC, r1.branch_level DESC, r1.from DESC\nLIMIT 1\n}\nWITH object_permission, object_permission_namespace, object_permission_name, object_permission_action, is_active AS opa_is_active\nWHERE opa_is_active = TRUE\nCALL {\nWITH object_permission\nMATCH (object_permission)-[r1:HAS_ATTRIBUTE]->(:Attribute {name: "decision"})-[r2:HAS_VALUE]->(object_permission_decision:AttributeValue)\nWHERE all(r IN [r1, r2] WHERE (((r.branch IN $branch0 AND r.from <= $time0 AND r.to IS NULL)\nOR (r.branch IN $branch0 AND r.from <= $time0 AND r.to >= $time0))))\nRETURN object_permission_decision, (r1.status = "active" AND r2.status = "active") AS is_active\nORDER BY r2.branch_level DESC, r2.from DESC, r1.branch_level DESC, r1.from DESC\nLIMIT 1\n}\nWITH object_permission, object_permission_namespace, object_permission_name, object_permission_action, object_permission_decision, is_active AS opd_is_active\nWHERE opd_is_active = TRUE\nRETURN object_permission,object_permission_namespace,object_permission_name,object_permission_action,object_permission_decision\nLIMIT 5000'

EDIT: we still have issues:

=========================== short test summary info ============================
FAILED backend/tests/functional/ipam/test_ipam_merge_reconcile.py::TestIpamMergeReconcile::test_step02_add_delete_prefix - neo4j.exceptions.DatabaseError: {code: Neo.DatabaseError.Statement.ExecutionFailed} {message: class java.lang.String cannot be cast to class org.neo4j.values.AnyValue (java.lang.String is in module java.base of loader 'bootstrap'; org.neo4j.values.AnyValue is in unnamed module of loader 'app')}
ERROR backend/tests/functional/ipam/test_ipam_utilization.py::TestIpamUtilization::test_step03_utilization_with_deletes - neo4j.exceptions.DatabaseError: {code: Neo.DatabaseError.Statement.ExecutionFailed} {message: class java.lang.String cannot be cast to class org.neo4j.values.AnyValue (java.lang.String is in module java.base of loader 'bootstrap'; org.neo4j.values.AnyValue is in unnamed module of loader 'app')}
ERROR backend/tests/functional/ipam/test_ipam_utilization.py::TestIpamUtilization::test_step03_graphql_prefix_pool_delete_utilization - neo4j.exceptions.DatabaseError: {code: Neo.DatabaseError.Statement.ExecutionFailed} {message: class java.lang.String cannot be cast to class org.neo4j.values.AnyValue (java.lang.String is in module java.base of loader 'bootstrap'; org.neo4j.values.AnyValue is in unnamed module of loader 'app')}
ERROR backend/tests/functional/ipam/test_ipam_utilization.py::TestIpamUtilization::test_step03_graphql_address_pool_delete_utilization - neo4j.exceptions.DatabaseError: {code: Neo.DatabaseError.Statement.ExecutionFailed} {message: class java.lang.String cannot be cast to class org.neo4j.values.AnyValue (java.lang.String is in module java.base of loader 'bootstrap'; org.neo4j.values.AnyValue is in unnamed module of loader 'app')}
[18:19:04] INFO     - Creating branch:               infrastructure_edge.py:1675
                    'atl1-delete-upstream'                                      
['InfraCircuitEndpointDelete'] class java.lang.String cannot be cast to class 
org.neo4j.values.AnyValue (java.lang.String is in module java.base of loader 
'bootstrap'; org.neo4j.values.AnyValue is in unnamed module of loader 'app')

Signed-off-by: Fatih Acar <fatih@opsmill.com>
@github-actions github-actions bot added the group/backend Issue related to the backend (API Server, Git Agent) label Dec 17, 2024
Copy link

codspeed-hq bot commented Dec 17, 2024

CodSpeed Performance Report

Merging #5241 will degrade performances by 38.81%

Comparing fac-upgrade-neo4j-5.26 (d37e238) with release-1.1 (67f4d4c)

Summary

❌ 2 regressions
✅ 8 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark release-1.1 fac-upgrade-neo4j-5.26 Change
test_nodemanager_querypeers 1.5 ms 2.5 ms -38.81%
test_relationshipmanager_getpeer 2.2 ms 3.3 ms -34.64%

Base automatically changed from release-1.1 to stable December 30, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant