infrahub-server 1.2.5__py3-none-any.whl → 1.2.7__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.
Files changed (57) hide show
  1. infrahub/cli/db.py +2 -0
  2. infrahub/cli/patch.py +153 -0
  3. infrahub/computed_attribute/models.py +81 -1
  4. infrahub/computed_attribute/tasks.py +34 -53
  5. infrahub/core/manager.py +15 -2
  6. infrahub/core/node/__init__.py +4 -1
  7. infrahub/core/query/ipam.py +7 -5
  8. infrahub/core/registry.py +2 -3
  9. infrahub/core/schema/schema_branch.py +34 -37
  10. infrahub/database/__init__.py +2 -0
  11. infrahub/graphql/manager.py +10 -0
  12. infrahub/graphql/mutations/main.py +4 -5
  13. infrahub/graphql/mutations/resource_manager.py +3 -3
  14. infrahub/patch/__init__.py +0 -0
  15. infrahub/patch/constants.py +13 -0
  16. infrahub/patch/edge_adder.py +64 -0
  17. infrahub/patch/edge_deleter.py +33 -0
  18. infrahub/patch/edge_updater.py +28 -0
  19. infrahub/patch/models.py +98 -0
  20. infrahub/patch/plan_reader.py +107 -0
  21. infrahub/patch/plan_writer.py +92 -0
  22. infrahub/patch/queries/__init__.py +0 -0
  23. infrahub/patch/queries/base.py +17 -0
  24. infrahub/patch/runner.py +254 -0
  25. infrahub/patch/vertex_adder.py +61 -0
  26. infrahub/patch/vertex_deleter.py +33 -0
  27. infrahub/patch/vertex_updater.py +28 -0
  28. infrahub/tasks/registry.py +4 -1
  29. infrahub_sdk/checks.py +1 -1
  30. infrahub_sdk/ctl/cli_commands.py +2 -2
  31. infrahub_sdk/ctl/menu.py +56 -13
  32. infrahub_sdk/ctl/object.py +55 -5
  33. infrahub_sdk/ctl/utils.py +22 -1
  34. infrahub_sdk/exceptions.py +19 -1
  35. infrahub_sdk/node.py +42 -26
  36. infrahub_sdk/protocols_generator/__init__.py +0 -0
  37. infrahub_sdk/protocols_generator/constants.py +28 -0
  38. infrahub_sdk/{code_generator.py → protocols_generator/generator.py} +47 -34
  39. infrahub_sdk/protocols_generator/template.j2 +114 -0
  40. infrahub_sdk/schema/__init__.py +110 -74
  41. infrahub_sdk/schema/main.py +36 -2
  42. infrahub_sdk/schema/repository.py +2 -0
  43. infrahub_sdk/spec/menu.py +3 -3
  44. infrahub_sdk/spec/object.py +522 -41
  45. infrahub_sdk/testing/docker.py +4 -5
  46. infrahub_sdk/testing/schemas/animal.py +7 -0
  47. infrahub_sdk/yaml.py +63 -7
  48. {infrahub_server-1.2.5.dist-info → infrahub_server-1.2.7.dist-info}/METADATA +1 -1
  49. {infrahub_server-1.2.5.dist-info → infrahub_server-1.2.7.dist-info}/RECORD +56 -39
  50. infrahub_testcontainers/container.py +52 -2
  51. infrahub_testcontainers/docker-compose.test.yml +27 -0
  52. infrahub_testcontainers/performance_test.py +1 -1
  53. infrahub_testcontainers/plugin.py +1 -1
  54. infrahub_sdk/ctl/constants.py +0 -115
  55. {infrahub_server-1.2.5.dist-info → infrahub_server-1.2.7.dist-info}/LICENSE.txt +0 -0
  56. {infrahub_server-1.2.5.dist-info → infrahub_server-1.2.7.dist-info}/WHEEL +0 -0
  57. {infrahub_server-1.2.5.dist-info → infrahub_server-1.2.7.dist-info}/entry_points.txt +0 -0
infrahub_sdk/yaml.py CHANGED
@@ -7,6 +7,7 @@ from typing import Any
7
7
  import yaml
8
8
  from pydantic import BaseModel, Field
9
9
  from typing_extensions import Self
10
+ from yaml.parser import ParserError
10
11
 
11
12
  from .exceptions import FileNotValidError
12
13
  from .utils import find_files, read_file
@@ -25,12 +26,14 @@ class InfrahubFileData(BaseModel):
25
26
  api_version: InfrahubFileApiVersion = Field(InfrahubFileApiVersion.V1, alias="apiVersion")
26
27
  kind: InfrahubFileKind
27
28
  spec: dict
28
- metadata: dict | None = Field(default_factory=dict)
29
+ metadata: dict = Field(default_factory=dict)
29
30
 
30
31
 
31
32
  class LocalFile(BaseModel):
32
33
  identifier: str | None = None
33
34
  location: Path
35
+ multiple_documents: bool = False
36
+ document_position: int | None = None
34
37
  content: dict | None = None
35
38
  valid: bool = True
36
39
  error_message: str | None = None
@@ -57,20 +60,73 @@ class YamlFile(LocalFile):
57
60
  def validate_content(self) -> None:
58
61
  pass
59
62
 
63
+ @classmethod
64
+ def init(cls, location: Path, multiple_documents: bool, content: dict | None) -> Self:
65
+ if not content:
66
+ return cls._file_is_empty(path=location, has_multiple_document=multiple_documents)
67
+
68
+ return cls(location=location, multiple_documents=multiple_documents, content=content)
69
+
70
+ @classmethod
71
+ def _file_is_empty(cls, path: Path, has_multiple_document: bool) -> Self:
72
+ return cls(
73
+ location=path, multiple_documents=has_multiple_document, error_message="Invalid YAML/JSON file", valid=False
74
+ )
75
+
76
+ @classmethod
77
+ def _file_is_invalid(cls, path: Path, has_multiple_document: bool) -> Self:
78
+ return cls(
79
+ location=path,
80
+ multiple_documents=has_multiple_document,
81
+ error_message="Invalid YAML/JSON file",
82
+ valid=False,
83
+ )
84
+
85
+ @classmethod
86
+ def load_file_from_disk(cls, path: Path) -> list[Self]:
87
+ yaml_files: list[Self] = []
88
+
89
+ try:
90
+ file_content = read_file(path)
91
+
92
+ has_multiple_document = bool(file_content.count("---") > 1)
93
+
94
+ if has_multiple_document:
95
+ for content in yaml.safe_load_all(file_content):
96
+ yaml_files.append(
97
+ cls.init(location=path, multiple_documents=has_multiple_document, content=content)
98
+ )
99
+
100
+ else:
101
+ yaml_files.append(
102
+ cls.init(
103
+ location=path, multiple_documents=has_multiple_document, content=yaml.safe_load(file_content)
104
+ )
105
+ )
106
+
107
+ except FileNotValidError as exc:
108
+ yaml_files.append(
109
+ cls(location=path, multiple_documents=has_multiple_document, error_message=exc.message, valid=False)
110
+ )
111
+ except (yaml.YAMLError, ParserError):
112
+ yaml_files.append(cls._file_is_invalid(path, has_multiple_document))
113
+
114
+ if has_multiple_document:
115
+ for idx, file in enumerate(yaml_files):
116
+ file.document_position = idx + 1
117
+
118
+ return yaml_files
119
+
60
120
  @classmethod
61
121
  def load_from_disk(cls, paths: list[Path]) -> list[Self]:
62
122
  yaml_files: list[Self] = []
63
123
  for file_path in paths:
64
124
  if file_path.is_file():
65
- yaml_file = cls(location=file_path)
66
- yaml_file.load_content()
67
- yaml_files.append(yaml_file)
125
+ yaml_files.extend(cls.load_file_from_disk(path=file_path))
68
126
  elif file_path.is_dir():
