infrahub-server 1.7.0rc0__py3-none-any.whl → 1.7.2__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/gather.py +2 -2
- infrahub/api/query.py +3 -2
- infrahub/api/schema.py +5 -0
- infrahub/api/transformation.py +3 -3
- infrahub/cli/db.py +6 -2
- infrahub/computed_attribute/gather.py +2 -0
- infrahub/config.py +2 -2
- infrahub/core/attribute.py +21 -2
- infrahub/core/branch/models.py +11 -117
- infrahub/core/branch/tasks.py +7 -3
- infrahub/core/diff/merger/merger.py +5 -1
- infrahub/core/diff/model/path.py +43 -0
- infrahub/core/graph/__init__.py +1 -1
- infrahub/core/graph/index.py +2 -0
- infrahub/core/initialization.py +2 -1
- infrahub/core/ipam/resource_allocator.py +229 -0
- infrahub/core/migrations/graph/__init__.py +10 -0
- infrahub/core/migrations/graph/m014_remove_index_attr_value.py +3 -2
- infrahub/core/migrations/graph/m015_diff_format_update.py +3 -2
- infrahub/core/migrations/graph/m016_diff_delete_bug_fix.py +3 -2
- infrahub/core/migrations/graph/m017_add_core_profile.py +6 -4
- infrahub/core/migrations/graph/m018_uniqueness_nulls.py +3 -4
- infrahub/core/migrations/graph/m020_duplicate_edges.py +3 -3
- infrahub/core/migrations/graph/m025_uniqueness_nulls.py +3 -4
- infrahub/core/migrations/graph/m026_0000_prefix_fix.py +4 -5
- infrahub/core/migrations/graph/m028_delete_diffs.py +3 -2
- infrahub/core/migrations/graph/m029_duplicates_cleanup.py +3 -2
- infrahub/core/migrations/graph/m031_check_number_attributes.py +4 -3
- infrahub/core/migrations/graph/m032_cleanup_orphaned_branch_relationships.py +3 -2
- infrahub/core/migrations/graph/m034_find_orphaned_schema_fields.py +3 -2
- infrahub/core/migrations/graph/m035_orphan_relationships.py +3 -3
- infrahub/core/migrations/graph/m036_drop_attr_value_index.py +3 -2
- infrahub/core/migrations/graph/m037_index_attr_vals.py +3 -2
- infrahub/core/migrations/graph/m038_redo_0000_prefix_fix.py +4 -5
- infrahub/core/migrations/graph/m039_ipam_reconcile.py +3 -2
- infrahub/core/migrations/graph/m041_deleted_dup_edges.py +3 -2
- infrahub/core/migrations/graph/m042_profile_attrs_in_db.py +5 -4
- infrahub/core/migrations/graph/m043_create_hfid_display_label_in_db.py +12 -5
- infrahub/core/migrations/graph/m044_backfill_hfid_display_label_in_db.py +15 -4
- infrahub/core/migrations/graph/m045_backfill_hfid_display_label_in_db_profile_template.py +10 -4
- infrahub/core/migrations/graph/m046_fill_agnostic_hfid_display_labels.py +6 -5
- infrahub/core/migrations/graph/m047_backfill_or_null_display_label.py +19 -5
- infrahub/core/migrations/graph/m048_undelete_rel_props.py +6 -4
- infrahub/core/migrations/graph/m049_remove_is_visible_relationship.py +3 -3
- infrahub/core/migrations/graph/m050_backfill_vertex_metadata.py +3 -3
- infrahub/core/migrations/graph/m051_subtract_branched_from_microsecond.py +39 -0
- infrahub/core/migrations/graph/m052_fix_global_branch_level.py +51 -0
- infrahub/core/migrations/graph/m053_fix_branch_level_zero.py +61 -0
- infrahub/core/migrations/graph/m054_cleanup_orphaned_nodes.py +87 -0
- infrahub/core/migrations/graph/m055_remove_webhook_validate_certificates_default.py +86 -0
- infrahub/core/migrations/runner.py +6 -3
- infrahub/core/migrations/schema/attribute_kind_update.py +8 -11
- infrahub/core/migrations/schema/attribute_supports_profile.py +3 -8
- infrahub/core/migrations/schema/models.py +8 -0
- infrahub/core/migrations/schema/node_attribute_add.py +24 -29
- infrahub/core/migrations/schema/tasks.py +7 -1
- infrahub/core/migrations/shared.py +37 -30
- infrahub/core/node/__init__.py +2 -1
- infrahub/core/node/lock_utils.py +23 -2
- infrahub/core/node/resource_manager/ip_address_pool.py +5 -11
- infrahub/core/node/resource_manager/ip_prefix_pool.py +5 -21
- infrahub/core/node/resource_manager/number_pool.py +109 -39
- infrahub/core/query/__init__.py +7 -1
- infrahub/core/query/branch.py +18 -2
- infrahub/core/query/ipam.py +629 -40
- infrahub/core/query/node.py +128 -0
- infrahub/core/query/resource_manager.py +114 -1
- infrahub/core/relationship/model.py +9 -3
- infrahub/core/schema/attribute_parameters.py +28 -1
- infrahub/core/schema/attribute_schema.py +9 -2
- infrahub/core/schema/definitions/core/webhook.py +0 -1
- infrahub/core/schema/definitions/internal.py +7 -4
- infrahub/core/schema/manager.py +50 -38
- infrahub/core/validators/attribute/kind.py +5 -2
- infrahub/core/validators/determiner.py +4 -0
- infrahub/graphql/analyzer.py +3 -1
- infrahub/graphql/app.py +7 -10
- infrahub/graphql/execution.py +95 -0
- infrahub/graphql/manager.py +8 -2
- infrahub/graphql/mutations/proposed_change.py +15 -0
- infrahub/graphql/parser.py +10 -7
- infrahub/graphql/queries/ipam.py +20 -25
- infrahub/graphql/queries/search.py +29 -9
- infrahub/lock.py +7 -0
- infrahub/proposed_change/tasks.py +2 -0
- infrahub/services/adapters/cache/redis.py +7 -0
- infrahub/services/adapters/http/httpx.py +27 -0
- infrahub/trigger/catalogue.py +2 -0
- infrahub/trigger/models.py +73 -4
- infrahub/trigger/setup.py +1 -1
- infrahub/trigger/system.py +36 -0
- infrahub/webhook/models.py +4 -2
- infrahub/webhook/tasks.py +2 -2
- infrahub/workflows/initialization.py +2 -2
- infrahub_sdk/analyzer.py +2 -2
- infrahub_sdk/branch.py +12 -39
- infrahub_sdk/checks.py +4 -4
- infrahub_sdk/client.py +36 -0
- infrahub_sdk/ctl/cli_commands.py +2 -1
- infrahub_sdk/ctl/graphql.py +15 -4
- infrahub_sdk/ctl/utils.py +2 -2
- infrahub_sdk/enums.py +6 -0
- infrahub_sdk/graphql/renderers.py +21 -0
- infrahub_sdk/graphql/utils.py +85 -0
- infrahub_sdk/node/attribute.py +12 -2
- infrahub_sdk/node/constants.py +11 -0
- infrahub_sdk/node/metadata.py +69 -0
- infrahub_sdk/node/node.py +65 -14
- infrahub_sdk/node/property.py +3 -0
- infrahub_sdk/node/related_node.py +24 -1
- infrahub_sdk/node/relationship.py +10 -1
- infrahub_sdk/operation.py +2 -2
- infrahub_sdk/schema/repository.py +1 -2
- infrahub_sdk/transforms.py +2 -2
- infrahub_sdk/types.py +18 -2
- {infrahub_server-1.7.0rc0.dist-info → infrahub_server-1.7.2.dist-info}/METADATA +8 -8
- {infrahub_server-1.7.0rc0.dist-info → infrahub_server-1.7.2.dist-info}/RECORD +123 -114
- {infrahub_server-1.7.0rc0.dist-info → infrahub_server-1.7.2.dist-info}/entry_points.txt +0 -1
- infrahub_testcontainers/docker-compose-cluster.test.yml +16 -10
- infrahub_testcontainers/docker-compose.test.yml +11 -10
- infrahub_testcontainers/performance_test.py +1 -1
- infrahub/pools/address.py +0 -16
- {infrahub_server-1.7.0rc0.dist-info → infrahub_server-1.7.2.dist-info}/WHEEL +0 -0
- {infrahub_server-1.7.0rc0.dist-info → infrahub_server-1.7.2.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -13,10 +13,10 @@ x-neo4j-config-common: &neo4j-config-common
|
|
|
13
13
|
NEO4J_server_metrics_filter: '*'
|
|
14
14
|
NEO4J_server_cluster_system__database__mode: PRIMARY
|
|
15
15
|
NEO4J_initial_server_mode__constraint: PRIMARY
|
|
16
|
-
|
|
16
|
+
NEO4J_dbms_cluster_endpoints: database:6000,database-core2:6000,database-core3:6000
|
|
17
17
|
NEO4J_initial_dbms_default__primaries__count: 3
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
NEO4J_server_memory_heap_initial__size: ${INFRAHUB_TESTING_DB_HEAP_INITIAL_SIZE}
|
|
19
|
+
NEO4J_server_memory_heap_max__size: ${INFRAHUB_TESTING_DB_HEAP_MAX_SIZE}
|
|
20
20
|
NEO4J_server_memory_pagecache_size: ${INFRAHUB_TESTING_DB_PAGECACHE_SIZE}
|
|
21
21
|
|
|
22
22
|
|
|
@@ -73,7 +73,6 @@ services:
|
|
|
73
73
|
<<: *neo4j-config-common
|
|
74
74
|
NEO4J_metrics_prometheus_endpoint: 0.0.0.0:2004
|
|
75
75
|
NEO4J_server_backup_listen__address: 0.0.0.0:6362
|
|
76
|
-
NEO4J_server_discovery_advertised__address: database:5000
|
|
77
76
|
NEO4J_server_cluster_advertised__address: database:6000
|
|
78
77
|
NEO4J_server_cluster_raft_advertised__address: database:7000
|
|
79
78
|
NEO4J_server_bolt_advertised__address: database:7687
|
|
@@ -105,7 +104,6 @@ services:
|
|
|
105
104
|
<<: *neo4j-config-common
|
|
106
105
|
NEO4J_metrics_prometheus_endpoint: 0.0.0.0:2005
|
|
107
106
|
NEO4J_server_backup_listen__address: 0.0.0.0:6363
|
|
108
|
-
NEO4J_server_discovery_advertised__address: database-core2:5000
|
|
109
107
|
NEO4J_server_cluster_advertised__address: database-core2:6000
|
|
110
108
|
NEO4J_server_cluster_raft_advertised__address: database-core2:7000
|
|
111
109
|
NEO4J_server_bolt_advertised__address: database-core2:7687
|
|
@@ -140,7 +138,6 @@ services:
|
|
|
140
138
|
<<: *neo4j-config-common
|
|
141
139
|
NEO4J_metrics_prometheus_endpoint: 0.0.0.0:2006
|
|
142
140
|
NEO4J_server_backup_listen__address: 0.0.0.0:6364
|
|
143
|
-
NEO4J_server_discovery_advertised__address: database-core3:5000
|
|
144
141
|
NEO4J_server_cluster_advertised__address: database-core3:6000
|
|
145
142
|
NEO4J_server_cluster_raft_advertised__address: database-core3:7000
|
|
146
143
|
NEO4J_server_bolt_advertised__address: database-core3:7687
|
|
@@ -179,8 +176,8 @@ services:
|
|
|
179
176
|
INFRAHUB_CACHE_ADDRESS: ${INFRAHUB_TESTING_CACHE_ADDRESS}
|
|
180
177
|
PREFECT_REDIS_MESSAGING_HOST: "${INFRAHUB_TESTING_CACHE_ADDRESS:-cache}"
|
|
181
178
|
PREFECT_REDIS_MESSAGING_DB: "1"
|
|
182
|
-
PREFECT_REDIS_MESSAGING_CONSUMER_MIN_IDLE_TIME:
|
|
183
|
-
PREFECT_REDIS_MESSAGING_PUBLISHER_BATCH_SIZE:
|
|
179
|
+
PREFECT_REDIS_MESSAGING_CONSUMER_MIN_IDLE_TIME: ${INFRAHUB_TESTING_TASKMGR_CONSUMER_MIN_IDLE_TIME:-5}
|
|
180
|
+
PREFECT_REDIS_MESSAGING_PUBLISHER_BATCH_SIZE: ${INFRAHUB_TESTING_TASKMGR_PUBLISHER_BATCH_SIZE:-5}
|
|
184
181
|
|
|
185
182
|
PREFECT_MESSAGING_BROKER:
|
|
186
183
|
PREFECT_MESSAGING_CACHE:
|
|
@@ -231,14 +228,23 @@ services:
|
|
|
231
228
|
PREFECT_SERVER_CONCURRENCY_LEASE_STORAGE: prefect_redis.lease_storage
|
|
232
229
|
PREFECT_REDIS_MESSAGING_HOST: "${INFRAHUB_TESTING_CACHE_ADDRESS:-cache}"
|
|
233
230
|
PREFECT_REDIS_MESSAGING_DB: "1"
|
|
234
|
-
PREFECT_REDIS_MESSAGING_CONSUMER_MIN_IDLE_TIME:
|
|
235
|
-
PREFECT_REDIS_MESSAGING_PUBLISHER_BATCH_SIZE:
|
|
231
|
+
PREFECT_REDIS_MESSAGING_CONSUMER_MIN_IDLE_TIME: ${INFRAHUB_TESTING_TASKMGR_CONSUMER_MIN_IDLE_TIME:-5}
|
|
232
|
+
PREFECT_REDIS_MESSAGING_PUBLISHER_BATCH_SIZE: ${INFRAHUB_TESTING_TASKMGR_PUBLISHER_BATCH_SIZE:-5}
|
|
236
233
|
|
|
237
234
|
PREFECT_SERVER_SERVICES_EVENT_LOGGER_ENABLED: "true"
|
|
238
235
|
PREFECT_SERVER_SERVICES_EVENT_PERSISTER_ENABLED: "true"
|
|
239
236
|
PREFECT_SERVER_SERVICES_TRIGGERS_ENABLED: "true"
|
|
240
237
|
PREFECT_SERVER_SERVICES_TASK_RUN_RECORDER_ENABLED: "true"
|
|
241
238
|
|
|
239
|
+
PREFECT_SERVER_SERVICES_EVENT_PERSISTER_READ_BATCH_SIZE: ${INFRAHUB_TESTING_TASKMGR_EVENT_PERSISTER_READ_BATCH_SIZE:-1}
|
|
240
|
+
PREFECT_SERVER_SERVICES_EVENT_PERSISTER_BATCH_SIZE: ${INFRAHUB_TESTING_TASKMGR_EVENT_PERSISTER_BATCH_SIZE:-20}
|
|
241
|
+
PREFECT_SERVER_SERVICES_EVENT_PERSISTER_BATCH_SIZE_DELETE: ${INFRAHUB_TESTING_TASKMGR_EVENT_PERSISTER_BATCH_SIZE_DELETE:-10000}
|
|
242
|
+
PREFECT_SERVER_SERVICES_EVENT_PERSISTER_FLUSH_INTERVAL: ${INFRAHUB_TESTING_TASKMGR_EVENT_PERSISTER_FLUSH_INTERVAL:-5}
|
|
243
|
+
|
|
244
|
+
PREFECT_SERVER_SERVICES_TASK_RUN_RECORDER_READ_BATCH_SIZE: ${INFRAHUB_TESTING_TASKMGR_TASK_RUN_RECORDER_READ_BATCH_SIZE:-1}
|
|
245
|
+
PREFECT_SERVER_SERVICES_TASK_RUN_RECORDER_BATCH_SIZE: ${INFRAHUB_TESTING_TASKMGR_TASK_RUN_RECORDER_BATCH_SIZE:-1}
|
|
246
|
+
PREFECT_SERVER_SERVICES_TASK_RUN_RECORDER_FLUSH_INTERVAL: ${INFRAHUB_TESTING_TASKMGR_TASK_RUN_RECORDER_FLUSH_INTERVAL:-5}
|
|
247
|
+
|
|
242
248
|
task-manager-db:
|
|
243
249
|
image: "${POSTGRES_DOCKER_IMAGE:-postgres:18-alpine}"
|
|
244
250
|
command: postgres -c 'max_connections=${INFRAHUB_TESTING_TASK_MANAGER_DB_MAX_CONNECTIONS:-100}'
|
|
@@ -90,8 +90,8 @@ services:
|
|
|
90
90
|
INFRAHUB_CACHE_ADDRESS: ${INFRAHUB_TESTING_CACHE_ADDRESS}
|
|
91
91
|
PREFECT_REDIS_MESSAGING_HOST: "${INFRAHUB_TESTING_CACHE_ADDRESS:-cache}"
|
|
92
92
|
PREFECT_REDIS_MESSAGING_DB: "1"
|
|
93
|
-
PREFECT_REDIS_MESSAGING_CONSUMER_MIN_IDLE_TIME:
|
|
94
|
-
PREFECT_REDIS_MESSAGING_PUBLISHER_BATCH_SIZE:
|
|
93
|
+
PREFECT_REDIS_MESSAGING_CONSUMER_MIN_IDLE_TIME: ${INFRAHUB_TESTING_TASKMGR_CONSUMER_MIN_IDLE_TIME:-5}
|
|
94
|
+
PREFECT_REDIS_MESSAGING_PUBLISHER_BATCH_SIZE: ${INFRAHUB_TESTING_TASKMGR_PUBLISHER_BATCH_SIZE:-5}
|
|
95
95
|
|
|
96
96
|
PREFECT_MESSAGING_BROKER:
|
|
97
97
|
PREFECT_MESSAGING_CACHE:
|
|
@@ -142,21 +142,22 @@ services:
|
|
|
142
142
|
PREFECT_SERVER_CONCURRENCY_LEASE_STORAGE: prefect_redis.lease_storage
|
|
143
143
|
PREFECT_REDIS_MESSAGING_HOST: "${INFRAHUB_TESTING_CACHE_ADDRESS:-cache}"
|
|
144
144
|
PREFECT_REDIS_MESSAGING_DB: "1"
|
|
145
|
-
PREFECT_REDIS_MESSAGING_CONSUMER_MIN_IDLE_TIME:
|
|
146
|
-
PREFECT_REDIS_MESSAGING_PUBLISHER_BATCH_SIZE:
|
|
145
|
+
PREFECT_REDIS_MESSAGING_CONSUMER_MIN_IDLE_TIME: ${INFRAHUB_TESTING_TASKMGR_CONSUMER_MIN_IDLE_TIME:-5}
|
|
146
|
+
PREFECT_REDIS_MESSAGING_PUBLISHER_BATCH_SIZE: ${INFRAHUB_TESTING_TASKMGR_PUBLISHER_BATCH_SIZE:-5}
|
|
147
147
|
|
|
148
148
|
PREFECT_SERVER_SERVICES_EVENT_LOGGER_ENABLED: "true"
|
|
149
149
|
PREFECT_SERVER_SERVICES_EVENT_PERSISTER_ENABLED: "true"
|
|
150
150
|
PREFECT_SERVER_SERVICES_TRIGGERS_ENABLED: "true"
|
|
151
151
|
PREFECT_SERVER_SERVICES_TASK_RUN_RECORDER_ENABLED: "true"
|
|
152
152
|
|
|
153
|
-
PREFECT_SERVER_SERVICES_EVENT_PERSISTER_READ_BATCH_SIZE:
|
|
154
|
-
PREFECT_SERVER_SERVICES_EVENT_PERSISTER_BATCH_SIZE:
|
|
155
|
-
PREFECT_SERVER_SERVICES_EVENT_PERSISTER_BATCH_SIZE_DELETE:
|
|
156
|
-
PREFECT_SERVER_SERVICES_EVENT_PERSISTER_FLUSH_INTERVAL:
|
|
153
|
+
PREFECT_SERVER_SERVICES_EVENT_PERSISTER_READ_BATCH_SIZE: ${INFRAHUB_TESTING_TASKMGR_EVENT_PERSISTER_READ_BATCH_SIZE:-1}
|
|
154
|
+
PREFECT_SERVER_SERVICES_EVENT_PERSISTER_BATCH_SIZE: ${INFRAHUB_TESTING_TASKMGR_EVENT_PERSISTER_BATCH_SIZE:-20}
|
|
155
|
+
PREFECT_SERVER_SERVICES_EVENT_PERSISTER_BATCH_SIZE_DELETE: ${INFRAHUB_TESTING_TASKMGR_EVENT_PERSISTER_BATCH_SIZE_DELETE:-10000}
|
|
156
|
+
PREFECT_SERVER_SERVICES_EVENT_PERSISTER_FLUSH_INTERVAL: ${INFRAHUB_TESTING_TASKMGR_EVENT_PERSISTER_FLUSH_INTERVAL:-5}
|
|
157
157
|
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
PREFECT_SERVER_SERVICES_TASK_RUN_RECORDER_READ_BATCH_SIZE: ${INFRAHUB_TESTING_TASKMGR_TASK_RUN_RECORDER_READ_BATCH_SIZE:-1}
|
|
159
|
+
PREFECT_SERVER_SERVICES_TASK_RUN_RECORDER_BATCH_SIZE: ${INFRAHUB_TESTING_TASKMGR_TASK_RUN_RECORDER_BATCH_SIZE:-1}
|
|
160
|
+
PREFECT_SERVER_SERVICES_TASK_RUN_RECORDER_FLUSH_INTERVAL: ${INFRAHUB_TESTING_TASKMGR_TASK_RUN_RECORDER_FLUSH_INTERVAL:-5}
|
|
160
161
|
|
|
161
162
|
task-manager-db:
|
|
162
163
|
image: "${POSTGRES_DOCKER_IMAGE:-postgres:18-alpine}"
|
infrahub/pools/address.py
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
from netaddr import IPNetwork, IPSet
|
|
2
|
-
|
|
3
|
-
from infrahub.core.ipam.constants import IPAddressType, IPNetworkType
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def get_available(network: IPNetworkType, addresses: list[IPAddressType], is_pool: bool) -> IPSet:
|
|
7
|
-
pool = IPSet(IPNetwork(str(network)))
|
|
8
|
-
reserved = [IPNetwork(f"{str(address.ip)}/{address.max_prefixlen}") for address in addresses]
|
|
9
|
-
if not is_pool:
|
|
10
|
-
# If the specified network is not a pool we remove the network address and
|
|
11
|
-
# optionally the broadcast address in case of IPv4
|
|
12
|
-
reserved.append(IPNetwork(f"{str(network.network_address)}/{network.max_prefixlen}"))
|
|
13
|
-
if network.version == 4:
|
|
14
|
-
reserved.append(IPNetwork(f"{str(network.broadcast_address)}/{network.max_prefixlen}"))
|
|
15
|
-
|
|
16
|
-
return pool - IPSet(reserved)
|
|
File without changes
|
|
File without changes
|