infrahub-server 1.2.11__py3-none-any.whl → 1.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- infrahub/actions/constants.py +130 -0
- infrahub/actions/gather.py +114 -0
- infrahub/actions/models.py +243 -0
- infrahub/actions/parsers.py +104 -0
- infrahub/actions/schema.py +393 -0
- infrahub/actions/tasks.py +119 -0
- infrahub/actions/triggers.py +21 -0
- infrahub/branch/__init__.py +0 -0
- infrahub/branch/tasks.py +29 -0
- infrahub/branch/triggers.py +22 -0
- infrahub/cli/db.py +3 -4
- infrahub/computed_attribute/gather.py +3 -1
- infrahub/computed_attribute/tasks.py +23 -29
- infrahub/core/account.py +24 -47
- infrahub/core/attribute.py +13 -15
- infrahub/core/constants/__init__.py +10 -0
- infrahub/core/constants/database.py +1 -0
- infrahub/core/constants/infrahubkind.py +9 -0
- infrahub/core/constraint/node/runner.py +3 -1
- infrahub/core/convert_object_type/__init__.py +0 -0
- infrahub/core/convert_object_type/conversion.py +124 -0
- infrahub/core/convert_object_type/schema_mapping.py +56 -0
- infrahub/core/diff/coordinator.py +8 -1
- infrahub/core/diff/query/all_conflicts.py +1 -5
- infrahub/core/diff/query/artifact.py +10 -20
- infrahub/core/diff/query/delete_query.py +8 -4
- infrahub/core/diff/query/diff_get.py +3 -6
- infrahub/core/diff/query/field_specifiers.py +1 -1
- infrahub/core/diff/query/field_summary.py +2 -4
- infrahub/core/diff/query/merge.py +72 -125
- infrahub/core/diff/query/save.py +83 -68
- infrahub/core/diff/query/summary_counts_enricher.py +34 -54
- infrahub/core/diff/query/time_range_query.py +0 -1
- infrahub/core/diff/repository/repository.py +4 -0
- infrahub/core/graph/__init__.py +1 -1
- infrahub/core/manager.py +14 -11
- infrahub/core/migrations/graph/__init__.py +6 -0
- infrahub/core/migrations/graph/m003_relationship_parent_optional.py +1 -2
- infrahub/core/migrations/graph/m012_convert_account_generic.py +1 -1
- infrahub/core/migrations/graph/m013_convert_git_password_credential.py +2 -6
- infrahub/core/migrations/graph/m015_diff_format_update.py +1 -2
- infrahub/core/migrations/graph/m016_diff_delete_bug_fix.py +1 -2
- infrahub/core/migrations/graph/m019_restore_rels_to_time.py +11 -22
- infrahub/core/migrations/graph/m020_duplicate_edges.py +3 -6
- infrahub/core/migrations/graph/m021_missing_hierarchy_merge.py +1 -2
- infrahub/core/migrations/graph/m023_deduplicate_cardinality_one_relationships.py +2 -2
- infrahub/core/migrations/graph/m024_missing_hierarchy_backfill.py +1 -2
- infrahub/core/migrations/graph/m028_delete_diffs.py +1 -2
- infrahub/core/migrations/graph/m029_duplicates_cleanup.py +662 -0
- infrahub/core/migrations/graph/m030_illegal_edges.py +82 -0
- infrahub/core/migrations/query/attribute_add.py +14 -11
- infrahub/core/migrations/query/attribute_rename.py +6 -11
- infrahub/core/migrations/query/delete_element_in_schema.py +19 -17
- infrahub/core/migrations/query/node_duplicate.py +19 -21
- infrahub/core/migrations/query/relationship_duplicate.py +19 -18
- infrahub/core/migrations/schema/node_attribute_remove.py +4 -8
- infrahub/core/migrations/schema/node_remove.py +19 -20
- infrahub/core/models.py +29 -2
- infrahub/core/node/__init__.py +131 -28
- infrahub/core/node/base.py +1 -1
- infrahub/core/node/create.py +211 -0
- infrahub/core/node/resource_manager/number_pool.py +31 -5
- infrahub/core/node/standard.py +6 -1
- infrahub/core/path.py +15 -1
- infrahub/core/protocols.py +57 -0
- infrahub/core/protocols_base.py +3 -0
- infrahub/core/query/__init__.py +2 -2
- infrahub/core/query/delete.py +3 -3
- infrahub/core/query/diff.py +19 -32
- infrahub/core/query/ipam.py +10 -20
- infrahub/core/query/node.py +29 -47
- infrahub/core/query/relationship.py +55 -34
- infrahub/core/query/resource_manager.py +1 -2
- infrahub/core/query/standard_node.py +19 -5
- infrahub/core/query/subquery.py +2 -4
- infrahub/core/relationship/constraints/count.py +10 -9
- infrahub/core/relationship/constraints/interface.py +2 -1
- infrahub/core/relationship/constraints/peer_kind.py +2 -1
- infrahub/core/relationship/constraints/peer_parent.py +56 -0
- infrahub/core/relationship/constraints/peer_relatives.py +72 -0
- infrahub/core/relationship/constraints/profiles_kind.py +1 -1
- infrahub/core/relationship/model.py +4 -1
- infrahub/core/schema/__init__.py +2 -1
- infrahub/core/schema/attribute_parameters.py +160 -0
- infrahub/core/schema/attribute_schema.py +130 -7
- infrahub/core/schema/basenode_schema.py +27 -3
- infrahub/core/schema/definitions/core/__init__.py +29 -1
- infrahub/core/schema/definitions/core/group.py +45 -0
- infrahub/core/schema/definitions/core/resource_pool.py +9 -0
- infrahub/core/schema/definitions/internal.py +43 -5
- infrahub/core/schema/generated/attribute_schema.py +16 -3
- infrahub/core/schema/generated/relationship_schema.py +11 -1
- infrahub/core/schema/manager.py +7 -2
- infrahub/core/schema/schema_branch.py +109 -12
- infrahub/core/validators/__init__.py +15 -2
- infrahub/core/validators/attribute/choices.py +1 -3
- infrahub/core/validators/attribute/enum.py +1 -3
- infrahub/core/validators/attribute/kind.py +1 -3
- infrahub/core/validators/attribute/length.py +13 -7
- infrahub/core/validators/attribute/min_max.py +118 -0
- infrahub/core/validators/attribute/number_pool.py +106 -0
- infrahub/core/validators/attribute/optional.py +1 -4
- infrahub/core/validators/attribute/regex.py +5 -6
- infrahub/core/validators/attribute/unique.py +1 -3
- infrahub/core/validators/determiner.py +18 -2
- infrahub/core/validators/enum.py +12 -0
- infrahub/core/validators/node/hierarchy.py +3 -6
- infrahub/core/validators/query.py +1 -3
- infrahub/core/validators/relationship/count.py +6 -12
- infrahub/core/validators/relationship/optional.py +2 -4
- infrahub/core/validators/relationship/peer.py +177 -12
- infrahub/core/validators/tasks.py +1 -1
- infrahub/core/validators/uniqueness/query.py +5 -9
- infrahub/database/__init__.py +12 -4
- infrahub/database/validation.py +100 -0
- infrahub/dependencies/builder/constraint/grouped/node_runner.py +4 -0
- infrahub/dependencies/builder/constraint/relationship_manager/peer_parent.py +8 -0
- infrahub/dependencies/builder/constraint/relationship_manager/peer_relatives.py +8 -0
- infrahub/dependencies/builder/constraint/schema/aggregated.py +2 -0
- infrahub/dependencies/builder/constraint/schema/relationship_peer.py +8 -0
- infrahub/dependencies/builder/diff/deserializer.py +1 -1
- infrahub/dependencies/registry.py +4 -0
- infrahub/events/group_action.py +1 -0
- infrahub/events/models.py +1 -1
- infrahub/git/base.py +5 -3
- infrahub/git/integrator.py +96 -5
- infrahub/git/tasks.py +1 -0
- infrahub/graphql/analyzer.py +139 -18
- infrahub/graphql/manager.py +4 -0
- infrahub/graphql/mutations/action.py +164 -0
- infrahub/graphql/mutations/convert_object_type.py +71 -0
- infrahub/graphql/mutations/main.py +25 -176
- infrahub/graphql/mutations/proposed_change.py +20 -17
- infrahub/graphql/mutations/relationship.py +32 -0
- infrahub/graphql/mutations/resource_manager.py +63 -7
- infrahub/graphql/queries/convert_object_type_mapping.py +34 -0
- infrahub/graphql/queries/resource_manager.py +7 -1
- infrahub/graphql/resolvers/many_relationship.py +1 -1
- infrahub/graphql/resolvers/resolver.py +2 -2
- infrahub/graphql/resolvers/single_relationship.py +1 -1
- infrahub/graphql/schema.py +6 -0
- infrahub/menu/menu.py +34 -2
- infrahub/message_bus/messages/__init__.py +0 -10
- infrahub/message_bus/operations/__init__.py +0 -8
- infrahub/message_bus/operations/refresh/registry.py +4 -7
- infrahub/patch/queries/delete_duplicated_edges.py +45 -39
- infrahub/pools/models.py +14 -0
- infrahub/pools/number.py +5 -3
- infrahub/pools/registration.py +22 -0
- infrahub/pools/tasks.py +126 -0
- infrahub/prefect_server/models.py +1 -19
- infrahub/proposed_change/models.py +68 -3
- infrahub/proposed_change/tasks.py +911 -34
- infrahub/schema/__init__.py +0 -0
- infrahub/schema/tasks.py +27 -0
- infrahub/schema/triggers.py +23 -0
- infrahub/task_manager/models.py +10 -6
- infrahub/trigger/catalogue.py +6 -0
- infrahub/trigger/models.py +23 -6
- infrahub/trigger/setup.py +26 -2
- infrahub/trigger/tasks.py +4 -2
- infrahub/types.py +6 -0
- infrahub/webhook/tasks.py +6 -9
- infrahub/workflows/catalogue.py +103 -1
- infrahub_sdk/client.py +43 -10
- infrahub_sdk/ctl/generator.py +4 -4
- infrahub_sdk/ctl/repository.py +1 -1
- infrahub_sdk/node/__init__.py +39 -0
- infrahub_sdk/node/attribute.py +122 -0
- infrahub_sdk/node/constants.py +21 -0
- infrahub_sdk/{node.py → node/node.py} +158 -803
- infrahub_sdk/node/parsers.py +15 -0
- infrahub_sdk/node/property.py +24 -0
- infrahub_sdk/node/related_node.py +266 -0
- infrahub_sdk/node/relationship.py +302 -0
- infrahub_sdk/protocols.py +112 -0
- infrahub_sdk/protocols_base.py +34 -2
- infrahub_sdk/pytest_plugin/items/python_transform.py +2 -1
- infrahub_sdk/query_groups.py +17 -5
- infrahub_sdk/schema/main.py +1 -0
- infrahub_sdk/schema/repository.py +16 -0
- infrahub_sdk/spec/object.py +1 -1
- infrahub_sdk/store.py +1 -1
- infrahub_sdk/testing/schemas/car_person.py +1 -0
- infrahub_sdk/utils.py +7 -20
- infrahub_sdk/yaml.py +6 -5
- {infrahub_server-1.2.11.dist-info → infrahub_server-1.3.0.dist-info}/METADATA +5 -5
- {infrahub_server-1.2.11.dist-info → infrahub_server-1.3.0.dist-info}/RECORD +197 -168
- {infrahub_server-1.2.11.dist-info → infrahub_server-1.3.0.dist-info}/WHEEL +1 -1
- infrahub_testcontainers/container.py +239 -65
- infrahub_testcontainers/docker-compose-cluster.test.yml +321 -0
- infrahub_testcontainers/docker-compose.test.yml +2 -1
- infrahub_testcontainers/helpers.py +23 -3
- infrahub_testcontainers/plugin.py +9 -0
- infrahub/message_bus/messages/check_generator_run.py +0 -26
- infrahub/message_bus/messages/finalize_validator_execution.py +0 -15
- infrahub/message_bus/messages/proposed_change/base_with_diff.py +0 -16
- infrahub/message_bus/messages/proposed_change/request_proposedchange_refreshartifacts.py +0 -11
- infrahub/message_bus/messages/request_generatordefinition_check.py +0 -20
- infrahub/message_bus/messages/request_proposedchange_pipeline.py +0 -23
- infrahub/message_bus/operations/check/__init__.py +0 -3
- infrahub/message_bus/operations/check/generator.py +0 -156
- infrahub/message_bus/operations/finalize/__init__.py +0 -3
- infrahub/message_bus/operations/finalize/validator.py +0 -133
- infrahub/message_bus/operations/requests/__init__.py +0 -9
- infrahub/message_bus/operations/requests/generator_definition.py +0 -140
- infrahub/message_bus/operations/requests/proposed_change.py +0 -629
- infrahub/patch/queries/consolidate_duplicated_nodes.py +0 -109
- /infrahub/{message_bus/messages/proposed_change → actions}/__init__.py +0 -0
- {infrahub_server-1.2.11.dist-info → infrahub_server-1.3.0.dist-info}/LICENSE.txt +0 -0
- {infrahub_server-1.2.11.dist-info → infrahub_server-1.3.0.dist-info}/entry_points.txt +0 -0
|
@@ -97,8 +97,7 @@ class DeleteNodesRelsQuery(Query):
|
|
|
97
97
|
// - on deleted edge branch
|
|
98
98
|
// - or on any branch and deleted node is agnostic
|
|
99
99
|
// - or deleted node is aware and rel is agnostic
|
|
100
|
-
CALL {
|
|
101
|
-
WITH rel, deleted_edge
|
|
100
|
+
CALL (rel, deleted_edge) {
|
|
102
101
|
OPTIONAL MATCH (rel)-[peer_active_edge {status: "active"}]-(peer_1)
|
|
103
102
|
WHERE (peer_active_edge.branch = deleted_edge.branch OR (rel.branch_support <> $branch_agnostic AND deleted_edge.branch = $global_branch))
|
|
104
103
|
AND peer_active_edge.to IS NULL
|
|
@@ -160,62 +159,52 @@ class DeleteNodesRelsQuery(Query):
|
|
|
160
159
|
// Below CALL subqueries are called once for each rel-peer_2 pair for which we want to create a deleted edge.
|
|
161
160
|
// Note that with current infrahub relationships edges design, only one of this CALL should be matched per pair.
|
|
162
161
|
|
|
163
|
-
CALL {
|
|
164
|
-
WITH rel, peer_2, branch, branch_level, deleted_time
|
|
162
|
+
CALL (rel, peer_2, branch, branch_level, deleted_time) {
|
|
165
163
|
MATCH (rel)-[:IS_RELATED]->(peer_2)
|
|
166
164
|
MERGE (rel)-[:IS_RELATED {status: "deleted", branch: branch, branch_level: branch_level, from: deleted_time}]->(peer_2)
|
|
167
165
|
}
|
|
168
166
|
|
|
169
|
-
CALL {
|
|
170
|
-
WITH rel, peer_2, branch, branch_level, deleted_time
|
|
167
|
+
CALL (rel, peer_2, branch, branch_level, deleted_time) {
|
|
171
168
|
MATCH (rel)-[:IS_PROTECTED]->(peer_2)
|
|
172
169
|
MERGE (rel)-[:IS_PROTECTED {status: "deleted", branch: branch, branch_level: branch_level, from: deleted_time}]->(peer_2)
|
|
173
170
|
}
|
|
174
171
|
|
|
175
|
-
CALL {
|
|
176
|
-
WITH rel, peer_2, branch, branch_level, deleted_time
|
|
172
|
+
CALL (rel, peer_2, branch, branch_level, deleted_time) {
|
|
177
173
|
MATCH (rel)-[:IS_VISIBLE]->(peer_2)
|
|
178
174
|
MERGE (rel)-[:IS_VISIBLE {status: "deleted", branch: branch, branch_level: branch_level, from: deleted_time}]->(peer_2)
|
|
179
175
|
}
|
|
180
176
|
|
|
181
|
-
CALL {
|
|
182
|
-
WITH rel, peer_2, branch, branch_level, deleted_time
|
|
177
|
+
CALL (rel, peer_2, branch, branch_level, deleted_time) {
|
|
183
178
|
MATCH (rel)-[:HAS_OWNER]->(peer_2)
|
|
184
179
|
MERGE (rel)-[:HAS_OWNER {status: "deleted", branch: branch, branch_level: branch_level, from: deleted_time}]->(peer_2)
|
|
185
180
|
}
|
|
186
181
|
|
|
187
|
-
CALL {
|
|
188
|
-
WITH rel, peer_2, branch, branch_level, deleted_time
|
|
182
|
+
CALL (rel, peer_2, branch, branch_level, deleted_time) {
|
|
189
183
|
MATCH (rel)-[:HAS_SOURCE]->(peer_2)
|
|
190
184
|
MERGE (rel)-[:HAS_SOURCE {status: "deleted", branch: branch, branch_level: branch_level, from: deleted_time}]->(peer_2)
|
|
191
185
|
}
|
|
192
186
|
|
|
193
|
-
CALL {
|
|
194
|
-
WITH rel, peer_2, branch, branch_level, deleted_time
|
|
187
|
+
CALL (rel, peer_2, branch, branch_level, deleted_time) {
|
|
195
188
|
MATCH (rel)<-[:IS_RELATED]-(peer_2)
|
|
196
189
|
MERGE (rel)<-[:IS_RELATED {status: "deleted", branch: branch, branch_level: branch_level, from: deleted_time}]-(peer_2)
|
|
197
190
|
}
|
|
198
191
|
|
|
199
|
-
CALL {
|
|
200
|
-
WITH rel, peer_2, branch, branch_level, deleted_time
|
|
192
|
+
CALL (rel, peer_2, branch, branch_level, deleted_time) {
|
|
201
193
|
MATCH (rel)<-[:IS_PROTECTED]-(peer_2)
|
|
202
194
|
MERGE (rel)<-[:IS_PROTECTED {status: "deleted", branch: branch, branch_level: branch_level, from: deleted_time}]-(peer_2)
|
|
203
195
|
}
|
|
204
196
|
|
|
205
|
-
CALL {
|
|
206
|
-
WITH rel, peer_2, branch, branch_level, deleted_time
|
|
197
|
+
CALL (rel, peer_2, branch, branch_level, deleted_time) {
|
|
207
198
|
MATCH (rel)<-[:IS_VISIBLE]-(peer_2)
|
|
208
199
|
MERGE (rel)<-[:IS_VISIBLE {status: "deleted", branch: branch, branch_level: branch_level, from: deleted_time}]-(peer_2)
|
|
209
200
|
}
|
|
210
201
|
|
|
211
|
-
CALL {
|
|
212
|
-
WITH rel, peer_2, branch, branch_level, deleted_time
|
|
202
|
+
CALL (rel, peer_2, branch, branch_level, deleted_time) {
|
|
213
203
|
MATCH (rel)<-[:HAS_OWNER]-(peer_2)
|
|
214
204
|
MERGE (rel)<-[:HAS_OWNER {status: "deleted", branch: branch, branch_level: branch_level, from: deleted_time}]-(peer_2)
|
|
215
205
|
}
|
|
216
206
|
|
|
217
|
-
CALL {
|
|
218
|
-
WITH rel, peer_2, branch, branch_level, deleted_time
|
|
207
|
+
CALL (rel, peer_2, branch, branch_level, deleted_time) {
|
|
219
208
|
MATCH (rel)<-[:HAS_SOURCE]-(peer_2)
|
|
220
209
|
MERGE (rel)<-[:HAS_SOURCE {status: "deleted", branch: branch, branch_level: branch_level, from: deleted_time}]-(peer_2)
|
|
221
210
|
}
|
|
@@ -33,8 +33,7 @@ WHERE num_duplicate_edges > 1
|
|
|
33
33
|
// -------------------
|
|
34
34
|
WITH DISTINCT a, branch, branch_level, status, from, to, attr_val, attr_default
|
|
35
35
|
WITH attr_val, attr_default, collect([a, branch, branch_level, status, from, to]) AS details_list
|
|
36
|
-
CALL {
|
|
37
|
-
WITH attr_val, attr_default
|
|
36
|
+
CALL (attr_val, attr_default) {
|
|
38
37
|
MATCH (av:AttributeValue {value: attr_val, is_default: attr_default})
|
|
39
38
|
RETURN av AS the_one_av
|
|
40
39
|
ORDER by %(id_func)s(av) ASC
|
|
@@ -53,11 +52,10 @@ WITH a, branch, status, from, to, attr_val, attr_default, %(id_func)s(fresh_e) A
|
|
|
53
52
|
// -------------------
|
|
54
53
|
// get the identical edges for a given set of Attribute node, edge properties, AttributeValue.value
|
|
55
54
|
// -------------------
|
|
56
|
-
CALL {
|
|
55
|
+
CALL (a, branch, status, from, to, attr_val, attr_default, e_id_to_keep) {
|
|
57
56
|
// -------------------
|
|
58
57
|
// delete the duplicate edges a given set of Attribute node, edge properties, AttributeValue.value
|
|
59
58
|
// -------------------
|
|
60
|
-
WITH a, branch, status, from, to, attr_val, attr_default, e_id_to_keep
|
|
61
59
|
MATCH (a)-[e:HAS_VALUE]->(av:AttributeValue {value: attr_val, is_default: attr_default})
|
|
62
60
|
WHERE %(id_func)s(e) <> e_id_to_keep
|
|
63
61
|
AND e.branch = branch AND e.status = status AND e.from = from
|
|
@@ -99,8 +97,7 @@ WITH DISTINCT a, branch, branch_level, status, from, to, b
|
|
|
99
97
|
CREATE (a)-[fresh_e:%(edge_type)s {branch: branch, branch_level: branch_level, status: status, from: from}]->(b)
|
|
100
98
|
SET fresh_e.to = to
|
|
101
99
|
WITH a, branch, status, from, to, b, %(id_func)s(fresh_e) AS e_id_to_keep
|
|
102
|
-
CALL {
|
|
103
|
-
WITH a, branch, status, from, to, b, e_id_to_keep
|
|
100
|
+
CALL (a, branch, status, from, to, b, e_id_to_keep) {
|
|
104
101
|
MATCH (a)-[e:%(edge_type)s]->(b)
|
|
105
102
|
WHERE %(id_func)s(e) <> e_id_to_keep
|
|
106
103
|
AND e.branch = branch AND e.status = status AND e.from = from
|
|
@@ -24,8 +24,7 @@ class SetMissingHierarchyQuery(Query):
|
|
|
24
24
|
WITH r.default_branch AS default_branch
|
|
25
25
|
MATCH (n:Node)-[main_e:IS_RELATED {branch: default_branch}]-(rel:Relationship)
|
|
26
26
|
WHERE main_e.hierarchy IS NULL
|
|
27
|
-
CALL {
|
|
28
|
-
WITH n, main_e, rel
|
|
27
|
+
CALL (n, main_e, rel) {
|
|
29
28
|
MATCH (n)-[branch_e:IS_RELATED]-(rel)
|
|
30
29
|
WHERE branch_e.hierarchy IS NOT NULL
|
|
31
30
|
AND branch_e.branch <> main_e.branch
|
|
@@ -52,7 +52,7 @@ class DedupCardinalityOneRelsQuery(Query):
|
|
|
52
52
|
# of a one-to-many BIDIR relationship.
|
|
53
53
|
query = """
|
|
54
54
|
|
|
55
|
-
CALL {
|
|
55
|
+
CALL () {
|
|
56
56
|
MATCH (rel_node: Relationship)-[edge:IS_RELATED]->(n: Node)<-[edge_2:IS_RELATED]-(rel_node_2: Relationship {name: rel_node.name})
|
|
57
57
|
WHERE rel_node.name in $rel_one_identifiers_inbound[n.kind]
|
|
58
58
|
AND edge.branch = edge_2.branch
|
|
@@ -64,7 +64,7 @@ class DedupCardinalityOneRelsQuery(Query):
|
|
|
64
64
|
DETACH DELETE rel_node
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
CALL {
|
|
67
|
+
CALL () {
|
|
68
68
|
MATCH (rel_node_3: Relationship)<-[edge_3:IS_RELATED]-(n: Node)-[edge_4:IS_RELATED]->(rel_node_4: Relationship {name: rel_node_3.name})
|
|
69
69
|
WHERE rel_node_3.name in $rel_one_identifiers_outbound[n.kind]
|
|
70
70
|
AND edge_3.branch = edge_4.branch
|
|
@@ -39,8 +39,7 @@ class BackfillMissingHierarchyQuery(Query):
|
|
|
39
39
|
MATCH (rel:Relationship {name: "parent__child"})-[e:IS_RELATED]-(n:Node)
|
|
40
40
|
WHERE e.hierarchy IS NULL
|
|
41
41
|
WITH DISTINCT rel, n, default_branch
|
|
42
|
-
CALL {
|
|
43
|
-
WITH rel, n, default_branch
|
|
42
|
+
CALL (rel, n, default_branch) {
|
|
44
43
|
MATCH (rel)-[e:IS_RELATED {branch: default_branch}]-(n)
|
|
45
44
|
RETURN e
|
|
46
45
|
ORDER BY e.from DESC
|
|
@@ -33,6 +33,5 @@ class Migration028(ArbitraryMigration):
|
|
|
33
33
|
component_registry = get_component_registry()
|
|
34
34
|
diff_repo = await component_registry.get_component(DiffRepository, db=db, branch=default_branch)
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
await diff_repo.delete_diff_roots(diff_root_uuids=[d.uuid for d in diff_roots])
|
|
36
|
+
await diff_repo.delete_all_diff_roots()
|
|
38
37
|
return MigrationResult()
|