69
127
  files = find_files(extension=["yaml", "yml", "json"], directory=file_path)
70
128
  for item in files:
71
- yaml_file = cls(location=item)
72
- yaml_file.load_content()
73
- yaml_files.append(yaml_file)
129
+ yaml_files.extend(cls.load_file_from_disk(path=item))
74
130
  else:
75
131
  raise FileNotValidError(name=str(file_path), message=f"{file_path} does not exist!")
76
132
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: infrahub-server
3
- Version: 1.2.5
3
+ Version: 1.2.7
4
4
  Summary: Infrahub is taking a new approach to Infrastructure Management by providing a new generation of datastore to organize and control all the data that defines how an infrastructure should run.
5
5
  Home-page: https://opsmill.com
6
6
  License: AGPL-3.0-only
@@ -27,9 +27,10 @@ infrahub/auth.py,sha256=g4pQX4kI1k-iWIQNduXODhpeZXIjY3XqLslh7QFRBq4,9194
27
27
  infrahub/cli/__init__.py,sha256=zQjE9zMrwAmk_4qb5mbUgNi06g3HKvrPwQvJLQmv9JY,1814
28
28
  infrahub/cli/constants.py,sha256=CoCeTMnfsA3j7ArdLKLZK4VPxOM7ls17qpxGJmND0m8,129
29
29
  infrahub/cli/context.py,sha256=20CJj_D1VhigR9uhTDPHiVHnV7vzsgK8v-uLKs06kzA,398
30
- infrahub/cli/db.py,sha256=14ptdk1mvsa5WdatEY5NTqOETHyIWV1GLvUow2ob0dE,27851
30
+ infrahub/cli/db.py,sha256=W0_46WSljyO_-Df73ochDz-ZKdN8uwqypRuRi_4SSDc,27919
31
31
  infrahub/cli/events.py,sha256=nJmowQgTxRs6qaT41A71Ei9jm6qtYaL2amAT5TA1H_k,1726
32
32
  infrahub/cli/git_agent.py,sha256=ajT9-kdd3xLIysOPe8GqZyCDMkpNyhqfWjBg9HPWVcg,5240
33
+ infrahub/cli/patch.py,sha256=ztOkWyo0l_Wo0WX10bvSqGZibKzowrwx82oi69cjwkY,6018
33
34
  infrahub/cli/server.py,sha256=zeKgJE9V0usSMVBwye0sRNNh6Ctj-nSZHqHbNskqyz4,2248
34
35
  infrahub/cli/tasks.py,sha256=uVtMuUbcXwb6H3hnunUl9JJh99XShpWn2pwryVrR7hg,1952
35
36
  infrahub/cli/upgrade.py,sha256=GQWzga8AFTvfS_VY6s1Nmf_J1UJb533IUVQiF_FC9r0,5031
@@ -37,8 +38,8 @@ infrahub/components.py,sha256=lSLDCDwIZoakZ2iBrfHi9c3BxzugMiuiZO6V7Egt6tk,107
37
38
  infrahub/computed_attribute/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
39
  infrahub/computed_attribute/constants.py,sha256=oTMPEfRuf2mcfCkBpRLWRALO6nsLHpFm9jJGu0lowS4,446
39
40
  infrahub/computed_attribute/gather.py,sha256=TSv6_CWZH1DYRv430jzyJpFJWKzwPGka5wFiL1jJ9rM,8096
40
- infrahub/computed_attribute/models.py,sha256=-jS47FBYfbZptd0knzSm_m4GFFnQGMC09QNey1MQt04,12804
41
- infrahub/computed_attribute/tasks.py,sha256=2MYjXHOTyn3geFPXszvJ8MChlawlGDZ030L9bcMGuGg,17350
41
+ infrahub/computed_attribute/models.py,sha256=xAzLfZ8teEiJrfa8JOc3EAjikOMakj0LCvWmwGh9miQ,16789
42
+ infrahub/computed_attribute/tasks.py,sha256=IwsBqTS5rgCNgPzCLw6X7m9SZAJRCfiE06ZpObJGXmE,16775
42
43
  infrahub/computed_attribute/triggers.py,sha256=ve1cUj0CZ7dU1VtZkxET9LD8StszKIL9mCkTZpCeUaI,2304
43
44
  infrahub/config.py,sha256=J3R-k2I5WHNAHZaCJWRFSNOhCn_T4Is1E8WeQqDaPYI,35222
44
45
  infrahub/context.py,sha256=8SZRKSECkkcsNNzDaKEUJ7Nyr0EzUfToAy969LXjQVk,1554
@@ -130,7 +131,7 @@ infrahub/core/ipam/reconciler.py,sha256=48do6rx12G25gaKuOguSrVdUDXVpMr3t6ogU1hdP
130
131
  infrahub/core/ipam/size.py,sha256=Iu7cVvN9MkilyG_AGvYm3g3dSDesKRVdDh_AKH7yAqk,614
131
132
  infrahub/core/ipam/tasks.py,sha256=TUoP6WZjQkd7DdGLxKnBVVH4SxTHkH2xmJCU8nRWqH8,1483
132
133
  infrahub/core/ipam/utilization.py,sha256=d-zpXCaWsHgJxBLopCDd7y4sJYvHcIzzpYhbTMIgH74,6733
133
- infrahub/core/manager.py,sha256=nE5IL3Hk1ro_4seIbofEdIer3kbVVBtdvmVTbQFAyek,46169
134
+ infrahub/core/manager.py,sha256=v-Owvn60w85TIHrAtt5C9OF5vGdpf88ElTMDMGVacxE,46671
134
135
  infrahub/core/merge.py,sha256=bZvToLKyphJlWMbQAzGuSHcrG2DfeqL69KSfqb1wWdc,10430
135
136
  infrahub/core/migrations/__init__.py,sha256=syPb3-Irf11dXCHgbT0UdmTnEBbpf4wXJ3m8ADYXDpk,1175
136
137
  infrahub/core/migrations/graph/__init__.py,sha256=CB4j35V5VRpJxnSJN_HOYzUv_cPMVCHwpFGYjWjhoaA,2608
@@ -178,7 +179,7 @@ infrahub/core/migrations/schema/placeholder_dummy.py,sha256=3T3dBwC_ZyehOJr2KRKF
178
179
  infrahub/core/migrations/schema/tasks.py,sha256=x6c_5N0pcQ_lTH5Vaqg2_MwlQ08I35BdX-8NhRDozBE,4165
179
180
  infrahub/core/migrations/shared.py,sha256=e7HEBijWhG46UN8ODjSmxvGeK8KAQ3Twnj2q1dvb2m0,6983
180
181
  infrahub/core/models.py,sha256=43iDtUwlsJ5G_F8IP4XoxLeoilfgjudhN3ZfS7esyh8,24840
181
- infrahub/core/node/__init__.py,sha256=MahMw4Bs4KQCqWTPVoOvSd7K0rP_Ez7JVy57ZHR65xs,36755
182
+ infrahub/core/node/__init__.py,sha256=y9-9QIenn6MtY7MdOMz72hUSWueAx6KJ6507pelgeyw,36770
182
183
  infrahub/core/node/base.py,sha256=5HfcA2d3GPjEDqJAEHGF_eHh6RV3-QlNpAsTr499ZmI,2578
183
184
  infrahub/core/node/constraints/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
184
185
  infrahub/core/node/constraints/attribute_uniqueness.py,sha256=9MThTmuqZ7RgK71ZZARlw1k1x3ARn1U67g2_Gatd6rE,2099
