qontract-reconcile 0.10.2.dev179__py3-none-any.whl → 0.10.2.dev180__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.4
2
2
  Name: qontract-reconcile
3
- Version: 0.10.2.dev179
3
+ Version: 0.10.2.dev180
4
4
  Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
5
5
  Project-URL: homepage, https://github.com/app-sre/qontract-reconcile
6
6
  Project-URL: repository, https://github.com/app-sre/qontract-reconcile
@@ -123,14 +123,14 @@ reconcile/vpc_peerings_validator.py,sha256=aESqrhm1tpkc2iqSL1UV5to_HjNgjRSffD0cr
123
123
  reconcile/aus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
124
124
  reconcile/aus/advanced_upgrade_service.py,sha256=lt684trHbKvVDLwwuNVz3Wu_MnytFSbS_7MZTIITh9k,23969
125
125
  reconcile/aus/aus_label_source.py,sha256=o0S2f0qwcII_8nzhHZhRQ83gEZ1DrSXyO4xzSwLebuU,4382
126
- reconcile/aus/base.py,sha256=rx2OuShoFRP7O6Kov9rRjEkhCPpPavfDF81tieB6XFg,50747
126
+ reconcile/aus/base.py,sha256=Kicj39qfAlINywfk0Legu7RUcUxI4AuoBhA8vJ1gWag,51343
127
127
  reconcile/aus/cluster_version_data.py,sha256=VZWbUEIbrDKO-sroMpQtiWCTqDraTMd8tssKV0HyTQ0,7140
128
128
  reconcile/aus/healthchecks.py,sha256=jR9c-syh9impnkV0fd6XW3Bnk7iRN5zv8oCRYM-yIRY,2700
129
- reconcile/aus/metrics.py,sha256=nKT4m2zGT-QOMR0c-z-npVNKWsNMubzdffpU_f9n4II,3927
129
+ reconcile/aus/metrics.py,sha256=qh3-oWL8-Hbj1uXgAKonw7sVXGBlPpCyHtVYJusZ9n8,4271
130
130
  reconcile/aus/models.py,sha256=qLjWLDJe5PGXPPtJ5PI01IVEYaSGweu9dkAgf0ZM2hk,8297
131
131
  reconcile/aus/node_pool_spec.py,sha256=FkMggklG-4BgQwud2Swp2m3AAAKzZmeaXgohl9uwxZ8,1138
132
- reconcile/aus/ocm_addons_upgrade_scheduler_org.py,sha256=SHbFEEq9ETtkkuzBBaNuwSDze8fj6DWHeA_XNgOyTbo,10308
133
- reconcile/aus/ocm_upgrade_scheduler.py,sha256=2uPn13y3QGCHLoKwCc1Z7q9wQsoQf_F1HATMYUbl53s,3695
132
+ reconcile/aus/ocm_addons_upgrade_scheduler_org.py,sha256=PL8QdzWh8lhGneMwSbIYxOp002mJd5gHf_T0Q2cWQho,10350
133
+ reconcile/aus/ocm_upgrade_scheduler.py,sha256=WPIUUr3n3j-ZtyE3DgsPKzBJ3Dm9i1PSHBRepAf6CF4,3783
134
134
  reconcile/aus/ocm_upgrade_scheduler_org.py,sha256=QeZAQ1wdDPcwZ77b3Xmt4yBV60rWi3qd8h-vGwnwoCs,3948
135
135
  reconcile/aus/upgrades.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
136
136
  reconcile/aus/version_gate_approver.py,sha256=iZg7l-VgcgyVf7jV9mLZzXq3d22r8feAnl-1LDVUJR4,7358
@@ -807,7 +807,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
807
807
  tools/saas_promotion_state/saas_promotion_state.py,sha256=UfwwRLS5Ya4_Nh1w5n1dvoYtchQvYE9yj1VANt2IKqI,3925
808
808
  tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
809
809
  tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y,894
