qontract-reconcile 0.10.1rc1117__py3-none-any.whl → 0.10.1rc1118__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.1rc1117.dist-info → qontract_reconcile-0.10.1rc1118.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc1117.dist-info → qontract_reconcile-0.10.1rc1118.dist-info}/RECORD +7 -7
- reconcile/external_resources/manager.py +16 -4
- reconcile/external_resources/metrics.py +8 -0
- {qontract_reconcile-0.10.1rc1117.dist-info → qontract_reconcile-0.10.1rc1118.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc1117.dist-info → qontract_reconcile-0.10.1rc1118.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc1117.dist-info → qontract_reconcile-0.10.1rc1118.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc1117.dist-info → qontract_reconcile-0.10.1rc1118.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.1rc1118
|
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.1rc1117.dist-info → qontract_reconcile-0.10.1rc1118.dist-info}/RECORD
RENAMED
@@ -196,9 +196,9 @@ reconcile/external_resources/aws.py,sha256=7W-6d-lXO6JGwaxtO1Uc3Lw0p8csJ1EVgz__O
|
|
196
196
|
reconcile/external_resources/factories.py,sha256=nhdTqf1WEfRfgd5-70KAUJVz0ZvZ19C3Pz7wmotSdrs,4857
|
197
197
|
reconcile/external_resources/integration.py,sha256=y1gJ16woMBC3J9qniMmS5y3lCkAs7V_ETZRUwjKqaO0,6628
|
198
198
|
reconcile/external_resources/integration_secrets_sync.py,sha256=cMEZhgCvABAMf-DWF051L6CRnJQdfbsISA_b1xuS940,1670
|
199
|
-
reconcile/external_resources/manager.py,sha256=
|
199
|
+
reconcile/external_resources/manager.py,sha256=cs6QEirz9EaLiuxybZ_1ugUn61vNWlKAC4NKouqpd5I,16148
|
200
200
|
reconcile/external_resources/meta.py,sha256=noaytFzmShpzLA_ebGh7wuP45mOfHIOnnoUxivjDa1I,672
|
201
|
-
reconcile/external_resources/metrics.py,sha256=
|
201
|
+
reconcile/external_resources/metrics.py,sha256=jsN3IF78Su23d3Qp4BTKXkgZPN6AKjdS8sZFEXmYCek,863
|
202
202
|
reconcile/external_resources/model.py,sha256=UuQgrnv-SSkvSEQQGeCE2IZkhXjLTCVkP_mw8zBZsIQ,8349
|
203
203
|
reconcile/external_resources/reconciler.py,sha256=3KFmkHsN7YAwJUSBpN1Xd_D2zM9Ea5_c2uMGWsfruZo,9707
|
204
204
|
reconcile/external_resources/secrets_sync.py,sha256=6n0oDPLjd9Ql0lf6zsr1AZw8A6EEe3yCzl20XodtgkE,16229
|
@@ -869,8 +869,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
|
|
869
869
|
tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
|
870
870
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
871
871
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
872
|
-
qontract_reconcile-0.10.
|
873
|
-
qontract_reconcile-0.10.
|
874
|
-
qontract_reconcile-0.10.
|
875
|
-
qontract_reconcile-0.10.
|
876
|
-
qontract_reconcile-0.10.
|
872
|
+
qontract_reconcile-0.10.1rc1118.dist-info/METADATA,sha256=2jeVjBwwFsNDGFNPGxlQNAiSf5JMp9mD7IOhqYwQa8M,2213
|
873
|
+
qontract_reconcile-0.10.1rc1118.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
874
|
+
qontract_reconcile-0.10.1rc1118.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
|
875
|
+
qontract_reconcile-0.10.1rc1118.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
876
|
+
qontract_reconcile-0.10.1rc1118.dist-info/RECORD,,
|
@@ -16,6 +16,7 @@ from reconcile.external_resources.factories import (
|
|
16
16
|
from reconcile.external_resources.metrics import (
|
17
17
|
ExternalResourcesReconcileErrorsCounter,
|
18
18
|
ExternalResourcesReconcileTimeGauge,
|
19
|
+
ExternalResourcesResourceStatus,
|
19
20
|
)
|
20
21
|
from reconcile.external_resources.model import (
|
21
22
|
Action,
|
@@ -212,7 +213,7 @@ class ExternalResourcesManager:
|
|
212
213
|
return to_reconcile
|
213
214
|
|
214
215
|
def _update_in_progress_state(
|
215
|
-
self, r: Reconciliation, state: ExternalResourceState
|
216
|
+
self, r: Reconciliation, state: ExternalResourceState, job_name: str
|
216
217
|
) -> bool:
|
217
218
|
"""Gets the resource reconciliation state from the Job and updates the
|
218
219
|
Resource state accordingly. It also returns if the target outputs secret needs
|
@@ -238,7 +239,6 @@ class ExternalResourcesManager:
|
|
238
239
|
|
239
240
|
# Need to check the reconciliation set in the state, not the desired one
|
240
241
|
# as the reconciliation object might be from a previous desired state
|
241
|
-
job_name = ReconciliationK8sJob(reconciliation=r).name()
|
242
242
|
error = False
|
243
243
|
match self.reconciler.get_resource_reconcile_status(state.reconciliation):
|
244
244
|
case ReconcileStatus.SUCCESS:
|
@@ -291,7 +291,6 @@ class ExternalResourcesManager:
|
|
291
291
|
job_name=job_name,
|
292
292
|
)
|
293
293
|
)
|
294
|
-
|
295
294
|
return need_secret_sync
|
296
295
|
|
297
296
|
def _update_state(self, r: Reconciliation, state: ExternalResourceState) -> None:
|
@@ -353,7 +352,8 @@ class ExternalResourcesManager:
|
|
353
352
|
to_sync_keys: set[ExternalResourceKey] = set()
|
354
353
|
for r in desired_r.union(deleted_r):
|
355
354
|
state = self.state_mgr.get_external_resource_state(r.key)
|
356
|
-
|
355
|
+
job_name = ReconciliationK8sJob(reconciliation=r).name()
|
356
|
+
need_sync = self._update_in_progress_state(r, state, job_name)
|
357
357
|
if need_sync:
|
358
358
|
to_sync_keys.add(r.key)
|
359
359
|
|
@@ -361,6 +361,18 @@ class ExternalResourcesManager:
|
|
361
361
|
self.reconciler.reconcile_resource(reconciliation=r)
|
362
362
|
self._update_state(r, state)
|
363
363
|
|
364
|
+
metrics.set_gauge(
|
365
|
+
ExternalResourcesResourceStatus(
|
366
|
+
provision_provider=r.key.provision_provider,
|
367
|
+
provisioner_name=r.key.provisioner_name,
|
368
|
+
provider=r.key.provider,
|
369
|
+
identifier=r.key.identifier,
|
370
|
+
job_name=job_name,
|
371
|
+
status=state.resource_status,
|
372
|
+
),
|
373
|
+
1,
|
374
|
+
)
|
375
|
+
|
364
376
|
pending_sync_keys = self.state_mgr.get_keys_by_status(
|
365
377
|
ResourceStatus.PENDING_SECRET_SYNC
|
366
378
|
)
|
@@ -24,3 +24,11 @@ class ExternalResourcesReconcileTimeGauge(ExternalResourcesBaseMetric, GaugeMetr
|
|
24
24
|
@classmethod
|
25
25
|
def name(cls) -> str:
|
26
26
|
return "external_resources_reconcile_time"
|
27
|
+
|
28
|
+
|
29
|
+
class ExternalResourcesResourceStatus(ExternalResourcesBaseMetric, GaugeMetric):
|
30
|
+
status: str
|
31
|
+
|
32
|
+
@classmethod
|
33
|
+
def name(cls) -> str:
|
34
|
+
return "external_resources_resource_status"
|
{qontract_reconcile-0.10.1rc1117.dist-info → qontract_reconcile-0.10.1rc1118.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|