@@ -201,7 +202,7 @@ infrahub/core/query/attribute.py,sha256=DzwbElgTaZs6-nBYGmnDpBr9n0lmUPK3p7eyI30S
201
202
  infrahub/core/query/branch.py,sha256=5U0YRAcJUnWYwJWRJVhUG0_VRa18_NtDhp02VLKotM0,4641
202
203
  infrahub/core/query/delete.py,sha256=_PL97nz-ybF0JqDSYlTPhIa4oCxwPiFerwd8Wjw-x-8,1918
203
204
  infrahub/core/query/diff.py,sha256=-hMyXsKfsBmxmSnboF-hN8IYa0aTPXJRUocMtOyyRs4,31987
204
- infrahub/core/query/ipam.py,sha256=zLdgSPiLq23aWZRRjGrS1dWVhoUgrTnqWTwH-9H5wrM,28188
205
+ infrahub/core/query/ipam.py,sha256=66snB2ANAUcGk-Ke88Y1CIoXO7CCBOsOx8JZTFXnPfA,28384
205
206
  infrahub/core/query/node.py,sha256=-gpEaJHND7MjpNT33EkMArEDoVGkienMa4E5QJT6Hgg,61784
206
207
  infrahub/core/query/relationship.py,sha256=b6_kfwzttfVHJ0_Ej3dRUg62cWs3wwZvp-YLlSubnQE,42567
207
208
  infrahub/core/query/resource_manager.py,sha256=rVksmyFSTGwiq0ZFp2I8kGuMI_F2__c9wE7LgYYeqow,12728
@@ -210,7 +211,7 @@ infrahub/core/query/subquery.py,sha256=40MEDGSFPeXG6M4DpwfQfJMVqB_ET6WTMwhgueKV-
210
211
  infrahub/core/query/task.py,sha256=tLgn8S_KaLYLuOB66D1YM155teHZIHNThkt2iUiKKD4,3137
211
212
  infrahub/core/query/task_log.py,sha256=2RdthOAQrmpKZU8uhV_dJCPqwdsSA_1CYSKpL_eZ_yk,1120
212
213
  infrahub/core/query/utils.py,sha256=t9LMvZWdmi10c3E0HAU_5m7x5zMHhYXsUjX7ZBl2RpU,1091
213
- infrahub/core/registry.py,sha256=LJfLiqw1fUrPWTI8k-hL0KYTLnK2nBCkKJYX5PZtduY,8570
214
+ infrahub/core/registry.py,sha256=eSDFD8gbE1rasYIuLQDWlTKO06HVfuDsuEdT9uqn-6U,8560
214
215
  infrahub/core/relationship/__init__.py,sha256=broUBD0iwpSSGKJbUdG66uau67TQ_DRhqT_PFhuk1ag,154
215
216
  infrahub/core/relationship/constraints/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
216
217
  infrahub/core/relationship/constraints/count.py,sha256=4wSjiJtRd4fQ5qYNzGyWrt1WLV7x5Go2ZatMTtK79QQ,4157
@@ -261,7 +262,7 @@ infrahub/core/schema/manager.py,sha256=4lPjjtE_MtJ0acJdYAJEkuK4jap3NnTdxB5esEB71
261
262
  infrahub/core/schema/node_schema.py,sha256=ld_Wrqf-RsoEUVz_lKE0tcSf5n_oYZYtRI0lTqtd63o,6150
262
263
  infrahub/core/schema/profile_schema.py,sha256=cOPSOt5KLgQ0nbqrAN_o33hY_pUtrKmiwSbY_YpVolI,1092
263
264
  infrahub/core/schema/relationship_schema.py,sha256=lVbyQKMP2jPZZwZGK6DBvXdXfEQEsQGMbZ2WYxOZKTw,8261
264
- infrahub/core/schema/schema_branch.py,sha256=WcQlPi_UWspPMZ801b4biZcX8iOBSdEJEckIW_TiH9Y,97799
265
+ infrahub/core/schema/schema_branch.py,sha256=9ut8iS4nUCjY81lJiX0VVTNWEA4K6bfS4yWpQe9NSTA,97723
265
266
  infrahub/core/schema/schema_branch_computed.py,sha256=14UUsQJDLMHkYhg7QMqeLiTF3PO8c8rGa90ul3F2ZZo,10629
266
267
  infrahub/core/schema/template_schema.py,sha256=O-PBS9IRM4JX6PxeoyZKwqZ0u0SdQ2zxWMc01PJ2_EA,1084
267
268
  infrahub/core/task/__init__.py,sha256=Ied1NvKGJUDmff27z_-yWW8ArenHxGvSvQTaQyx1iHs,128
@@ -305,7 +306,7 @@ infrahub/core/validators/uniqueness/checker.py,sha256=RpiLpIjbdkwwjivry-vjEkVim6
305
306
  infrahub/core/validators/uniqueness/index.py,sha256=Jw1o-UVinQquNduZ5vCCzt8GUfIEdVzBo-1XyRti8F8,5068
306
307
  infrahub/core/validators/uniqueness/model.py,sha256=V2aejcuHPhgC5nTrS7xX0JFMzprVu90QAau-rUzruCY,5135
307
308
  infrahub/core/validators/uniqueness/query.py,sha256=em_DKmzv0kiKl6VhD9G4-LkrtuQj4mTxT5kc5ZgFv7M,10150
308
- infrahub/database/__init__.py,sha256=m8Rkw7byTaz6eoYp3N9QlyJIxHQW8x2KXfn16sSAgwI,20982
309
+ infrahub/database/__init__.py,sha256=CQek6w4hoihLP9ClNya_QZ-UquXZTf9F3iNKPNpZBUw,21095
309
310
  infrahub/database/constants.py,sha256=WmV1iuOk4xulxZHOVvO3sS_VF1eTf7fKh0TPe_RnfV4,507
310
311
  infrahub/database/index.py,sha256=y0sWXO3tdIr1wL1XC9O6iNRV-Elu2KAXFOiYXRIIhN4,1659
311
312
  infrahub/database/manager.py,sha256=BDXNw1RNBeSFV-EZd0aGFbPNuoqlKwrkDqmYB7sy4tU,317
@@ -422,7 +423,7 @@ infrahub/graphql/loaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
422
423
  infrahub/graphql/loaders/node.py,sha256=ciATamtiU1-yHrvqnScjYlLRJJX2lyxlaDZVIXlL-7E,2604
423
424
  infrahub/graphql/loaders/peers.py,sha256=fOdgaaPBtBiiLKg8Rws4zXvpyCzUhszgxhDAeXkzETA,2785
424
425
  infrahub/graphql/loaders/shared.py,sha256=hUxLy8iVgfpEZiUMKNkUAeshPKKzEVSDMDsuaBbjJW4,389
425
- infrahub/graphql/manager.py,sha256=3LKW3LRJE6ne7BiTFNHufw_4q0loB_esHrNMu4q1nH8,44777
426
+ infrahub/graphql/manager.py,sha256=1q3HcaIcg82-t7dq0M3uIAihmVka-7w2KKsols5UMww,45222
426
427
  infrahub/graphql/metrics.py,sha256=viq_M57mDYd4DDK7suUttf1FJTgzQ3U50yOuSw_Nd-s,2267
427
428
  infrahub/graphql/models.py,sha256=7kr3DSO_rujPocMIfPyZ5Hwy3Mpnu4ySDMAIE9G5Y7Y,147
428
429
  infrahub/graphql/mutations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -436,7 +437,7 @@ infrahub/graphql/mutations/diff_conflict.py,sha256=JngQfyKXCVlmtlqQ_VyabmrOEDOEK
436
437
  infrahub/graphql/mutations/generator.py,sha256=Ulw4whZm8Gc8lJjwfUFoFSsR0cOUliFKl87Oca4B9O0,3579
437
438
  infrahub/graphql/mutations/graphql_query.py,sha256=mp_O2byChneCihUrEAFEiIAgJ1gW9WrgtwPetUQmkJw,3562
