qontract-reconcile 0.10.1rc849__py3-none-any.whl → 0.10.1rc851__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.1rc849
3
+ Version: 0.10.1rc851
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
@@ -426,7 +426,7 @@ reconcile/saas_auto_promotions_manager/integration.py,sha256=8IXLEvpblgZRr2UPfTs
426
426
  reconcile/saas_auto_promotions_manager/meta.py,sha256=76Jp50r6Y_KyJoXFfSjrt5YrCtXyg_A4FXXxHYiS3TE,161
427
427
  reconcile/saas_auto_promotions_manager/publisher.py,sha256=am8b0uLZIhWjSAgUHPtSOu2fRpa5wXaMl_WnVe4gv2k,3009
428
428
  reconcile/saas_auto_promotions_manager/s3_exporter.py,sha256=IKlVWZmiPnvl7sKeF6JgAlhXZe5CovKTxQc0SNkNSx4,2583
429
- reconcile/saas_auto_promotions_manager/subscriber.py,sha256=gz6l6xSeyYrs2KyEcXJoYbiH5JGSWE_T3VIqWl03A7k,10501
429
+ reconcile/saas_auto_promotions_manager/subscriber.py,sha256=zAqifs7LxssQurO9UwWNrUnOqomRLuD_Z7nTXhU490o,8519
430
430
  reconcile/saas_auto_promotions_manager/merge_request_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
431
431
  reconcile/saas_auto_promotions_manager/merge_request_manager/batcher.py,sha256=lHIULPE8nmPN9pJVfZFdD0l48EB20o4cAy4owahJenw,7848
432
432
  reconcile/saas_auto_promotions_manager/merge_request_manager/desired_state.py,sha256=isY8frVsL3PlcdZmdZ4O0qyp76oczl4DUMX9uMArs5Y,1222
@@ -601,7 +601,7 @@ reconcile/typed_queries/jiralert_settings.py,sha256=y59S5xvYmuaGxszzfKhVLjbCyDwK
601
601
  reconcile/typed_queries/namespaces.py,sha256=vItPrn7sfcHOix-VvkzQkf54_ljzI_ymyxh5esdBJ5Y,262
602
602
  reconcile/typed_queries/namespaces_minimal.py,sha256=rUtqNQ0ORXXUTQfnpsMURymAJ4gYtE77V-Lb3LiJFEY,278
603
603
  reconcile/typed_queries/ocm.py,sha256=aTXW9NaMpMq-90sBUAUQmGPtk6Hnsk2rzSbXv3pD8dY,312
604
- reconcile/typed_queries/pagerduty_instances.py,sha256=QCHqEAakiH6eSob0Pnnn3IBd8Ga0zpEp1Z6Qu3v2uH4,733
604
+ reconcile/typed_queries/pagerduty_instances.py,sha256=q0HbSuLGCMqpLphtnvCdBRKK1o10KNhPvgKNEMCUhyo,517
605
605
  reconcile/typed_queries/quay.py,sha256=OvkSDDbS3o4a4W5MqVxTAVmo47p5XegeoEVNiuqsevg,242
606
606
  reconcile/typed_queries/repos.py,sha256=9I2rJ5VrwB1boJEuaa8A3QWJ1N7wMVbkwfgFadfSrwo,858
607
607
  reconcile/typed_queries/reserved_networks.py,sha256=SWukbbEeW6acyP89v0DYd1WgbcBlUDuo-y3e27eN_vs,390
@@ -834,8 +834,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
834
834
  tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jrss,4941
835
835
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
836
836
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
837
- qontract_reconcile-0.10.1rc849.dist-info/METADATA,sha256=9kea4FnbZH5tdRzVr18mi4qWWVKwjRXh37Ge0Qo2PzA,2273
838
- qontract_reconcile-0.10.1rc849.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
839
- qontract_reconcile-0.10.1rc849.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
840
- qontract_reconcile-0.10.1rc849.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
841
- qontract_reconcile-0.10.1rc849.dist-info/RECORD,,
837
+ qontract_reconcile-0.10.1rc851.dist-info/METADATA,sha256=qP0bQ06v4jmWu-_YIAs72NYxYRsBJ588hTvxcDo1jEU,2273
838
+ qontract_reconcile-0.10.1rc851.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
839
+ qontract_reconcile-0.10.1rc851.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
840
+ qontract_reconcile-0.10.1rc851.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
841
+ qontract_reconcile-0.10.1rc851.dist-info/RECORD,,
@@ -1,9 +1,9 @@
1
1
  import hashlib
