qontract-reconcile 0.10.1rc808__py3-none-any.whl → 0.10.1rc810__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.1rc808
3
+ Version: 0.10.1rc810
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
@@ -10,7 +10,7 @@ reconcile/aws_iam_password_reset.py,sha256=NwErtrqgBiXr7eGCAHdtGGOx0S7-4JnSc29Ie
10
10
  reconcile/aws_support_cases_sos.py,sha256=Jk6_XjDeJSYxgRGqcEAOcynt9qJF2r5HPIPcSKmoBv8,2974
11
11
  reconcile/blackbox_exporter_endpoint_monitoring.py,sha256=W_VJagnsJR1v5oqjlI3RJJE0_nhtJ0m81RS8zWA5u5c,3538
12
12
  reconcile/checkpoint.py,sha256=R2WFXUXLTB4sWMi4GeA4eegsuf_1-Q4vH8M0Toh3Ij4,5036
13
- reconcile/cli.py,sha256=n64KqkdnqF_H2WHoqlSxQ2PP0uYuY9THPGeyiLP9zJA,101154
13
+ reconcile/cli.py,sha256=q0DYN65kPT_4GmnE4tb-VczkNwEDqfAQq7d9lJ6AM-I,101474
14
14
  reconcile/closedbox_endpoint_monitoring_base.py,sha256=SMhkcQqprWvThrIJa3U_3uh5w1h-alleW1QnCJFY4Qw,4909
15
15
  reconcile/cluster_deployment_mapper.py,sha256=2Ah-nu-Mdig0pjuiZl_XLrmVAjYzFjORR3dMlCgkmw0,2352
16
16
  reconcile/dashdotdb_base.py,sha256=a5aPLVxyqPSbjdB0Ty-uliOtxwvEbbEljHJKxdK3-Zk,4813
@@ -390,7 +390,7 @@ reconcile/ocm/types.py,sha256=ibJYvzfAZyyMFkcF1bP8u3rkXciYJRplt_7Z1pKHFh0,2484
390
390
  reconcile/ocm_internal_notifications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
391
391
  reconcile/ocm_internal_notifications/integration.py,sha256=Gw2oB1Oe1Vvbj-fN_undhkQ2y5tCVhUfW5DenKu9ybM,4395
392
392
  reconcile/ocm_labels/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
393
- reconcile/ocm_labels/integration.py,sha256=JmqjY_8QI8lgnCgXroiEfj58wkd98fOe5mTiKvkLeOQ,14946
393
+ reconcile/ocm_labels/integration.py,sha256=aOfQqZj6ftwyzm6DoV3dOpmJvfxwAdJM_nveVDN5aBQ,15212
394
394
  reconcile/oum/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
395
395
  reconcile/oum/base.py,sha256=gw5qDx3VKtIk-VW_g0j5iPdM4qAweqy0YROHJhKHt0M,13596
396
396
  reconcile/oum/labelset.py,sha256=MTOMEyBMbge3JOq0mOKWja-kV3cs0ZId9Ozxv7FJ9Kw,2185
@@ -794,7 +794,7 @@ tools/saas_metrics_exporter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
794
794
  tools/saas_metrics_exporter/main.py,sha256=piocx6meMdJxoxeNz52gQGUjt5n7Fma4kgqYamszPrM,3180
795
795
  tools/saas_metrics_exporter/commit_distance/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
796
796
  tools/saas_metrics_exporter/commit_distance/channel.py,sha256=XEAh3eL8TmgMe7V2BsyxuXYWgvBBVdSJETd6Ec7cI04,2171
797
- tools/saas_metrics_exporter/commit_distance/commit_distance.py,sha256=nyw9N1ESrcxweWfESI-zlldDdSQGLtiuC6x7DXIjtDw,3074
797
+ tools/saas_metrics_exporter/commit_distance/commit_distance.py,sha256=pUWaZfZf0TYOwAW0gDdU8cYgTR586J_8S_DWxqHMWNA,3116
798
798
  tools/saas_metrics_exporter/commit_distance/metrics.py,sha256=5-y6n-sGACAS3eJ5ndY-2BFxcd0fxLfhvZmmBHu4JuA,426
799
799
  tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
800
800
  tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y,894
@@ -804,8 +804,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
804
804
  tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jrss,4941