438
439
  infrahub/graphql/mutations/ipam.py,sha256=wIN8OcTNCHVy32YgatWZi2Of-snFYBd4wlxOAJvE-AY,15961
439
- infrahub/graphql/mutations/main.py,sha256=QpB_iV4VFWYkUpk5tcSe0eFJXAn1YcwFruzNjyccvUY,26618
440
+ infrahub/graphql/mutations/main.py,sha256=EgO0U8U0FmgwuTrDrKuafSOWjO7pNR5YZzYYZbQMfec,26611
440
441
  infrahub/graphql/mutations/menu.py,sha256=u2UbOA-TFDRcZRGFkgYTmpGxN2IAUgOvJXd7SnsufyI,3708
441
442
  infrahub/graphql/mutations/models.py,sha256=ilkSLr8OxVO9v3Ra_uDyUTJT9qPOmdPMqQbuWIydJMo,264
442
443
  infrahub/graphql/mutations/node_getter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -447,7 +448,7 @@ infrahub/graphql/mutations/node_getter/interface.py,sha256=3MVTz_3EQnI7REp-ytQvg
447
448
  infrahub/graphql/mutations/proposed_change.py,sha256=TyZF3adwbB517iVoOL5HC8ifGxddlcUciHxqJ9k55T0,10117
448
449
  infrahub/graphql/mutations/relationship.py,sha256=b-zi8O0JZo52zVoGabIrWvIFh64PbhHzjF9klZ7p8ac,20139
449
450
  infrahub/graphql/mutations/repository.py,sha256=Whrt1uYWt7Ro6omJYN8zc3D-poZ6bOBrpBHIG4odAmo,11316
450
- infrahub/graphql/mutations/resource_manager.py,sha256=782N1iwAgtTpl0I-Y-ou16u_ModhccJ3F28tap-uD1E,8874
451
+ infrahub/graphql/mutations/resource_manager.py,sha256=Nykdo4pIJ9BOossg24-dw_nU71qelYki896NIJk5O5I,8924
451
452
  infrahub/graphql/mutations/schema.py,sha256=vOwP8SIcQxamhP_JwbeXPG5iOEwxHhHawgqU6bD-4us,12897
452
453
  infrahub/graphql/mutations/tasks.py,sha256=j2t5pMXRQ1i3ohQ-WjfDaDNQpj-CnFnqYCTZ3y5p7ec,3806
453
454
  infrahub/graphql/mutations/webhook.py,sha256=IW_WPpBRySd-mpbkuGnR28VpU9naM2bLZBjJOaAGuH4,4777
@@ -537,6 +538,20 @@ infrahub/message_bus/operations/send/echo.py,sha256=m2z_ij7Bucl8u1E1rLAfL3fsrhKZ
537
538
  infrahub/message_bus/types.py,sha256=suudCrwuYXqoRVN6J9dbshRtK22BPxk0cdaCG8QKaxM,4258
538
539
  infrahub/middleware.py,sha256=g6lPpXewWNcLjyzRsr7FjdTIbdc5H2HitGQX-L7itgI,657
539
540
  infrahub/models.py,sha256=QmwJwo3hNCta8BXM7eLsD9qv1S73Rj0cC_crLpadHTc,715
541
+ infrahub/patch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
542
+ infrahub/patch/constants.py,sha256=dhJ9XGujYq_t3RL6PC3wvP47UPvf3MvMPrU-hISOv1U,479
543
+ infrahub/patch/edge_adder.py,sha256=zBy_y3K7oBFxtmtzaKXczwvFMjaRRzfemyvmKcp-B6w,2723
544
+ infrahub/patch/edge_deleter.py,sha256=sks0Pyec-ItAI5QT2MDL0PQN7g0iYWj6z8IxMnfd1r8,1286
545
+ infrahub/patch/edge_updater.py,sha256=SJ1bbVT6S_vKhtkIpwPBOWgheLbT3KYIjZhumIpneZs,1104
546
+ infrahub/patch/models.py,sha256=F7RC0WF2GjaLNVwqJNik3k8NSgV-ai0d6vHJ3qIdmMM,2952
547
+ infrahub/patch/plan_reader.py,sha256=uqHNYVBBkpmVIGwaxl2tlMNJd2tPVedNZoSmFSjTdow,5460
548
+ infrahub/patch/plan_writer.py,sha256=x2u5Oe3ME3zXTdkz5hRnvp2EaQwt-r4LyuSATc2LkKs,4822
549
+ infrahub/patch/queries/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
550
+ infrahub/patch/queries/base.py,sha256=wXtv4I-7l_u0kXJFbmFZZJ0_2_5yvuAJwmwiLqRq7AY,338
551
+ infrahub/patch/runner.py,sha256=ZB4aOqlG77hJNtDyQtIXmi-2WgM07WSEFtWV2NItIqk,12594
552
+ infrahub/patch/vertex_adder.py,sha256=lhWELYWlHwkopGOECSHRfj1mb0-COheibsu95r2Hwzs,2796
553
+ infrahub/patch/vertex_deleter.py,sha256=czdb8T30k_-WSbcZUVS2-DvaN3Dp4j9ss2lAz8KN0mo,1302
554
+ infrahub/patch/vertex_updater.py,sha256=FxQJEnwXdvj2WtwLorRbRAyocWUG9z_RDowflVKqPoU,1136
540
555
  infrahub/permissions/__init__.py,sha256=WAtFhyaQj8dFkZJGnIbBaVbSMttGZGgK18V-QbMNVNU,538
541
556
  infrahub/permissions/backend.py,sha256=azvyFOTne0Zy1yrc4t9u3GCkHI_x_OPSDV65yxmVPDQ,529
542
557
  infrahub/permissions/constants.py,sha256=2sGj9caif_aH2XtD3s35BU4HRONOjRHCyCJ3gbT5kZs,1221
@@ -595,7 +610,7 @@ infrahub/tasks/check.py,sha256=WEdktFP1XzahHtF6N782OnNFzkg5uX3KIeNFRy3NEUM,730
595
610
  infrahub/tasks/dummy.py,sha256=6SxlQqQXZqgTuwLaAsK-p1O1TYNKfdGmUYjNJFNHe9s,1209
596
611
  infrahub/tasks/keepalive.py,sha256=D6yh3Vmlr1WCEpZibk2YLc2n0dCcX6tM62HCSxyGEu8,783
597
612
  infrahub/tasks/recurring.py,sha256=RJO2zdzCU-38Kb81lmCUbFQOBhGui8qn2QizTV4vj9I,447
598
- infrahub/tasks/registry.py,sha256=wox2lo8JoW8abirN0LFF3Qeerspthviq8yFVe-LDu2g,3017
613
+ infrahub/tasks/registry.py,sha256=o1ybJvkNOSpFBvqem6wkOrtxqm6nqnbDA7JcptP-aC8,3169
599
614
  infrahub/telemetry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
600
615
  infrahub/telemetry/constants.py,sha256=_5mJAZaT_wTCaF7Yzsd---Zn1N6GZkoP_954GK8K4-c,184
601
616
  infrahub/telemetry/database.py,sha256=0yqrfotO3lF-ij15v-tG1nxtoUJppXzHaKubN0Jw9CQ,3097
@@ -641,9 +656,8 @@ infrahub_sdk/analyzer.py,sha256=UDJN372vdAiuAv2TEyPUlsSVoUfZN6obWkIokNNaHbA,4148
641
656
  infrahub_sdk/async_typer.py,sha256=Gj7E8EGdjA-XF404vr9cBt20mmbroQh7N68HXhWYx00,892
642
657
  infrahub_sdk/batch.py,sha256=LRZ_04ic56ll9FBjgXCYrJRDJcwB3wR1yX4grrQutDQ,3795