2
2
  import logging
3
- from collections.abc import Iterable, Mapping
3
+ from collections.abc import Iterable
4
4
  from dataclasses import dataclass
5
5
  from datetime import datetime, timedelta, timezone
6
- from typing import Any, Optional
6
+ from typing import Optional
7
7
 
8
8
  from reconcile.gql_definitions.fragments.saas_target_namespace import (
9
9
  SaasTargetNamespace,
@@ -78,56 +78,6 @@ class Subscriber:
78
78
  self._compute_desired_ref()
79
79
  self._compute_desired_config_hashes()
80
80
 
81
- @staticmethod
82
- def from_exported_dict(data: Mapping[str, Any]) -> "Subscriber":
83
- subscriber = Subscriber(
84
- saas_name=data["1"],
85
- template_name=data["2"],
86
- ref=data["3"],
87
- target_file_path=data["4"],
88
- use_target_config_hash=data["5"],
89
- target_namespace=SaasTargetNamespace(**data["6"]),
90
- uid=data["7"],
91
- soak_days=data["8"],
92
- )
93
- subscriber.desired_hashes = data["9"]
94
- subscriber.desired_ref = data["10"]
95
- return subscriber
96
-
97
- def to_exportable_dict(self) -> dict[str, Any]:
98
- """
99
- We will later persist subscriber data as json in MRs. We keep key size small to use less space.
100
- Note, the data will be encoded and encrypted in another component.
101
- """
102
- data: dict[str, Any] = {}
103
- data["1"] = self.saas_name
104
- data["2"] = self.template_name
105
- data["3"] = self.ref
106
- data["4"] = self.target_file_path
107
- data["5"] = self._use_target_config_hash
108
- data["6"] = self.target_namespace.dict(by_alias=True)
109
- data["7"] = self.uid
110
- data["8"] = self.soak_days
111
- data["9"] = self.desired_hashes
112
- data["10"] = self.desired_ref
113
- return data
114
-
115
- def __eq__(self, other: object) -> bool:
116
- if not isinstance(other, Subscriber):
117
- # don't attempt to compare against unrelated types
118
- return False
119
- return (
120
- self.saas_name == other.saas_name
121
- and self.template_name == other.template_name
122
- and self.ref == other.ref
123
- and self.target_file_path == other.target_file_path
124
- and self._use_target_config_hash == other._use_target_config_hash
125
- and self.desired_ref == other.desired_ref
126
- and self.desired_hashes == other.desired_hashes
127
- and self.target_namespace == other.target_namespace
128
- and self.uid == other.uid
129
- )
130
-
131
81
  def _validate_deployment(
132
82
  self, publisher: Publisher, channel: Channel
133
83
  ) -> Optional[DeploymentInfo]:
@@ -6,7 +6,6 @@ from reconcile.gql_definitions.common.pagerduty_instances import (
6
6
  query,
7
7
  )
8
8
  from reconcile.utils import gql
9
- from reconcile.utils.exceptions import AppInterfaceSettingsError
10
9
 
11
10
 
12
11
  def get_pagerduty_instances(
@@ -16,7 +15,4 @@ def get_pagerduty_instances(
16
15
  if not query_func:
17
16
  gqlapi = gql.get_api()
18
17
  query_func = gqlapi.query
19
- pagerduty_instances = query(query_func=query_func).pagerduty_instances
20
- if not pagerduty_instances:
21
- raise AppInterfaceSettingsError("no pagerduty instance(s) configured")
22
- return pagerduty_instances
18
+ return query(query_func=query_func).pagerduty_instances or []