qontract-reconcile 0.10.1rc917__py3-none-any.whl → 0.10.1rc919__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qontract-reconcile
3
- Version: 0.10.1rc917
3
+ Version: 0.10.1rc919
4
4
  Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
5
5
  Home-page: https://github.com/app-sre/qontract-reconcile
6
6
  Author: Red Hat App-SRE Team
@@ -61,7 +61,7 @@ reconcile/ocm_groups.py,sha256=CluPyvmwE5JOZS2HQSReC1sD8L1ChhnJlAg8lcwdtxc,3395
61
61
  reconcile/ocm_machine_pools.py,sha256=poGfITOCJEMwYAJpiuL8SytgTcBmGIKEZPgNGld80TY,16563
62
62
  reconcile/ocm_update_recommended_version.py,sha256=IYkfLXIprOW1jguZeELcGP1iBPuj-b53R-FTqKulMl8,4204
63
63
  reconcile/ocm_upgrade_scheduler_org_updater.py,sha256=aLgyInt9oIWAg0XtCiwJRUSwdPx3masKV8kHzkyEEOQ,4282
64
- reconcile/openshift_base.py,sha256=1PFwTR_r1BQFsAcI8gmj6-UNmppyMVcQdwtZCDL0T6g,49667
64
+ reconcile/openshift_base.py,sha256=MvydL1Qq6g_mex_EOWDFFuckt8VtE3LfHW0mhWkUJFs,49712
65
65
  reconcile/openshift_cluster_bots.py,sha256=eRPYZqWMKFNxLlSN0QG97V5t1iIESQ0BbGaiaQP5VB0,10940
66
66
  reconcile/openshift_clusterrolebindings.py,sha256=QfSy1Ik8eEY5XObc1Q4xyhqyErZenJmbPv_u9wcDNNo,5864
67
67
  reconcile/openshift_groups.py,sha256=wb_J5hvfpgS5RTeeZDPiQ_zvwbajGYysFNP603YNioE,9313
@@ -792,8 +792,8 @@ reconcile/utils/runtime/runner.py,sha256=PBfE_M4hTZKtyubg29AkMWlLi2KKyA74yItREtT
792
792
  reconcile/utils/runtime/sharding.py,sha256=r0ieUtNed7NvknSw6qQrCkKpVXE1shuHGnfFcnpA_k4,16142
793
793
  reconcile/utils/saasherder/__init__.py,sha256=J3MBZBFa5YmhqYm08QsjBXz8mFcVOCiOCkyIcw41t7E,343
794
794
  reconcile/utils/saasherder/interfaces.py,sha256=C2wrw34OXypshVocAsPrVZsSHptgw4g9u7Haa2wulZQ,9087
795
- reconcile/utils/saasherder/models.py,sha256=McvpJhwh-QfrNT76hekvx5U5Xq2Hp1Yt1XHTW2d3Cn8,5466
796
- reconcile/utils/saasherder/saasherder.py,sha256=ul6sRbgvxUSnrDZXwJQ9nnQumkpTERTLFBWuiIWlCUA,88241
795
+ reconcile/utils/saasherder/models.py,sha256=7YEWw32GMEZFXdeayh7pLW0lO6mpPD8L6c2GZoFpIUE,6477
796
+ reconcile/utils/saasherder/saasherder.py,sha256=sIMC9It_nBiV4tevbaoXygKt_ocuiNGsX2ZaohwfFYY,87534
797
797
  reconcile/utils/terraform/__init__.py,sha256=zNbiyTWo35AT1sFTElL2j_AA0jJ_yWE_bfFn-nD2xik,250
798
798
  reconcile/utils/terraform/config.py,sha256=5UVrd563TMcvi4ooa5JvWVDW1I3bIWg484u79evfV_8,164
799
799
  reconcile/utils/terraform/config_client.py,sha256=3gUIIIEv52Vx7-VgQ2FZYfCCrfqUv_5gw_TQ3mbLcTs,4666
@@ -844,8 +844,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
844
844
  tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
