qontract-reconcile 0.10.1rc1042__py3-none-any.whl → 0.10.1rc1044__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.1rc1042
3
+ Version: 0.10.1rc1044
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
@@ -181,10 +181,10 @@ reconcile/cna/assets/asset_factory.py,sha256=7T7X_J6xIsoGETqBRI45_EyIKEdQcnRPt_G
181
181
  reconcile/cna/assets/null.py,sha256=85mVh97atCoC0aLuX47poTZiyOthmziJeBsUw0c924w,1658
182
182
  reconcile/dynatrace_token_provider/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
183
183
  reconcile/dynatrace_token_provider/dependencies.py,sha256=FuRUnK18EyJIIgFwQBZSskIG08mN2VQAcAcaJFTf8zc,2812
184
- reconcile/dynatrace_token_provider/integration.py,sha256=kECEWCIU_rTX7BeFm85Hjpx76GRm3Y54BFUwxQcLW7E,24682
184
+ reconcile/dynatrace_token_provider/integration.py,sha256=Il2DIgeeOjaVtI8A7ou4SbWCo7vpiAopwDxhn5geaEo,25691
185
185
  reconcile/dynatrace_token_provider/metrics.py,sha256=oP-6NTZENFdvWiS0krnmX6tq3xyOzQ8e6vS0CZWYUuw,1496
186
186
  reconcile/dynatrace_token_provider/model.py,sha256=gkpqo5rRRueBXnIMjp4EEHqBUBuU65TRI8zpdb8GJ0A,241
187
- reconcile/dynatrace_token_provider/ocm.py,sha256=iHMsgbsLs-dlrB9UXmWNDF7E4UDe49JOsLa9rnowKfo,4282
187
+ reconcile/dynatrace_token_provider/ocm.py,sha256=66XfJact_PZoa9c8Wz0t_n8N6aSMRQpfPLgKHYtWf8s,4307
188
188
  reconcile/dynatrace_token_provider/validate.py,sha256=40_9QmHoB3-KBc0k_0D4QO00PpNNPS-gU9Z6cIcWga8,1920
189
189
  reconcile/endpoints_discovery/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
190
190
  reconcile/endpoints_discovery/integration.py,sha256=q01DJgCv1YiDY-VUWDfQ5kfGm67BUhP-YP7c0JQObj8,12333
@@ -867,8 +867,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
867
867
  tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
868
868
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
869
869
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
870
- qontract_reconcile-0.10.1rc1042.dist-info/METADATA,sha256=AM3L0R-B-XWMFHvXdB4_qp_Mokhmtr6eqKcLXvthtyM,2213
871
- qontract_reconcile-0.10.1rc1042.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
872
- qontract_reconcile-0.10.1rc1042.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
873
- qontract_reconcile-0.10.1rc1042.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
874
- qontract_reconcile-0.10.1rc1042.dist-info/RECORD,,
870
+ qontract_reconcile-0.10.1rc1044.dist-info/METADATA,sha256=GST5LKQ3Vy2gQm6p6keqlXqcB4vAJscELp1DV7aiEMU,2213
871
+ qontract_reconcile-0.10.1rc1044.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
872
+ qontract_reconcile-0.10.1rc1044.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
873
+ qontract_reconcile-0.10.1rc1044.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
874
+ qontract_reconcile-0.10.1rc1044.dist-info/RECORD,,
@@ -25,6 +25,9 @@ from reconcile.gql_definitions.dynatrace_token_provider.token_specs import (
25
25
  DynatraceAPITokenV1,
26
26
  DynatraceTokenProviderTokenSpecV1,
27
27
  )
28
+ from reconcile.typed_queries.dynatrace_token_provider_token_specs import (
29
+ get_dynatrace_token_provider_token_specs,
30
+ )
28
31
  from reconcile.utils import (
29
32
  metrics,
30
33
  )
@@ -64,6 +67,15 @@ class DynatraceTokenProviderIntegration(
64
67
  self._lock = Lock()
65
68
  self._managed_tokens_cnt: dict[str, Counter[str]] = defaultdict(Counter)
66
69
 
70
+ def get_early_exit_desired_state(self, *args: Any, **kwargs: Any) -> dict[str, Any]:
71
+ """Return the desired state for early exit."""
72
+ return {
73
+ "specs": {
74
+ spec.name: spec.dict()
75
+ for spec in get_dynatrace_token_provider_token_specs()
76
+ }
77
+ }
78
+
67
79
  @property
68
80
  def name(self) -> str:
69
81
  return QONTRACT_INTEGRATION
@@ -142,6 +154,9 @@ class DynatraceTokenProviderIntegration(
142
154
  cluster_uuid=cluster.external_id,
143
155
  error=f"Missing label {DTP_TENANT_LABEL}",
144
156
  )
157
+ logging.warn(
158
+ f"[{cluster.external_id=}] Missing value for label {DTP_TENANT_LABEL}"
159
+ )
145
160
  continue
146
161
  if (
147
162
  tenant_id
@@ -152,6 +167,9 @@ class DynatraceTokenProviderIntegration(
152
167
  cluster_uuid=cluster.external_id,
153
168
  error=f"Dynatrace tenant {tenant_id} does not exist",
154
169
  )
170
+ logging.warn(
171
+ f"[{cluster.external_id=}] Dynatrace {tenant_id=} does not exist"
172
+ )
155
173
  continue
156
174
  dt_client = dependencies.dynatrace_client_by_tenant_id[
157
175
  tenant_id
@@ -166,6 +184,9 @@ class DynatraceTokenProviderIntegration(
166
184
  cluster_uuid=cluster.external_id,
167
185
  error=f"Token spec {cluster.token_spec_name} does not exist",
168
186
  )
187
+ logging.warn(
188
+ f"[{cluster.external_id=}] Token spec '{cluster.token_spec_name}' does not exist"
189
+ )
169
190
  continue
170
191
  if tenant_id not in existing_dtp_tokens:
171
192
  existing_dtp_tokens[tenant_id] = (
@@ -59,7 +59,7 @@ class Cluster(BaseModel):
59
59
 
60
60
  Long-term, we want to remove this behavior.
61
61
  """
62
- token_spec_name = "default"
62
+ token_spec_name = "hypershift-management-cluster-v1"
63
63
  return Cluster(
64
64
  id=cluster.ocm_cluster.id,
65
65
  external_id=cluster.ocm_cluster.external_id,