810
- qontract_reconcile-0.10.2.dev179.dist-info/METADATA,sha256=vGUEKBGnRX-V-Y5trKn107wjTWzK8k9k_cbQ92eYeLE,24627
811
- qontract_reconcile-0.10.2.dev179.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
812
- qontract_reconcile-0.10.2.dev179.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
813
- qontract_reconcile-0.10.2.dev179.dist-info/RECORD,,
810
+ qontract_reconcile-0.10.2.dev180.dist-info/METADATA,sha256=3ABcj9gi3YuKUyzROkTB3i4Mo6F6eXVi4BpgPXIwLg4,24627
811
+ qontract_reconcile-0.10.2.dev180.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
812
+ qontract_reconcile-0.10.2.dev180.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
813
+ qontract_reconcile-0.10.2.dev180.dist-info/RECORD,,
reconcile/aus/base.py CHANGED
@@ -35,6 +35,7 @@ from reconcile.aus.metrics import (
35
35
  UPGRADE_SCHEDULED_METRIC_VALUE,
36
36
  UPGRADE_STARTED_METRIC_VALUE,
37
37
  AUSClusterHealthStateGauge,
38
+ AUSClusterMissingVersionGateAgreementsGauge,
38
39
  AUSClusterUpgradePolicyInfoMetric,
39
40
  AUSOCMEnvironmentError,
40
41
  AUSOrganizationErrorRate,
@@ -1066,6 +1067,7 @@ def calculate_diff(
1066
1067
  ocm_api: OCMBaseClient,
1067
1068
  version_data: VersionData,
1068
1069
  addon_id: str = "",
1070
+ integration: str = "",
1069
1071
  ) -> list[UpgradePolicyHandler]:
1070
1072
  """Check available upgrades for each cluster in the desired state
1071
1073
  according to upgrade conditions
@@ -1169,13 +1171,25 @@ def calculate_diff(
1169
1171
  },
1170
1172
  )
1171
1173
  if gates_with_missing_agreements:
1172
- missing_gate_ids = [
1173
- gate.id for gate in gates_with_missing_agreements
1174
+ missing_gate_labels = [
1175
+ gate.label for gate in gates_with_missing_agreements
1174
1176
  ]
1175
1177
  logging.info(
1176
- f"[{spec.org.org_id}/{spec.org.name}/{spec.cluster.name}] found gates with missing agreements for {target_version_prefix} - {missing_gate_ids} "
1178
+ f"[{spec.org.org_id}/{spec.org.name}/{spec.cluster.name}] found gates with missing agreements for {target_version_prefix} - {missing_gate_labels} "
1177
1179
  "Skip creation of an upgrade policy until all of them have been acked by the version-gate-approver integration or a user."
1178
1180
  )
1181
+
1182
+ metrics.set_gauge(
1183
+ AUSClusterMissingVersionGateAgreementsGauge(
1184
+ integration=integration,
1185
+ ocm_env=spec.org.environment.name,
1186
+ org_id=spec.org.org_id,
1187
+ cluster_uuid=spec.cluster.id,
1188
+ version_prefix=target_version_prefix,
1189
+ ),
1190
+ len(gates_with_missing_agreements),
1191
+ )
1192
+
1179
1193
  continue
1180
1194
  diffs.append(
1181
1195
  UpgradePolicyHandler(
reconcile/aus/metrics.py CHANGED
@@ -56,6 +56,18 @@ class AUSClusterHealthStateGauge(AUSBaseMetric, GaugeMetric):
56
56
  return "aus_cluster_health_state"
57
57
 
58
58
 
59
+ class AUSClusterMissingVersionGateAgreementsGauge(AUSBaseMetric, GaugeMetric):
60
+ "The number of missing version gate agreements for a cluster and a target version prefix."
61
+
62
+ org_id: str
63
+ cluster_uuid: str
64
+ version_prefix: str
65
+
66
+ @classmethod
67
+ def name(cls) -> str:
68
+ return "aus_cluster_missing_version_gate_agreements"
69
+
70
+
59
71
  class AUSAddonVersionRemainingSoakDaysGauge(AUSClusterVersionRemainingSoakDaysGauge):
60
72
  "Remaining days a version needs to soak for an addon on a cluster"
61
73
 
@@ -250,6 +250,7 @@ def calculate_diff(
250
250
  ocm_api,
251
251
  version_data,
252
252
  addon_id,
253
+ integration=QONTRACT_INTEGRATION,
253
254
  )
254
255
  for current in addon_current_state:
255
256
  if addon_id == current.addon_id and (
@@ -76,7 +76,11 @@ class OCMClusterUpgradeSchedulerIntegration(
76
76
  )
77
77
 
78
78
  diffs = aus.calculate_diff(
79
- current_state, org_upgrade_spec, ocm_api, version_data
79
+ current_state,
80
+ org_upgrade_spec,
81
+ ocm_api,
82
+ version_data,
83
+ integration=self.name,
80
84
  )
81
85
  aus.act(dry_run, diffs, ocm_api)
82
86