643
658
  infrahub_sdk/branch.py,sha256=hmtoIekQ1uusoJ6yEKlw6vrFMTAHJrXu-YsqqCQC_kc,12716
644
- infrahub_sdk/checks.py,sha256=AmlCim-9Mbhpye_yYAaV_NM-pFL4_JvQGEVM3cJsaqY,5700
659
+ infrahub_sdk/checks.py,sha256=rFHlEY8XEYcjpLCg6gd9a0R8vPnkxNp0OnXk-odsZKY,5707
645
660
  infrahub_sdk/client.py,sha256=j3ZiAB_8UN-kDd7CGMUSbFWFcdPrYGwkZmJBbvi4o1U,100721
646
- infrahub_sdk/code_generator.py,sha256=UJoqofjO7WSHygORhok0RRUv7HG4aTcl6htczaKNBjc,4411
647
661
  infrahub_sdk/config.py,sha256=irv7a1YRBGA8L9eMak6J7GG9dzG3sOQeKsyEOkJHw-s,7302
648
662
  infrahub_sdk/constants.py,sha256=Ca66r09eDzpmMhfFAspKFSehSxOmoflVongP-UuBDc4,138
649
663
  infrahub_sdk/context.py,sha256=QgXZvtUrKolp6ML8TguVK87Wuu-3KyizZVV_N2F4oCw,400
@@ -651,35 +665,38 @@ infrahub_sdk/ctl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
651
665
  infrahub_sdk/ctl/branch.py,sha256=GeGDNGNpew93MZblqhG0r45wqSz_p8CcQ9R8zuj_jmg,4742
652
666
  infrahub_sdk/ctl/check.py,sha256=HWsK1rTpGF2VvRBiS5KZrRxXrsAHDXoFS3wJkmq8pik,7895
653
667
  infrahub_sdk/ctl/cli.py,sha256=A9jJKYBo5opzIIyWYf6niyAHhy49V59g6biueMDFbpE,328
654
- infrahub_sdk/ctl/cli_commands.py,sha256=Im0_rVWjU8kWlhkBrwUvphVONEfQWIQVZEPsLRbVmSY,18395
668
+ infrahub_sdk/ctl/cli_commands.py,sha256=2ucEJjPFWlLTD89d3A-u0yVt0_qEuoVmXLLTE6PnrYw,18397
655
669
  infrahub_sdk/ctl/client.py,sha256=6bmXmQta9qQCJ8HybQwt2uSF2X1Em91xNFpwiKFujxs,2083
656
670
  infrahub_sdk/ctl/config.py,sha256=y3kTvfxDO2FKzgvaIXKPKOES7BqXT-s9Kuww7ROfs-4,3039
657
- infrahub_sdk/ctl/constants.py,sha256=owzqZB_xkTzxsYvX3NyuSwATzA0rIABmbKiWzuqz3aw,3229
658
671
  infrahub_sdk/ctl/exceptions.py,sha256=RPdBtIj5qVvNqNR9Y-mPNF7kDUxXUUCac5msyitrBXo,272
659
672
  infrahub_sdk/ctl/exporter.py,sha256=CmqyKpf7q5Pu5Wfo_2HktiF12iD_3rJ9Ifb48BIoJdU,1876
660
673
  infrahub_sdk/ctl/generator.py,sha256=sj_QcuUIy0Sd3jKXAP5Y-DZ6iuwWGwacegjYiCx0CPg,4166
661
674
  infrahub_sdk/ctl/importer.py,sha256=0QSKzkynI4eeQHHsTIWlEaj7mPrTdscQeXrrOzqtyig,1908
662
- infrahub_sdk/ctl/menu.py,sha256=Kb2F8nLYw29X9ypV-Ku8jonGTmMFOq2tAD_fnGk_k2U,1463
663
- infrahub_sdk/ctl/object.py,sha256=s76ziUqVqSG1fKcdtldSlREpi-aq0IUgSBvnX9L2xw8,1282
675
+ infrahub_sdk/ctl/menu.py,sha256=A0NHvu48qbo9aWYNc3nGMNMeXr4LnOr_HNKL5arBWNA,2690
676
+ infrahub_sdk/ctl/object.py,sha256=OEbAx0Yb0zbXxS2ZnXedZRZDHITQd3iAk_cWUlTHLvg,2706
664
677
  infrahub_sdk/ctl/parameters.py,sha256=aU2H41svfG309m2WdH6R9H5xgQ4gevn3ItOu5ltuVas,413
665
678
  infrahub_sdk/ctl/render.py,sha256=zrIz_KXq3QafgNiqqNeYt2JtD2PGOa0D5ujW6NqZdz8,1948
666
679
  infrahub_sdk/ctl/repository.py,sha256=JUyrV_oOayP1SHOb7Y35eZI_pwjtH69iH6lh8TsnmRs,4900
667
680
  infrahub_sdk/ctl/schema.py,sha256=791JU9ZylqeXQTy7xBMN_4WKnVQgbStvFvEZ8nAkOY8,7056
668
681
  infrahub_sdk/ctl/transform.py,sha256=5qRqiKeEefs0rda6RAFAAj1jkCKdbPYE_t8O-n436LQ,414
669
- infrahub_sdk/ctl/utils.py,sha256=YBprv8BFCBxbttQ8Dt82B7Qh7aUeJfs5DEfxPtatwYU,6440
682
+ infrahub_sdk/ctl/utils.py,sha256=p40VlEcVrMiFLcB9S5tMV8F0vpf1Ay6LkCeOLXhXQ04,7314
670
683
  infrahub_sdk/ctl/validate.py,sha256=dknc4kMBIdysZNtEBYyvhlFPyUYyLmc2a4OI4cjGj2c,3910
671
684
  infrahub_sdk/data.py,sha256=4d8Fd1s7lTeOu8JWXsK2m2BM8t_5HG0Z73fnCZGc7Pc,841
672
685
  infrahub_sdk/diff.py,sha256=Ms-3YyXo-DoF1feV9qP7GKakBYUNFsULZdy-yMEG71w,4258
673
- infrahub_sdk/exceptions.py,sha256=MX8zsxJUYD0vSiArG2sHWveWNAUoJfkN-R2ehtGmeQs,5052
686
+ infrahub_sdk/exceptions.py,sha256=gZLfZhyDd0M-w5WMzzfPkFwha-aZirJ739N_OMN7Ujs,5728
674
687
  infrahub_sdk/generator.py,sha256=9Je9mCfS6madP2WMD6gp9l8IkWhW_eIl5elnt9h7rvc,5592
675
688
  infrahub_sdk/graphql.py,sha256=zrxRveg8-t0FbLtOEMDiiW0vqtBHc2qaFRkiHF9Bp6g,7019
676
689
  infrahub_sdk/groups.py,sha256=GL14ByW4GHrkqOLJ-_vGhu6bkYDxljqPtkErcQVehv0,711
677
690
  infrahub_sdk/jinja2.py,sha256=lTfV9E_P5gApaX6RW9M8U8oixQi-0H3U8wcs8fdGVaU,1150
678
- infrahub_sdk/node.py,sha256=isR3SVSFLfb_c524fGTgaPo0E_ac08P-8MJPOsu7CrM,91151
691
+ infrahub_sdk/node.py,sha256=XLkm3Fe39URXc_pigmJcb7JAWTgZoNrKTP7zMuwjfhw,91966
679
692
  infrahub_sdk/object_store.py,sha256=d-EDnxPpw_7BsbjbGbH50rjt-1-Ojj2zNrhFansP5hA,4299
680
693
  infrahub_sdk/playback.py,sha256=ubkY1LiW_wFwm4auerdQ0zFJcFJZ1SYQT6-d4bxzaLg,1906
