qontract-reconcile 0.10.1rc790__py3-none-any.whl → 0.10.1rc792__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.
- {qontract_reconcile-0.10.1rc790.dist-info → qontract_reconcile-0.10.1rc792.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc790.dist-info → qontract_reconcile-0.10.1rc792.dist-info}/RECORD +7 -7
- reconcile/statuspage/atlassian.py +16 -3
- reconcile/utils/terrascript_aws_client.py +10 -1
- {qontract_reconcile-0.10.1rc790.dist-info → qontract_reconcile-0.10.1rc792.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc790.dist-info → qontract_reconcile-0.10.1rc792.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc790.dist-info → qontract_reconcile-0.10.1rc792.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc790.dist-info → qontract_reconcile-0.10.1rc792.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.
|
3
|
+
Version: 0.10.1rc792
|
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
|
{qontract_reconcile-0.10.1rc790.dist-info → qontract_reconcile-0.10.1rc792.dist-info}/RECORD
RENAMED
@@ -429,7 +429,7 @@ reconcile/skupper_network/models.py,sha256=DNTI7HZv-rqY42GIIxyRuvroHLvdH6rJerjIq
|
|
429
429
|
reconcile/skupper_network/reconciler.py,sha256=XS-1oKBr_1l3dYUAVqUH6gCHg1G5ZuOfY_7fgGVAiFA,9996
|
430
430
|
reconcile/skupper_network/site_controller.py,sha256=A3K-62BjJ5HiFVydV0ouGoD1NwrO7XhAH15BHAcS9fk,1550
|
431
431
|
reconcile/statuspage/__init__.py,sha256=o9vR6sp3ARDQFZrbCEShelTxjF1XgfLaElK_QVt_248,261
|
432
|
-
reconcile/statuspage/atlassian.py,sha256=
|
432
|
+
reconcile/statuspage/atlassian.py,sha256=IxtGHd4GXYlJ2Qt3k-MfylM-SIYS7DYaCpjtQvPAmbY,13758
|
433
433
|
reconcile/statuspage/integration.py,sha256=---tzyl381RddAkIhXb7n3ySjUhuX7FBBI152SYsRfk,3654
|
434
434
|
reconcile/statuspage/page.py,sha256=cJH2sDA8jiAmSdaDitQqNjkyDq_UP2w3s7eauCi-yt4,3740
|
435
435
|
reconcile/statuspage/state.py,sha256=HD9EOoKm_nEqCMLIwW809En3cq5VhyzKJPUbsh-bae8,1617
|
@@ -664,7 +664,7 @@ reconcile/utils/state.py,sha256=FK8NLT1xyumuXpYRm0Nk6pWpOE_U6-NovGn6zKCw8vw,1629
|
|
664
664
|
reconcile/utils/structs.py,sha256=LcbLEg8WxfRqM6nW7NhcWN0YeqF7SQzxOgntmLs1SgY,352
|
665
665
|
reconcile/utils/template.py,sha256=wTvRU4AnAV_o042tD4Mwls2dwWMuk7MKnde3MaCjaYg,331
|
666
666
|
reconcile/utils/terraform_client.py,sha256=mZEKpu6nbfiQd60wRkc8-5sljBTUTOgaAKnF89itMzU,32085
|
667
|
-
reconcile/utils/terrascript_aws_client.py,sha256=
|
667
|
+
reconcile/utils/terrascript_aws_client.py,sha256=VlvIHgrZRiMFVgx6a8ZHxoiJoDwqbtOmsZFnwwNrdL0,273199
|
668
668
|
reconcile/utils/three_way_diff_strategy.py,sha256=nyqeQsLCoPI6e16k2CF3b9KNgQLU-rPf5RtfdUfVMwE,4468
|
669
669
|
reconcile/utils/throughput.py,sha256=iP4UWAe2LVhDo69mPPmgo9nQ7RxHD6_GS8MZe-aSiuM,344
|
670
670
|
reconcile/utils/unleash.py,sha256=1D56CsZfE3ShDtN3IErE1T2eeIwNmxhK-yYbCotJ99E,3601
|
@@ -785,8 +785,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
|
|
785
785
|
tools/test/test_qontract_cli.py,sha256=w2l4BHB09k1d-BGJ1jBUNCqDv7zkqYrMHojQXg-21kQ,4155
|
786
786
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
787
787
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
788
|
-
qontract_reconcile-0.10.
|
789
|
-
qontract_reconcile-0.10.
|
790
|
-
qontract_reconcile-0.10.
|
791
|
-
qontract_reconcile-0.10.
|
792
|
-
qontract_reconcile-0.10.
|
788
|
+
qontract_reconcile-0.10.1rc792.dist-info/METADATA,sha256=ubnMxzBVaqBUITyyF1R5bgCW_Eckk_tfSLomJ9VWdSg,2364
|
789
|
+
qontract_reconcile-0.10.1rc792.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
790
|
+
qontract_reconcile-0.10.1rc792.dist-info/entry_points.txt,sha256=rIxI5zWtHNlfpDeq1a7pZXAPoqf7HG32KMTN3MeWK_8,429
|
791
|
+
qontract_reconcile-0.10.1rc792.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
792
|
+
qontract_reconcile-0.10.1rc792.dist-info/RECORD,,
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import logging
|
2
|
+
import time
|
2
3
|
from typing import (
|
3
4
|
Any,
|
4
5
|
Optional,
|
@@ -8,6 +9,8 @@ from typing import (
|
|
8
9
|
import requests
|
9
10
|
import statuspageio # type: ignore
|
10
11
|
from pydantic import BaseModel
|
12
|
+
from requests import Response
|
13
|
+
from sretoolbox.utils import retry
|
11
14
|
|
12
15
|
from reconcile.gql_definitions.statuspage.statuspages import StatusPageV1
|
13
16
|
from reconcile.statuspage.page import (
|
@@ -60,25 +63,35 @@ class LegacyLibAtlassianAPI:
|
|
60
63
|
self.page_id = page_id
|
61
64
|
self.api_url = api_url
|
62
65
|
self.token = token
|
66
|
+
self.auth_headers = {"Authorization": f"OAuth {self.token}"}
|
63
67
|
self._client = statuspageio.Client(
|
64
68
|
api_key=self.token, page_id=self.page_id, organization_id="unset"
|
65
69
|
)
|
66
70
|
|
71
|
+
@retry(max_attempts=10)
|
72
|
+
def _do_get(self, url: str, params: dict[str, Any]) -> Response:
|
73
|
+
response = requests.get(
|
74
|
+
url, params=params, headers=self.auth_headers, timeout=30
|
75
|
+
)
|
76
|
+
response.raise_for_status()
|
77
|
+
return response
|
78
|
+
|
67
79
|
def list_components(self) -> list[AtlassianRawComponent]:
|
68
80
|
url = f"{self.api_url}/v1/pages/{self.page_id}/components"
|
69
|
-
headers = {"Authorization": f"OAuth {self.token}"}
|
70
81
|
all_components: list[AtlassianRawComponent] = []
|
71
82
|
page = 1
|
72
83
|
per_page = 100
|
73
84
|
while True:
|
74
85
|
params = {"page": page, "per_page": per_page}
|
75
|
-
response =
|
76
|
-
response.raise_for_status()
|
86
|
+
response = self._do_get(url, params=params)
|
77
87
|
components = [AtlassianRawComponent(**c) for c in response.json()]
|
78
88
|
all_components += components
|
79
89
|
if len(components) < per_page:
|
80
90
|
break
|
81
91
|
page += 1
|
92
|
+
# https://developer.statuspage.io/#section/Rate-Limiting
|
93
|
+
# Each API token is limited to 1 request / second as measured on a 60 second rolling window
|
94
|
+
time.sleep(1)
|
82
95
|
|
83
96
|
return all_components
|
84
97
|
|
@@ -6464,11 +6464,20 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
6464
6464
|
)
|
6465
6465
|
|
6466
6466
|
# resource - msk config
|
6467
|
+
# unique msk config resource name enables "create_before_destroy" lifecycle
|
6468
|
+
# which is required when changing version which requires a resource replacement
|
6469
|
+
msk_version_str = values["kafka_version"].replace(".", "-")
|
6470
|
+
msk_config_name = f"{resource_id}-{msk_version_str}"
|
6467
6471
|
msk_config = aws_msk_configuration(
|
6468
6472
|
resource_id,
|
6469
|
-
name=
|
6473
|
+
name=msk_config_name,
|
6470
6474
|
kafka_versions=[values["kafka_version"]],
|
6471
6475
|
server_properties=values["server_properties"],
|
6476
|
+
# lifecycle create_before_destroy is required to ensure that the config is created
|
6477
|
+
# before it is assigned to the cluster
|
6478
|
+
lifecycle={
|
6479
|
+
"create_before_destroy": True,
|
6480
|
+
},
|
6472
6481
|
)
|
6473
6482
|
tf_resources.append(msk_config)
|
6474
6483
|
values.pop("server_properties", None)
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc790.dist-info → qontract_reconcile-0.10.1rc792.dist-info}/top_level.txt
RENAMED
File without changes
|