qontract-reconcile 0.10.1rc1151__py3-none-any.whl → 0.10.1rc1152__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.1rc1151
3
+ Version: 0.10.1rc1152
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
@@ -196,7 +196,7 @@ 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=gBVO5dE8JyZ3xYcYik-MTIp_18oU7_hpYc_oztyfElQ,6753
198
198
  reconcile/external_resources/integration_secrets_sync.py,sha256=dX09O3r6KURziUYYfiki10orNjOGVma-XojhVqd0ww4,1667
199
- reconcile/external_resources/manager.py,sha256=SRrx44silyaKv_P8EWNW9JxpJADYh_CRwBmSE8DO6cs,17671
199
+ reconcile/external_resources/manager.py,sha256=wcqTawNS4qoBHFVfyCfHtWXh4L3AlgcNYx_Ov_vEjNg,17914
200
200
  reconcile/external_resources/meta.py,sha256=noaytFzmShpzLA_ebGh7wuP45mOfHIOnnoUxivjDa1I,672
201
201
  reconcile/external_resources/metrics.py,sha256=nMbyonGZEJDD1lYzpQY2eR9TNwvxYC4ZCcpi6wrExcM,1037
202
202
  reconcile/external_resources/model.py,sha256=UuQgrnv-SSkvSEQQGeCE2IZkhXjLTCVkP_mw8zBZsIQ,8349
@@ -880,8 +880,8 @@ tools/test/test_qontract_cli.py,sha256=iuzKbQ6ahinvjoQmQLBrG4shey0z-1rB6qCgS8T6d
880
880
  tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
881
881
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
882
882
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
883
- qontract_reconcile-0.10.1rc1151.dist-info/METADATA,sha256=kIbyRbeEHOgr_be8cLvc2kZ_5psU6e_Hltp8zQvbkMA,2213
884
- qontract_reconcile-0.10.1rc1151.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
885
- qontract_reconcile-0.10.1rc1151.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
886
- qontract_reconcile-0.10.1rc1151.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
887
- qontract_reconcile-0.10.1rc1151.dist-info/RECORD,,
883
+ qontract_reconcile-0.10.1rc1152.dist-info/METADATA,sha256=DfunuqAeeqnFMYWAd1YufogTDGsI_ff0inMYI-ZU5dY,2213
884
+ qontract_reconcile-0.10.1rc1152.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
885
+ qontract_reconcile-0.10.1rc1152.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
886
+ qontract_reconcile-0.10.1rc1152.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
887
+ qontract_reconcile-0.10.1rc1152.dist-info/RECORD,,
@@ -104,19 +104,22 @@ class ReconciliationStatus(BaseModel):
104
104
  def publish_metrics(self, r: Reconciliation, spec: ExternalResourceSpec) -> None:
105
105
  job_name = ReconciliationK8sJob(reconciliation=r).name()
106
106
 
107
- metrics.set_gauge(
108
- ExternalResourcesResourceStatus(
109
- app=spec.namespace["app"]["name"],
110
- environment=spec.namespace["environment"]["name"],
111
- provision_provider=r.key.provision_provider,
112
- provisioner_name=r.key.provisioner_name,
113
- provider=r.key.provider,
114
- identifier=r.key.identifier,
115
- job_name=job_name,
116
- status=self.resource_status,
117
- ),
118
- 1,
119
- )
107
+ # Use transactional_metrics to remove old status, we just want to expose the latest status
108
+ with metrics.transactional_metrics(scope=job_name) as metrics_container:
109
+ metrics_container.set_gauge(
110
+ ExternalResourcesResourceStatus(
111
+ app=spec.namespace["app"]["name"],
112
+ environment=spec.namespace["environment"]["name"],
113
+ provision_provider=r.key.provision_provider,
114
+ provisioner_name=r.key.provisioner_name,
115
+ provider=r.key.provider,
116
+ identifier=r.key.identifier,
117
+ job_name=job_name,
118
+ status=self.resource_status,
119
+ ),
120
+ 1,
121
+ )
122
+
120
123
  metrics.set_gauge(
121
124
  ExternalResourcesReconcileTimeGauge(
122
125
  app=spec.namespace["app"]["name"],