681
694
  infrahub_sdk/protocols.py,sha256=LyiZcUvcT-ibgWYyYELjAPyAv42kxdhAPyFfac-RIZo,21569
682
695
  infrahub_sdk/protocols_base.py,sha256=J7eW8LO0MO19BiMPvYmyhSs6Es14Xk1xUolb0vWaFjo,4889
696
+ infrahub_sdk/protocols_generator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
697
+ infrahub_sdk/protocols_generator/constants.py,sha256=wEqe9XGe1mTYBXSmJ8rjQs82dQ4jM50qb8uS2ZGcriI,791
698
+ infrahub_sdk/protocols_generator/generator.py,sha256=hhBxxMw0Pgbih6GiC81xjb9R9TBT8I4y-O2cIdcbChs,5264
699
+ infrahub_sdk/protocols_generator/template.j2,sha256=cm2wsKXHXOiW7N_byxnE2vLnn8gHQ99rs56qVquTTDw,3722
683
700
  infrahub_sdk/pytest_plugin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
684
701
  infrahub_sdk/pytest_plugin/exceptions.py,sha256=ek2WyTBPuZdxhJClOhLo4EcFdvgE4BP0q26OiAr-Sec,2185
685
702
  infrahub_sdk/pytest_plugin/items/__init__.py,sha256=Au90dLk6lbSgRAoqrZOdYJ6m0lwFJYHFiAQHrcc6_rI,1026
@@ -696,12 +713,12 @@ infrahub_sdk/queries.py,sha256=s4gnx67e-MNg-3jP4Vx1jreO9uiW3uYPllFQgaTODdQ,2308
696
713
  infrahub_sdk/query_groups.py,sha256=vcN67jWvDcVacXbgITOMt-UI_6T5eGrG4WJfb8LqUi4,10069
697
714
  infrahub_sdk/recorder.py,sha256=G134AfAwE5efSqArVJneurF2JIEuhvSJWWI3woPczgI,2194
698
715
  infrahub_sdk/repository.py,sha256=PbSHHl6ajIeZu1t4pH1j7qzR-DPOkGuzubcNM02NuV0,1011
699
- infrahub_sdk/schema/__init__.py,sha256=CKCgXTnnSVgrg1Tjz2oi2PqgkA6WpfjH9xUlfb-HqZc,27943
700
- infrahub_sdk/schema/main.py,sha256=_24hapeJ7mXI_rfN2b9ariwsilQ1W-LVIfk8DXdtjbw,11087
701
- infrahub_sdk/schema/repository.py,sha256=AAITXGprCPb2WptJSRhj9gEbRrW1HHM-yEPYAgsztcU,11299
716
+ infrahub_sdk/schema/__init__.py,sha256=26pGrfI5fiz5nq9uYxNYuTGWw6zYJCGuWaqJhSPsAiQ,28928
717
+ infrahub_sdk/schema/main.py,sha256=KSYYauatsRWI3EbI2lPff51n5dO2uUdcT-BmAo1D24A,12152
718
+ infrahub_sdk/schema/repository.py,sha256=LJYqYRgeow_1oBgPl47yP4nmPzmkJpnr-J0xrh0gFAA,11301
702
719
  infrahub_sdk/spec/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
703
- infrahub_sdk/spec/menu.py,sha256=LvNLuBEkiLTMNgM3kseIzM7wQ_zK_2uXM_anUNu6Pfc,1059
704
- infrahub_sdk/spec/object.py,sha256=H55fctUrQUDbRrRJJQQcXHppVOeMye6ykBoo6lCasDw,5012
720
+ infrahub_sdk/spec/menu.py,sha256=KG8KpDYqlVWsCQXCUlAX7P7Jbw3bB60hlTMRs0cohOk,1078
721
+ infrahub_sdk/spec/object.py,sha256=mip9OUezkA6YHxSFolsZt9eN_CjIxZE9-PGY2H7mKNM,24589
705
722
  infrahub_sdk/store.py,sha256=7AV5_ckBdYBQZMe6Cm5nTLRaRkaaF0hivpd3Ed-MKW4,14083
706
723
  infrahub_sdk/task/__init__.py,sha256=6MTui97_uymZ9BBQGC9xRrT6qpzHc0YxkkKWIdW0FdM,210
707
724
  infrahub_sdk/task/constants.py,sha256=gj0Cx_0RV0G5KAjx9XvUsf4LfEDMjvGqxEg0qL0LknI,126
@@ -713,10 +730,10 @@ infrahub_sdk/template/exceptions.py,sha256=mpO09MUZpEhb8OcYGb9MstyAQ16v2f5WA8MzH
713
730
  infrahub_sdk/template/filters.py,sha256=YfNkeJnbBz6Qvi6VmEjctVVifk2cYZPqswrDAEAKhA8,10179
714
731
  infrahub_sdk/template/models.py,sha256=azSXHtKB7qL7m9Z1ckjC99ezwdkxOd-HK_9Cid8SBnM,176
715
732
  infrahub_sdk/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
716
- infrahub_sdk/testing/docker.py,sha256=O8RUA7ddor7A1eXCppRfXkzz3LAaYY1imFyzXj08TEM,1871
733
+ infrahub_sdk/testing/docker.py,sha256=o9MzPjp0bkS-9sUFX1hFEypnSodxbckqoUgYwYFPjwQ,1808
717
734
  infrahub_sdk/testing/repository.py,sha256=9s4MMaMljbJe97Ua4bJgc64giQ2UMC0bD5qIqYd4YNk,3571
718
735
  infrahub_sdk/testing/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
719
- infrahub_sdk/testing/schemas/animal.py,sha256=_5oOZqT5Rk5CXJi-1ScCLpeG8efHRWqeCxzHFe31mfU,7190
736
+ infrahub_sdk/testing/schemas/animal.py,sha256=a1vydXPttoPvsGbSHY5H89AEoi7AWE2JiCGRBE9LJS8,7403
720
737
  infrahub_sdk/testing/schemas/car_person.py,sha256=1VwgJMJvVggsQyRdSqDjiLrPzysz8cXFSFzSghVSVms,8940
721
738
  infrahub_sdk/timestamp.py,sha256=hRJdqH_4jfaTkXdxQqBGXNErHqvXX-SuoeKpguOCFjk,6101
722
739
  infrahub_sdk/topological_sort.py,sha256=RqIGYxHlqOUHvMSAxbq6658TYLaEIdrFP4wyK3Hva5w,2456
@@ -734,21 +751,21 @@ infrahub_sdk/transforms.py,sha256=5fmoBBKWGhFCu0NLKlSF95GAbbCi2k25zWiWjtsd2dA,25
734
751
  infrahub_sdk/types.py,sha256=UeZ1rDp4eyH12ApTcUD9a1OOtCp3IL1YZUeeZ06qF-I,1726
735
752
  infrahub_sdk/utils.py,sha256=xBl-9yIxeil-7fbNgsAUzZSa178UYjsvLbeLNUHzYj0,12638
736
753
  infrahub_sdk/uuidt.py,sha256=Tz-4nHkJwbi39UT3gaIe2wJeZNAoBqf6tm3sw7LZbXc,2155
737
- infrahub_sdk/yaml.py,sha256=L_sj5ds-0_uKe3aIfZu86kDLq8tffKzle9dcyDUTaEc,2937
754
+ infrahub_sdk/yaml.py,sha256=512OKgxAYPt4QLBFlucUB4GgwKJ09dzgC86pO57YFFw,5018
738
755
  infrahub_testcontainers/__init__.py,sha256=oPpmesGgYBSdKTg1L37FGwYBeao1EHury5SJGul-CT8,216
739
756
  infrahub_testcontainers/constants.py,sha256=mZ4hLvcf4rKk9wC7EId4MQxAY0sk4V99deB04N0J2bg,85