845
845
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
846
846
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
847
- qontract_reconcile-0.10.1rc917.dist-info/METADATA,sha256=9i8HABFSIkcnnT-zpqr2yfJeF9T7rzIQVADi3hQzMy4,2273
848
- qontract_reconcile-0.10.1rc917.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
849
- qontract_reconcile-0.10.1rc917.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
850
- qontract_reconcile-0.10.1rc917.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
851
- qontract_reconcile-0.10.1rc917.dist-info/RECORD,,
847
+ qontract_reconcile-0.10.1rc919.dist-info/METADATA,sha256=1-faoxKb-anVWlJgQgYltAHFUKKsvF0WCwORjQ_H7Es,2273
848
+ qontract_reconcile-0.10.1rc919.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
849
+ qontract_reconcile-0.10.1rc919.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
850
+ qontract_reconcile-0.10.1rc919.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
851
+ qontract_reconcile-0.10.1rc919.dist-info/RECORD,,
@@ -401,12 +401,16 @@ def apply(
401
401
 
402
402
  try:
403
403
  oc.apply(namespace, annotated)
404
- except (InvalidValueApplyError, RequestEntityTooLargeError):
404
+ except InvalidValueApplyError:
405
405
  oc.remove_last_applied_configuration(
406
406
  namespace, resource_type, resource.name
407
407
  )
408
408
  oc.apply(namespace, annotated)
409
- except (MetaDataAnnotationsTooLongApplyError, UnsupportedMediaTypeError):
409
+ except (
410
+ MetaDataAnnotationsTooLongApplyError,
411
+ UnsupportedMediaTypeError,
412
+ RequestEntityTooLargeError,
413
+ ):
410
414
  if not oc.get(
411
415
  namespace, resource_type, resource.name, allow_not_found=True
412
416
  ):
@@ -15,7 +15,9 @@ from reconcile.utils.saasherder.interfaces import (
15
15
  ManagedResourceName,
16
16
  SaasApp,
17
17
  SaasEnvironment,
18
+ SaasFile,
18
19
  SaasPipelinesProviders,
20
+ SaasResourceTemplate,
19
21
  SaasResourceTemplateTarget,
20
22
  )
21
23
 
@@ -208,21 +210,59 @@ class ImageAuth:
208
210
 
209
211
  @dataclass
210
212
  class TargetSpec:
211
- saas_file_name: str
212
- resource_template_name: str
213
+ saas_file: SaasFile
214
+ resource_template: SaasResourceTemplate
213
215
  target: SaasResourceTemplateTarget
214
- cluster: str
215
- namespace: str
216
- managed_resource_types: Iterable[str]
217
- managed_resource_names: Sequence[ManagedResourceName] | None
218
- delete: bool
219
- privileged: bool
220
216
  image_auth: ImageAuth
221
- image_patterns: list[str]
222
- url: str
223
- path: str
224
- provider: str
225
217
  hash_length: int
226
218
  parameters: dict[str, str]
227
219
  github: Github
228
220
  target_config_hash: str
221
+
222
+ @property
223
+ def saas_file_name(self) -> str:
224
+ return self.saas_file.name
225
+
226
+ @property
227
+ def managed_resource_types(self) -> Iterable[str]:
228
+ return self.saas_file.managed_resource_types
229
+
230
+ @property
231
+ def managed_resource_names(self) -> Sequence[ManagedResourceName] | None:
232
+ return self.saas_file.managed_resource_names
233
+
234
+ @property
235
+ def privileged(self) -> bool:
236
+ return bool(self.saas_file.cluster_admin)
237
+
238
+ @property
239
+ def image_patterns(self) -> list[str]:
240
+ return self.saas_file.image_patterns
241
+
242
+ @property
243
+ def resource_template_name(self) -> str:
244
+ return self.resource_template.name
245
+
246
+ @property
247
+ def url(self) -> str:
248
+ return self.resource_template.url
249
+
250
+ @property
251
+ def path(self) -> str:
252
+ return self.resource_template.path
253
+
254
+ @property
255
+ def provider(self) -> str:
256
+ return self.resource_template.provider or "openshift-template"
257
+
258
+ @property
259
+ def cluster(self) -> str:
260
+ return self.target.namespace.cluster.name
261
+
262
+ @property
263
+ def namespace(self) -> str:
264
+ return self.target.namespace.name
265
+
266
+ @property
267
+ def delete(self) -> bool:
268
+ return bool(self.target.delete)
@@ -1310,7 +1310,6 @@ class SaasHerder: # pylint: disable=too-many-public-methods
1310
1310
  all_trigger_specs = self.get_saas_targets_config_trigger_specs(saas_file)
1311
1311
  # iterate over resource templates (multiple per saas_file)
1312
1312
  for rt in saas_file.resource_templates:
1313
- provider = rt.provider or "openshift-template"
1314
1313
  hash_length = rt.hash_length or self.hash_length
1315
1314
  resource_template_parameters = self._collect_parameters(rt)
1316
1315
  resource_template_secret_parameters = self._collect_secret_parameters(rt)
@@ -1344,26 +1343,15 @@ class SaasHerder: # pylint: disable=too-many-public-methods
1344
1343
 
1345
1344
  specs.append(
1346
1345
  TargetSpec(
1347
- saas_file_name=saas_file.name,
1348
- cluster=target.namespace.cluster.name,
1349
- namespace=target.namespace.name,
1350
- managed_resource_types=saas_file.managed_resource_types,
1351
- managed_resource_names=saas_file.managed_resource_names,
1352
- delete=bool(target.delete),
1353
- privileged=bool(saas_file.cluster_admin),
1346
+ saas_file=saas_file,
1347
+ resource_template=rt,
1348
+ target=target,
1354
1349
  # process_template options
1355
- resource_template_name=rt.name,
1356
1350
  image_auth=image_auth,
1357
- url=rt.url,
1358
- path=rt.path,
1359
- provider=provider,
1360
1351
  hash_length=hash_length,
1361
- target=target,
1362
1352
  parameters=consolidated_parameters,
1363
1353
  github=github,
1364
1354
  target_config_hash=digest,
1365
- # check_image options
1366
- image_patterns=saas_file.image_patterns,
1367
1355
  )
1368
1356
  )
1369
1357