qontract-reconcile 0.10.1rc1096__py3-none-any.whl → 0.10.1rc1097__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.1rc1096
3
+ Version: 0.10.1rc1097
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
@@ -760,7 +760,7 @@ reconcile/utils/glitchtip/__init__.py,sha256=FT6iBhGqoe7KExFdbgL8AYUb64iW_4snF5_
760
760
  reconcile/utils/glitchtip/client.py,sha256=ovh4tx-ajlihjvcq6nyY4chulbuMJYvzDPv9j9CuAKM,7867
761
761
  reconcile/utils/glitchtip/models.py,sha256=uHbCK9-RWgxNYUAkEHXRAZRDDZW7jkOFFt9MdlqN4bU,6481
762
762
  reconcile/utils/internal_groups/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
763
- reconcile/utils/internal_groups/client.py,sha256=V3uubJJHqW_wjwrwbC0halZrhOy7_yxe49kad9ikEGg,4545
763
+ reconcile/utils/internal_groups/client.py,sha256=DVWSEOsdP0trHANM-xw9WJjKSywrA9x_SFSCgUjvEV8,4665
764
764
  reconcile/utils/internal_groups/models.py,sha256=y_IqBVqfGqNXiu0VudvBWFrm_-uafVm5KgLG-ca8XAs,2281
765
765
  reconcile/utils/jinja2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
766
766
  reconcile/utils/jinja2/extensions.py,sha256=7K-uo6G2eCWa98MHT8fRPYIKCLQB_5D2keqQ_LyAfHM,1293
@@ -870,8 +870,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
870
870
  tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
871
871
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
872
872
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
873
- qontract_reconcile-0.10.1rc1096.dist-info/METADATA,sha256=yRvGWzA7FiVeLTcn5HCehJgz4D7ERObULAvVS-dnBok,2213
874
- qontract_reconcile-0.10.1rc1096.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
875
- qontract_reconcile-0.10.1rc1096.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
876
- qontract_reconcile-0.10.1rc1096.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
877
- qontract_reconcile-0.10.1rc1096.dist-info/RECORD,,
873
+ qontract_reconcile-0.10.1rc1097.dist-info/METADATA,sha256=8Jqb-Z_PMsD3CfIqD_cm6fq0u-dRW_cmhM8xey-gj6k,2213
874
+ qontract_reconcile-0.10.1rc1097.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
875
+ qontract_reconcile-0.10.1rc1097.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
876
+ qontract_reconcile-0.10.1rc1097.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
877
+ qontract_reconcile-0.10.1rc1097.dist-info/RECORD,,
@@ -14,6 +14,8 @@ from sretoolbox.utils import retry
14
14
 
15
15
  from reconcile.utils.internal_groups.models import Group
16
16
 
17
+ REQUEST_TIMEOUT = 30
18
+
17
19
 
18
20
  class NotFound(Exception):
19
21
  """Not found exception."""
@@ -60,7 +62,11 @@ class InternalGroupsApi:
60
62
 
61
63
  @retry(exceptions=(TokenExpiredError,), max_attempts=2)
62
64
  def _request(
63
- self, method: str, url: str, json: dict[Any, Any] | None = None
65
+ self,
66
+ method: str,
67
+ url: str,
68
+ json: dict[Any, Any] | None = None,
69
+ timeout: int = REQUEST_TIMEOUT,
64
70
  ) -> Response:
65
71
  try:
66
72
  return self._client.request(
@@ -69,6 +75,7 @@ class InternalGroupsApi:
69
75
  json=json,
70
76
  # Content-Type is required for GET too :(
71
77
  headers={"Content-Type": "application/json"},
78
+ timeout=timeout,
72
79
  )
73
80
  except TokenExpiredError:
74
81
  self._client.token = self._fetch_token()