740
- infrahub_testcontainers/container.py,sha256=FUkEVkPwUtYGfjHd6brLkI_3D4-qYmH5BGAOlyJrFU4,10652
741
- infrahub_testcontainers/docker-compose.test.yml,sha256=MqN8TPIAWNOZg93m_P2HH5etyYvtgYmwR92SyHR_GDQ,7017
757
+ infrahub_testcontainers/container.py,sha256=HMWCwQpXgNnUYhGDNr1yEdfAO-t-TDzG2RgkZ1ye4tc,12257
758
+ infrahub_testcontainers/docker-compose.test.yml,sha256=6zAf4sVr3cAfMtZgvKv8SX8uD9FolTsNFlhSfzs8eI0,8229
742
759
  infrahub_testcontainers/haproxy.cfg,sha256=QUkG2Xu-hKoknPOeYKAkBT_xJH6U9CfIS0DTMFZJsnk,1305
743
760
  infrahub_testcontainers/helpers.py,sha256=zsvBOql5qM2OX1ybPcklqF-nzWYHkZI3Gk3KZhxWOtU,3578
744
761
  infrahub_testcontainers/host.py,sha256=Z4_gGoGKKeM_HGVS7SdYL1FTNGyLBk8wzicdSKHpfmM,1486
745
762
  infrahub_testcontainers/measurements.py,sha256=gR-uTasSIFCXrwvnNpIpfsQIopKftT7pBiarCgIShaQ,2214
746
763
  infrahub_testcontainers/models.py,sha256=ASYyvl7d_WQz_i7y8-3iab9hwwmCl3OCJavqVbe8nXU,954
747
- infrahub_testcontainers/performance_test.py,sha256=PSE03jevzv63n-v5rxNIzuQsbtCR-pVqLVpJddjCHhs,6025
748
- infrahub_testcontainers/plugin.py,sha256=vk33oG44MA2zxZwqMsS8_CkScm5LwuwwFmSOtmeAdMU,5357
764
+ infrahub_testcontainers/performance_test.py,sha256=CZ0YeGqnc9RCEPPk5-jFh0b0zFz-DYweOBF-Lfo0bc8,6037
765
+ infrahub_testcontainers/plugin.py,sha256=g24SMg4EAqVe2N8i9F66EV34cNqIdDU4mRP7OeOJO1w,5381
749
766
  infrahub_testcontainers/prometheus.yml,sha256=610xQEyj3xuVJMzPkC4m1fRnCrjGpiRBrXA2ytCLa54,599
750
- infrahub_server-1.2.5.dist-info/LICENSE.txt,sha256=TfPDBt3ar0uv_f9cqCDMZ5rIzW3CY8anRRd4PkL6ejs,34522
751
- infrahub_server-1.2.5.dist-info/METADATA,sha256=wnu7F6hrzd7PmzNKsQt9gNeSVanc9mj2Yyd-ZBGEtlo,8189
752
- infrahub_server-1.2.5.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
753
- infrahub_server-1.2.5.dist-info/entry_points.txt,sha256=UXIeFWDsrV-4IllNvUEd6KieYGzQfn9paga2YyABOQI,393
754
- infrahub_server-1.2.5.dist-info/RECORD,,
767
+ infrahub_server-1.2.7.dist-info/LICENSE.txt,sha256=TfPDBt3ar0uv_f9cqCDMZ5rIzW3CY8anRRd4PkL6ejs,34522
768
+ infrahub_server-1.2.7.dist-info/METADATA,sha256=qt7S0mGiT7u4_-i-SSKcTFe2AaZubGIAMsJFCPdF740,8189
769
+ infrahub_server-1.2.7.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
770
+ infrahub_server-1.2.7.dist-info/entry_points.txt,sha256=UXIeFWDsrV-4IllNvUEd6KieYGzQfn9paga2YyABOQI,393
771
+ infrahub_server-1.2.7.dist-info/RECORD,,
@@ -1,5 +1,6 @@
1
1
  import os
2
2
  import shutil
3
+ import time
3
4
  import uuid
4
5
  from dataclasses import dataclass, field
5
6
  from functools import cached_property
@@ -265,9 +266,58 @@ class InfrahubDockerCompose(DockerCompose):
265
266
  )
266
267
 
267
268
  self.exec_in_container(
268
- command=["cypher-shell", "-d", "system", "-u", "neo4j", "-p", "admin", "START DATABASE neo4j;"],
269
+ command=["chown", "-R", "neo4j:neo4j", "/data"],
269
270
  service_name=service_name,
270
271
  )
271
272
 
273
+ (restore_output, _, _) = self.exec_in_container(
274
+ command=[
275
+ "cypher-shell",
276
+ "--format",
277
+ "plain",
278
+ "-d",
279
+ "system",
280
+ "-u",
281
+ "neo4j",
282
+ "-p",
283
+ "admin",
284
+ "START DATABASE neo4j;",
285
+ ],
286
+ service_name=service_name,
287
+ )
288
+
289
+ for _ in range(3):
290
+ (stdout, _, _) = self.exec_in_container(
291
+ command=[
292
+ "cypher-shell",
293
+ "--format",
294
+ "plain",
295
+ "-d",
296
+ "system",
297
+ "-u",
298
+ "neo4j",
299
+ "-p",
300
+ "admin",
301
+ "SHOW DATABASES WHERE name = 'neo4j' AND currentStatus = 'online';",
302
+ ],
303
+ service_name=service_name,
304
+ )
305
+ if stdout:
306
+ break
307
+ time.sleep(5)
308
+ else:
309
+ (debug_logs, _, _) = self.exec_in_container(
310
+ command=["cat", "logs/debug.log"],
311
+ service_name=service_name,
312
+ )
313
+ raise Exception(f"Failed to restore database:\n{restore_output}\nDebug logs:\n{debug_logs}")
314
+
315
+ old_services = self.services
316
+ self.services = ["infrahub-server", "task-worker"]
272
317
  self.stop(down=False)
273
- self.start()
318
+ try:
319
+ self.start()
320
+ except Exception as exc:
321
+ stdout, stderr = self.get_logs()
322
+ raise Exception(f"Failed to start docker compose:\nStdout:\n{stdout}\nStderr:\n{stderr}") from exc
323
+ self.services = old_services
@@ -45,6 +45,11 @@ services:
45
45
  - ${INFRAHUB_TESTING_SERVER_PORT:-0}:8000
46
46
 
47
47
  database:
48
+ deploy:
49
+ resources:
50
+ limits:
51
+ cpus: ${INFRAHUB_TESTING_DB_CPU_LIMIT:-0.0}
52
+ memory: ${INFRAHUB_TESTING_DB_MEMORY_LIMIT:-0}
48
53
  image: ${NEO4J_DOCKER_IMAGE:-neo4j:5.20.0-community}
49
54
  restart: unless-stopped
50
55
  environment:
@@ -52,6 +57,8 @@ services:
52
57
  NEO4J_dbms_security_procedures_unrestricted: "apoc.*"
53
58
  NEO4J_dbms_security_auth__minimum__password__length: 4
54
59
  NEO4J_ACCEPT_LICENSE_AGREEMENT: "yes"
60
+ NEO4J_dbms_memory_heap_initial__size: ${INFRAHUB_TESTING_DB_HEAP_INITIAL_SIZE}
61
+ NEO4J_dbms_memory_heap_max__size: ${INFRAHUB_TESTING_DB_HEAP_MAX_SIZE}
55
62
  volumes:
56
63
  - "database_data:/data"
57
64
  - "database_logs:/logs"
@@ -116,6 +123,13 @@ services:
116
123
  INFRAHUB_INITIAL_AGENT_TOKEN: ${INFRAHUB_TESTING_INITIAL_AGENT_TOKEN}