805
805
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
806
806
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
807
- qontract_reconcile-0.10.1rc808.dist-info/METADATA,sha256=avC3f2n3tg5yBABcDSjLjyLvPd7Axtxg7AYNThYdak4,2314
808
- qontract_reconcile-0.10.1rc808.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
809
- qontract_reconcile-0.10.1rc808.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
810
- qontract_reconcile-0.10.1rc808.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
811
- qontract_reconcile-0.10.1rc808.dist-info/RECORD,,
807
+ qontract_reconcile-0.10.1rc810.dist-info/METADATA,sha256=n3ZgO9W7tKyfp-kEiwn2DFEtQk3bFNAt8_po8tfA-_k,2314
808
+ qontract_reconcile-0.10.1rc810.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
809
+ qontract_reconcile-0.10.1rc810.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
810
+ qontract_reconcile-0.10.1rc810.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
811
+ qontract_reconcile-0.10.1rc810.dist-info/RECORD,,
reconcile/cli.py CHANGED
@@ -3489,8 +3489,15 @@ def skupper_network(ctx, thread_pool_size, internal, use_jump_host):
3489
3489
  envvar="OL_MANAGED_LABEL_PREFIXES",
3490
3490
  default="sre-capabilities",
3491
3491
  )
3492
+ @click.option(
3493
+ "--ignored-label-prefixes",
3494
+ help="A comma list of label prefixes that must be ignored.",
3495
+ required=True,
3496
+ envvar="OL_IGNORED_LABEL_PREFIXES",
3497
+ default="sre-capabilities.rhidp",
3498
+ )
3492
3499
  @click.pass_context
3493
- def ocm_labels(ctx, managed_label_prefixes):
3500
+ def ocm_labels(ctx, managed_label_prefixes, ignored_label_prefixes):
3494
3501
  from reconcile.ocm_labels.integration import (
3495
3502
  OcmLabelsIntegration,
3496
3503
  OcmLabelsIntegrationParams,
@@ -3500,6 +3507,7 @@ def ocm_labels(ctx, managed_label_prefixes):
3500
3507
  integration=OcmLabelsIntegration(
3501
3508
  OcmLabelsIntegrationParams(
3502
3509
  managed_label_prefixes=list(set(managed_label_prefixes.split(","))),
3510
+ ignored_label_prefixes=list(set(ignored_label_prefixes.split(","))),
3503
3511
  )
3504
3512
  ),
3505
3513
  ctx=ctx.obj,
@@ -63,8 +63,9 @@ QONTRACT_INTEGRATION = "ocm-labels"
63
63
 
64
64
  class OcmLabelsIntegrationParams(PydanticRunParams):
65
65
  managed_label_prefixes: list[str] = []
66
+ ignored_label_prefixes: list[str] = []
66
67
 
67
- @validator("managed_label_prefixes")
68
+ @validator("managed_label_prefixes", "ignored_label_prefixes")
68
69
  def must_end_with_dot( # pylint: disable=no-self-argument
69
70
  cls, v: list[str]
70
71
  ) -> list[str]:
@@ -250,7 +251,9 @@ class OcmLabelsIntegration(QontractReconcileIntegration[OcmLabelsIntegrationPara
250
251
  e.g. if a cluster can't be found in OCM or is not considered ready yet.
251
252
  """
252
253
  current_state = self.fetch_subscription_label_current_state(
253
- clusters, self.params.managed_label_prefixes
254
+ clusters,
255
+ self.params.managed_label_prefixes,
256
+ self.params.ignored_label_prefixes,
254
257
  )
255
258
  desired_state = self.fetch_desired_state(
256
259
  self.subscription_label_sources(clusters, query_func)
@@ -258,7 +261,10 @@ class OcmLabelsIntegration(QontractReconcileIntegration[OcmLabelsIntegrationPara
258
261
  return current_state, desired_state
259
262
 
260
263
  def fetch_subscription_label_current_state(
261
- self, clusters: Iterable[ClusterV1], managed_label_prefixes: list[str]
264
+ self,
265
+ clusters: Iterable[ClusterV1],
266
+ managed_label_prefixes: list[str],
267
+ ignored_label_prefixes: list[str],
262
268
  ) -> LabelState:
263
269
  """
264
270
  Fetches the current state of subscription labels for the given clusters.
@@ -287,6 +293,7 @@ class OcmLabelsIntegration(QontractReconcileIntegration[OcmLabelsIntegrationPara
287
293
  label: value
288
294
  for label, value in cluster_details.subscription_labels.get_values_dict().items()
289
295
  if label.startswith(tuple(managed_label_prefixes))
296
+ and not label.startswith(tuple(ignored_label_prefixes))
290
297
  }
291
298
  states[
292
299
  ClusterRef(
@@ -1,5 +1,5 @@
1
1
  from collections.abc import Iterable
2
- from dataclasses import dataclass
2
+ from dataclasses import dataclass, field
3
3
 
4
4
  from sretoolbox.utils import threaded
5
5
 
@@ -22,7 +22,7 @@ class CommitDistanceMetric:
22
22
  @dataclass(frozen=True)
23
23
  class DistanceKey:
24
24
  repo_url: str
25
- auth_code: HasSecret | None
25
+ auth_code: HasSecret | None = field(hash=False, compare=False)
26
26
  ref_from: str
27
27
  ref_to: str
28
28