qontract-reconcile 0.10.1rc726__py3-none-any.whl → 0.10.1rc727__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.1rc726
3
+ Version: 0.10.1rc727
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
@@ -9,7 +9,7 @@ reconcile/aws_iam_password_reset.py,sha256=NwErtrqgBiXr7eGCAHdtGGOx0S7-4JnSc29Ie
9
9
  reconcile/aws_support_cases_sos.py,sha256=Jk6_XjDeJSYxgRGqcEAOcynt9qJF2r5HPIPcSKmoBv8,2974
10
10
  reconcile/blackbox_exporter_endpoint_monitoring.py,sha256=W_VJagnsJR1v5oqjlI3RJJE0_nhtJ0m81RS8zWA5u5c,3538
11
11
  reconcile/checkpoint.py,sha256=R2WFXUXLTB4sWMi4GeA4eegsuf_1-Q4vH8M0Toh3Ij4,5036
12
- reconcile/cli.py,sha256=HLfkpQXhNA9YDwNWJUYg8zjm03sCEUIVB6-Ly4FOh48,96572
12
+ reconcile/cli.py,sha256=xAuxjbBPlIeFAnyOhhMYJTthVM_J26Sb6F2WNCb734M,96573
13
13
  reconcile/closedbox_endpoint_monitoring_base.py,sha256=SMhkcQqprWvThrIJa3U_3uh5w1h-alleW1QnCJFY4Qw,4909
14
14
  reconcile/cluster_deployment_mapper.py,sha256=2Ah-nu-Mdig0pjuiZl_XLrmVAjYzFjORR3dMlCgkmw0,2352
15
15
  reconcile/dashdotdb_base.py,sha256=a5aPLVxyqPSbjdB0Ty-uliOtxwvEbbEljHJKxdK3-Zk,4813
@@ -372,7 +372,7 @@ reconcile/oum/models.py,sha256=0ZyCnULRxAbIEXX60BkkPZVg53DCD6ZJ6wnNT2ANROM,1743
372
372
  reconcile/oum/providers.py,sha256=3kEjXvsTPzXc7gzrdO7hWqgzcMmMZMpk2S0X7wQUTWU,1767
373
373
  reconcile/oum/standalone.py,sha256=bzyV8wz3SrERG9zJRFiJCBzSIGwDNj9sNqUytngDw94,7368
374
374
  reconcile/prometheus_rules_tester/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
375
- reconcile/prometheus_rules_tester/integration.py,sha256=glzYgt9WXRoVFGaonmYxsQBJ5RNR3HTrgsmwhIWKhgk,9329
375
+ reconcile/prometheus_rules_tester/integration.py,sha256=AahzQ0wEO8VEWqeT-xtmDmG6NMgMdr54jymlcqehwGM,9366
376
376
  reconcile/rhidp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
377
377
  reconcile/rhidp/common.py,sha256=suTh9T4dPOgrKi-rDALgjzCSL9JHGnkTYALFIIjNCJE,6801
378
378
  reconcile/rhidp/metrics.py,sha256=Yp0GtpjhieEdru0qkG3osBTJiKUzg6CAjwPoFTQDnCg,417
@@ -472,7 +472,7 @@ reconcile/test/test_openshift_saas_deploy_change_tester.py,sha256=1yVe54Hx9YdVjn
472
472
  reconcile/test/test_openshift_saas_deploy_trigger_cleaner.py,sha256=cha3bUiXAWPCwrp8XwVC3RNJtJHLcsGTE-F8Zn6XxsU,2852
473
473
  reconcile/test/test_openshift_tekton_resources.py,sha256=RtRWsdm51S13OSkENC9nY_rOH0QELSCaO5tjF0XqIDI,11222
474
474
  reconcile/test/test_openshift_upgrade_watcher.py,sha256=0GDQ_YFHIX8DbkbDYSuLv9uZeeg4NwP1vlOqvSaZvN4,7183
475
- reconcile/test/test_prometheus_rules_tester.py,sha256=Qc9J4k0lSVie361lGr_cOy0EaBTD5LDqGZf7CYVFKr8,5677
475
+ reconcile/test/test_prometheus_rules_tester.py,sha256=cgVkPM3KcAw69bOkJ6iR2Lfog_WgblyoqVRtXv4ly7o,5685
476
476
  reconcile/test/test_quay_membership.py,sha256=e29Giz5S9ckFgjpTO8PBo8qVPocIQmy4WqsRhgTFd9A,2643
477
477
  reconcile/test/test_quay_mirror.py,sha256=UBLQDtet5WkWnh98ev5cI3yAflQl07awg2dXTefqoUk,6311
478
478
  reconcile/test/test_quay_mirror_org.py,sha256=67XwB0WkqO6l9SeR9cSfjODyt-P587Kvqvam7hR8rLQ,3008
@@ -764,8 +764,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
764
764
  tools/test/test_qontract_cli.py,sha256=UEwAW7PA_GIrbqzaLxpkCxbuVjEFLNvnVG-6VyoCGIc,4147