117
124
  INFRAHUB_SECURITY_SECRET_KEY: ${INFRAHUB_TESTING_SECURITY_SECRET_KEY}
118
125
  PREFECT_API_URL: ${INFRAHUB_TESTING_PREFECT_API}
126
+ # Tracing
127
+ INFRAHUB_TRACE_ENABLE: ${INFRAHUB_TRACE_ENABLE:-false}
128
+ INFRAHUB_TRACE_EXPORTER_ENDPOINT:
129
+ INFRAHUB_TRACE_EXPORTER_PROTOCOL: ${INFRAHUB_TRACE_EXPORTER_PROTOCOL:-grpc}
130
+ INFRAHUB_TRACE_EXPORTER_TYPE: ${INFRAHUB_TRACE_EXPORTER_TYPE:-console}
131
+ INFRAHUB_TRACE_INSECURE: ${INFRAHUB_TRACE_INSECURE:-true}
132
+ OTEL_RESOURCE_ATTRIBUTES:
119
133
  depends_on:
120
134
  database:
121
135
  condition: service_healthy
@@ -155,6 +169,13 @@ services:
155
169
  INFRAHUB_WORKFLOW_ADDRESS: ${INFRAHUB_TESTING_WORKFLOW_ADDRESS}
156
170
  INFRAHUB_TIMEOUT: ${INFRAHUB_TESTING_TIMEOUT}
157
171
  PREFECT_API_URL: ${INFRAHUB_TESTING_PREFECT_API}
172
+ # Tracing
173
+ INFRAHUB_TRACE_ENABLE: ${INFRAHUB_TRACE_ENABLE:-false}
174
+ INFRAHUB_TRACE_EXPORTER_ENDPOINT:
175
+ INFRAHUB_TRACE_EXPORTER_PROTOCOL: ${INFRAHUB_TRACE_EXPORTER_PROTOCOL:-grpc}
176
+ INFRAHUB_TRACE_EXPORTER_TYPE: ${INFRAHUB_TRACE_EXPORTER_TYPE:-console}
177
+ INFRAHUB_TRACE_INSECURE: ${INFRAHUB_TRACE_INSECURE:-true}
178
+ OTEL_RESOURCE_ATTRIBUTES:
158
179
  depends_on:
159
180
  - infrahub-server
160
181
  volumes:
@@ -187,6 +208,12 @@ services:
187
208
  - "--promscrape.config=/etc/prometheus/prometheus.yml"
188
209
  ports:
189
210
  - ${INFRAHUB_TESTING_SCRAPER_PORT:-0}:8428
211
+ healthcheck:
212
+ test: wget -qO- http://127.0.0.1:8428/-/healthy
213
+ start_period: 10s
214
+ interval: 5s
215
+ timeout: 5s
216
+ retries: 10
190
217
 
191
218
  volumes:
192
219
  database_data:
@@ -100,7 +100,7 @@ class InfrahubPerformanceTest:
100
100
  return self
101
101
 
102
102
  def fetch_metrics(self) -> None:
103
- with httpx.Client() as client:
103
+ with httpx.Client(timeout=30.0) as client:
104
104
  # Get Infrahub metrics
105
105
  response = client.post(
106
106
  url=self.scraper_endpoint,
@@ -125,7 +125,7 @@ def pytest_terminal_summary(
125
125
  performance_test = terminalreporter._session.infrahub_performance_test
126
126
 
127
127
  report = [
128
- f"{measurement.name}: {measurement.value} {measurement.unit.value}"
128
+ f"{measurement.name} ({measurement.context}): {measurement.value} {measurement.unit.value}"
129
129
  for measurement in performance_test.measurements
130
130
  ]
131
131
  terminalreporter.write("\n" + "\n".join(report) + "\n")
@@ -1,115 +0,0 @@
1
- PROTOCOLS_TEMPLATE = """#
2
- # Generated by "infrahubctl protocols"
3
- #
4
-
5
- from __future__ import annotations
6
-
7
- from typing import TYPE_CHECKING, Optional
8
-
9
- from infrahub_sdk.protocols import CoreNode, {{ base_protocols | join(', ') }}
10
-
11
- if TYPE_CHECKING:
12
- {% if sync %}
13
- from infrahub_sdk.node import RelatedNodeSync, RelationshipManagerSync
14
- {% else %}
15
- from infrahub_sdk.node import RelatedNode, RelationshipManager
16
- {% endif %}
17
- from infrahub_sdk.protocols_base import (
18
- AnyAttribute,
19
- AnyAttributeOptional,
20
- String,
21
- StringOptional,
22
- Integer,
23
- IntegerOptional,
24
- Boolean,
25
- BooleanOptional,
26
- DateTime,
27
- DateTimeOptional,
28
- Dropdown,
29
- DropdownOptional,
30
- HashedPassword,
31
- HashedPasswordOptional,
32
- MacAddress,
33
- MacAddressOptional,
34
- IPHost,
35
- IPHostOptional,
36
- IPNetwork,
37
- IPNetworkOptional,
38
- JSONAttribute,
39
- JSONAttributeOptional,
40
- ListAttribute,
41
- ListAttributeOptional,
42
- URL,
43
- URLOptional,
44
- )
45
- {% for generic in generics %}
46
-
47
-
48
- class {{ generic.namespace + generic.name }}(CoreNode):
49
- {% if not generic.attributes|default([]) and not generic.relationships|default([]) %}
50
- pass
51
- {% endif %}
52
- {% for attribute in generic.attributes|default([]) %}
53
- {{ attribute | render_attribute }}
54
- {% endfor %}
55
- {% for relationship in generic.relationships|default([]) %}
56
- {{ relationship | render_relationship(sync) }}
57
- {% endfor %}
58
- {% if generic.hierarchical | default(false) %}
59
- {% if sync %}
60
- parent: RelatedNodeSync
61
- children: RelationshipManagerSync
62
- {% else %}
63
- parent: RelatedNode
64
- children: RelationshipManager
65
- {% endif %}
66
- {% endif %}
67
- {% endfor %}
68
- {% for node in nodes %}
69
-
70
-
71
- class {{ node.namespace + node.name }}({{ node.inherit_from | join(", ") or "CoreNode" }}):
72
- {% if not node.attributes|default([]) and not node.relationships|default([]) %}
73
- pass
74
- {% endif %}
75
- {% for attribute in node.attributes|default([]) %}
76
- {{ attribute | render_attribute }}
77
- {% endfor %}
78
- {% for relationship in node.relationships|default([]) %}
79
- {{ relationship | render_relationship(sync) }}
80
- {% endfor %}
81
- {% if node.hierarchical | default(false) %}
82
- {% if sync %}
83
- parent: RelatedNodeSync
84
- children: RelationshipManagerSync
85
- {% else %}
86
- parent: RelatedNode
87
- children: RelationshipManager
88
- {% endif %}
89
- {% endif %}
90
- {% endfor %}
91
- {% for node in profiles %}
92
-
93
-
94
- class {{ node.namespace + node.name }}({{ node.inherit_from | join(", ") or "CoreNode" }}):
95
- {% if not node.attributes|default([]) and not node.relationships|default([]) %}
96
- pass
97
- {% endif %}
98
- {% for attribute in node.attributes|default([]) %}
99
- {{ attribute | render_attribute }}
100
- {% endfor %}
101
- {% for relationship in node.relationships|default([]) %}
102
- {{ relationship | render_relationship(sync) }}
103
- {% endfor %}
104
- {% if node.hierarchical | default(false) %}
105
- {% if sync %}
106
- parent: RelatedNodeSync
107
- children: RelationshipManagerSync
108
- {% else %}
109
- parent: RelatedNode
110
- children: RelationshipManager
111
- {% endif %}
112
- {% endif %}
113
- {% endfor %}
114
-
115
- """