qontract-reconcile 0.10.1rc832__py3-none-any.whl → 0.10.1rc834__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.1rc832.dist-info → qontract_reconcile-0.10.1rc834.dist-info}/METADATA +1 -2
- {qontract_reconcile-0.10.1rc832.dist-info → qontract_reconcile-0.10.1rc834.dist-info}/RECORD +7 -7
- reconcile/saas_auto_promotions_manager/subscriber.py +14 -12
- reconcile/utils/state.py +7 -1
- {qontract_reconcile-0.10.1rc832.dist-info → qontract_reconcile-0.10.1rc834.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc832.dist-info → qontract_reconcile-0.10.1rc834.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc832.dist-info → qontract_reconcile-0.10.1rc834.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc832.dist-info → qontract_reconcile-0.10.1rc834.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.1rc834
|
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
|
@@ -24,7 +24,6 @@ Requires-Dist: python-gitlab <1.12.0,>=1.11.0
|
|
24
24
|
Requires-Dist: semver ~=3.0
|
25
25
|
Requires-Dist: boto3 ==1.34.94
|
26
26
|
Requires-Dist: botocore ==1.34.94
|
27
|
-
Requires-Dist: mypy-boto3-s3 ==1.34.14
|
28
27
|
Requires-Dist: urllib3 ~=2.2
|
29
28
|
Requires-Dist: slack-sdk <4.0,>=3.10
|
30
29
|
Requires-Dist: pypd <1.2.0,>=1.1.0
|
{qontract_reconcile-0.10.1rc832.dist-info → qontract_reconcile-0.10.1rc834.dist-info}/RECORD
RENAMED
@@ -420,7 +420,7 @@ reconcile/saas_auto_promotions_manager/integration.py,sha256=8IXLEvpblgZRr2UPfTs
|
|
420
420
|
reconcile/saas_auto_promotions_manager/meta.py,sha256=76Jp50r6Y_KyJoXFfSjrt5YrCtXyg_A4FXXxHYiS3TE,161
|
421
421
|
reconcile/saas_auto_promotions_manager/publisher.py,sha256=am8b0uLZIhWjSAgUHPtSOu2fRpa5wXaMl_WnVe4gv2k,3009
|
422
422
|
reconcile/saas_auto_promotions_manager/s3_exporter.py,sha256=IKlVWZmiPnvl7sKeF6JgAlhXZe5CovKTxQc0SNkNSx4,2583
|
423
|
-
reconcile/saas_auto_promotions_manager/subscriber.py,sha256=
|
423
|
+
reconcile/saas_auto_promotions_manager/subscriber.py,sha256=gz6l6xSeyYrs2KyEcXJoYbiH5JGSWE_T3VIqWl03A7k,10501
|
424
424
|
reconcile/saas_auto_promotions_manager/merge_request_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
425
425
|
reconcile/saas_auto_promotions_manager/merge_request_manager/batcher.py,sha256=lHIULPE8nmPN9pJVfZFdD0l48EB20o4cAy4owahJenw,7848
|
426
426
|
reconcile/saas_auto_promotions_manager/merge_request_manager/desired_state.py,sha256=isY8frVsL3PlcdZmdZ4O0qyp76oczl4DUMX9uMArs5Y,1222
|
@@ -675,7 +675,7 @@ reconcile/utils/sharding.py,sha256=gkYf0lD3IUKQPEmdRJZ70mdDT1c9qWjbdP7evRsUis4,8
|
|
675
675
|
reconcile/utils/slack_api.py,sha256=2t9jeCS7V3sHSMk-ByRcjmh-2uVvGELCfJqm1nu_hKI,17395
|
676
676
|
reconcile/utils/smtp_client.py,sha256=gJNbBQJpAt5PX4t_TaeNHsXM8vt50bFgndml6yK2b5o,2800
|
677
677
|
reconcile/utils/sqs_gateway.py,sha256=gFl9DM4DmGnptuxTOe4lS3YTyE80eSAvK42ljS8h4dA,2287
|
678
|
-
reconcile/utils/state.py,sha256=
|
678
|
+
reconcile/utils/state.py,sha256=DRxzuOw3Iha-b2esBMjZTZ5K-OxfrGbkyEvpTT5xHTs,16369
|
679
679
|
reconcile/utils/structs.py,sha256=LcbLEg8WxfRqM6nW7NhcWN0YeqF7SQzxOgntmLs1SgY,352
|
680
680
|
reconcile/utils/template.py,sha256=wTvRU4AnAV_o042tD4Mwls2dwWMuk7MKnde3MaCjaYg,331
|
681
681
|
reconcile/utils/terraform_client.py,sha256=mZEKpu6nbfiQd60wRkc8-5sljBTUTOgaAKnF89itMzU,32085
|
@@ -812,8 +812,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
|
|
812
812
|
tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jrss,4941
|
813
813
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
814
814
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
815
|
-
qontract_reconcile-0.10.
|
816
|
-
qontract_reconcile-0.10.
|
817
|
-
qontract_reconcile-0.10.
|
818
|
-
qontract_reconcile-0.10.
|
819
|
-
qontract_reconcile-0.10.
|
815
|
+
qontract_reconcile-0.10.1rc834.dist-info/METADATA,sha256=GwMy-WLj9_4L9kW4KPlgRfD7XUInbC5v6Kn7gHcOVNg,2275
|
816
|
+
qontract_reconcile-0.10.1rc834.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
817
|
+
qontract_reconcile-0.10.1rc834.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
|
818
|
+
qontract_reconcile-0.10.1rc834.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
819
|
+
qontract_reconcile-0.10.1rc834.dist-info/RECORD,,
|
@@ -2,6 +2,7 @@ import hashlib
|
|
2
2
|
import logging
|
3
3
|
from collections.abc import Iterable, Mapping
|
4
4
|
from dataclasses import dataclass
|
5
|
+
from datetime import datetime, timedelta, timezone
|
5
6
|
from typing import Any, Optional
|
6
7
|
|
7
8
|
from reconcile.gql_definitions.fragments.saas_target_namespace import (
|
@@ -152,18 +153,19 @@ class Subscriber:
|
|
152
153
|
We accumulate the time a ref is running on all publishers for this subscriber.
|
153
154
|
We compare that accumulated time with the soak_days setting of the subscriber.
|
154
155
|
"""
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
156
|
+
now = datetime.now(timezone.utc)
|
157
|
+
delta = timedelta(days=0)
|
158
|
+
for channel in self.channels:
|
159
|
+
for publisher in channel.publishers:
|
160
|
+
deploy_info = publisher.deployment_info_by_channel.get(channel.name)
|
161
|
+
if not deploy_info:
|
162
|
+
# At this stage we always expect a deploy_info to be present
|
163
|
+
return False
|
164
|
+
deployed_at = deploy_info.check_in
|
165
|
+
if not deployed_at:
|
166
|
+
continue
|
167
|
+
delta += now - deployed_at
|
168
|
+
return delta >= timedelta(days=self.soak_days)
|
167
169
|
|
168
170
|
def _compute_desired_ref(self) -> None:
|
169
171
|
"""
|
reconcile/utils/state.py
CHANGED
@@ -6,6 +6,7 @@ from abc import abstractmethod
|
|
6
6
|
from collections.abc import Callable, Generator, Mapping
|
7
7
|
from dataclasses import dataclass, field
|
8
8
|
from typing import (
|
9
|
+
TYPE_CHECKING,
|
9
10
|
Any,
|
10
11
|
Optional,
|
11
12
|
Self,
|
@@ -13,7 +14,12 @@ from typing import (
|
|
13
14
|
|
14
15
|
import boto3
|
15
16
|
from botocore.errorfactory import ClientError
|
16
|
-
|
17
|
+
|
18
|
+
if TYPE_CHECKING:
|
19
|
+
from mypy_boto3_s3 import S3Client
|
20
|
+
else:
|
21
|
+
S3Client = object
|
22
|
+
|
17
23
|
from pydantic import BaseModel
|
18
24
|
|
19
25
|
from reconcile.gql_definitions.common.app_interface_state_settings import (
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc832.dist-info → qontract_reconcile-0.10.1rc834.dist-info}/top_level.txt
RENAMED
File without changes
|