765
765
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
766
766
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
767
- qontract_reconcile-0.10.1rc726.dist-info/METADATA,sha256=maRuGUrFAdwK_5cRbjB9kQKeQ8tguoeeNWVasWTEEUE,2382
768
- qontract_reconcile-0.10.1rc726.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
769
- qontract_reconcile-0.10.1rc726.dist-info/entry_points.txt,sha256=rIxI5zWtHNlfpDeq1a7pZXAPoqf7HG32KMTN3MeWK_8,429
770
- qontract_reconcile-0.10.1rc726.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
771
- qontract_reconcile-0.10.1rc726.dist-info/RECORD,,
767
+ qontract_reconcile-0.10.1rc727.dist-info/METADATA,sha256=lGusiFpOTOvJIK8nYP813fIHvezdgXL9ojNkgPvpgcU,2382
768
+ qontract_reconcile-0.10.1rc727.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
769
+ qontract_reconcile-0.10.1rc727.dist-info/entry_points.txt,sha256=rIxI5zWtHNlfpDeq1a7pZXAPoqf7HG32KMTN3MeWK_8,429
770
+ qontract_reconcile-0.10.1rc727.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
771
+ qontract_reconcile-0.10.1rc727.dist-info/RECORD,,
reconcile/cli.py CHANGED
@@ -3019,7 +3019,7 @@ def prometheus_rules_tester(ctx, thread_pool_size, cluster_name):
3019
3019
  reconcile.prometheus_rules_tester.integration,
3020
3020
  ctx.obj,
3021
3021
  thread_pool_size,
3022
- cluster_name=cluster_name,
3022
+ cluster_names=cluster_name,
3023
3023
  )
3024
3024
 
3025
3025
 
@@ -122,12 +122,12 @@ def fetch_rule_and_tests(
122
122
  def get_rules_and_tests(
123
123
  vault_settings: AppInterfaceSettingsV1,
124
124
  thread_pool_size: int,
125
- cluster_name: Optional[str] = None,
125
+ cluster_names: Optional[Iterable[str]] = None,
126
126
  ) -> list[Test]:
127
127
  """Iterates through all namespaces and returns a list of tests to run"""
128
128
  namespace_with_prom_rules, _ = orb.get_namespaces(
129
129
  PROVIDERS,
130
- cluster_names=[cluster_name] if cluster_name else [],
130
+ cluster_names=cluster_names if cluster_names else [],
131
131
  namespace_name=NAMESPACE_NAME,
132
132
  )
133
133
 
@@ -225,14 +225,14 @@ def check_rules_and_tests(
225
225
  vault_settings: AppInterfaceSettingsV1,
226
226
  alerting_services: Iterable[str],
227
227
  thread_pool_size: int,
228
- cluster_name: Optional[str] = None,
228
+ cluster_names: Optional[Iterable[str]] = None,
229
229
  ) -> list[Test]:
230
230
  """Fetch rules and associated tests, run checks on rules and tests if they exist
231
231
  and return a list of failed checks/tests"""
232
232
  tests = get_rules_and_tests(
233
233
  vault_settings=vault_settings,
234
234
  thread_pool_size=thread_pool_size,
235
- cluster_name=cluster_name,
235
+ cluster_names=cluster_names,
236
236
  )
237
237
  threaded.run(
238
238
  func=run_test,
@@ -247,14 +247,14 @@ def check_rules_and_tests(
247
247
 
248
248
 
249
249
  def run(
250
- dry_run: bool, thread_pool_size: int, cluster_name: Optional[str] = None
250
+ dry_run: bool, thread_pool_size: int, cluster_names: Optional[Iterable[str]] = None
251
251
  ) -> None:
252
252
  """Check prometheus rules syntax and run the tests associated to them"""
253
253
  orb.QONTRACT_INTEGRATION = QONTRACT_INTEGRATION
254
254
  orb.QONTRACT_INTEGRATION_VERSION = QONTRACT_INTEGRATION_VERSION
255
255
 
256
256
  failed_tests = check_rules_and_tests(
257
- cluster_name=cluster_name,
257
+ cluster_names=cluster_names,
258
258
  vault_settings=get_app_interface_vault_settings(),
259
259
  alerting_services=get_alerting_services(),
260
260
  thread_pool_size=thread_pool_size,
@@ -69,7 +69,7 @@ class TestPrometheusRulesTester:
69
69
  vault_settings=self.vault_settings,
70
70
  alerting_services=self.alerting_services,
71
71
  thread_pool_size=THREAD_POOL_SIZE,
72
- cluster_name=cluster_name,
72
+ cluster_names=cluster_name,
73
73
  )
74
74
 
75
75
  def test_ok_non_templated(self) -> None:
@@ -136,16 +136,16 @@ class TestPrometheusRulesTester:
136
136
  self.ns_data = self.fxt.get_anymarkup("ns-bad-test.yaml")
137
137
  mocker_alerting_services.return_value = {"yak-shaver"}
138
138
  mocker_vault_settings.return_value = AppInterfaceSettingsV1(vault=False)
139
- cluster_name = "appint-ex-01"
139
+ cluster_name = ("appint-ex-01",)
140
140
 
141
141
  with pytest.raises(SystemExit) as exc:
142
- run(False, THREAD_POOL_SIZE, cluster_name=cluster_name)
142
+ run(False, THREAD_POOL_SIZE, cluster_names=cluster_name)
143
143
 
144
144
  assert exc.value.code == ExitCodes.ERROR
145
145
 
146
146
  error_msg = (
147
147
  "Error checking rule bad-test.prometheusrules.yaml "
148
148
  "from namespace openshift-customer-monitoring in "
149
- f"cluster {cluster_name}: Error running promtool command"
149
+ f"cluster {cluster_name[0]}: Error running promtool command"
150
150
  )
151
151
  assert error_msg in caplog.text