qontract-reconcile 0.10.1rc617__py3-none-any.whl → 0.10.1rc619__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.1rc617
3
+ Version: 0.10.1rc619
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
@@ -52,7 +52,7 @@ reconcile/mr_client_gateway.py,sha256=WhjMd-sIXDFCV8-rt8CEjurJ5OYB1pOD0K3o0tZRXQ
52
52
  reconcile/ocm_additional_routers.py,sha256=KfcFDVbNoc6n5dHWjYdAf1_DiVqVG6Tw23WLKoV8cdg,3306
53
53
  reconcile/ocm_addons.py,sha256=qqAyqRBRbdZQvAcjb-QlSVyRAyQBZk6iVlgnI4jyi7s,3353
54
54
  reconcile/ocm_addons_upgrade_tests_trigger.py,sha256=L1ktYynIR7pmHiYtdCTdLGJRKX72B54KUAuPLOccXzo,3995
55
- reconcile/ocm_aws_infrastructure_access.py,sha256=iq6Rj5SgF7yIMvBhukTuy-KcrFsvLs1ATG6-dyiArqY,6960
55
+ reconcile/ocm_aws_infrastructure_access.py,sha256=zZZc5weJ9lheiUre8ZtGWwLL_BXm_XmGwqlgoo2QNTo,7081
56
56
  reconcile/ocm_clusters.py,sha256=YWfBF25E55Odm0L3dXnqRbC_bDuYIsBPg4j6DEpWCGw,16703
57
57
  reconcile/ocm_external_configuration_labels.py,sha256=imEpDv1RBpCSj8tHDv0R76hmNCFtcUzVNgS1yOVl8vs,3870
58
58
  reconcile/ocm_github_idp.py,sha256=glwXMsIBcl38-OmDDQCpe0YoLLXfoRgVQmqwXMEXjds,3946
@@ -557,7 +557,7 @@ reconcile/utils/elasticsearch_exceptions.py,sha256=UY5Z3y2hw7T73sPJ6dHmUybegiIop
557
557
  reconcile/utils/environ.py,sha256=VnW3zp6Un_UJn5BU4FU8RfhuqtZp0s-VeuuHnqC_WcQ,515
558
558
  reconcile/utils/exceptions.py,sha256=DwfnWUpVOotpP79RWZ2pycmG6nKCL00RBIeZLYkQPW4,635
559
559
  reconcile/utils/expiration.py,sha256=BXwKE50sNIV-Lszke97fxitNkLxYszoOLW1LBgp_yqg,1246
560
- reconcile/utils/extended_early_exit.py,sha256=N3IdktcH2iSKwIbOu54tGJvY-R2tkYkQ-p5NeH3WDpk,6723
560
+ reconcile/utils/extended_early_exit.py,sha256=QSktrmfw37zSRMNk930tDbQsVeKxaPPPD43e79DGwZw,6754
561
561
  reconcile/utils/external_resource_spec.py,sha256=IRY8MCsyWKzt-Qj_hXiFKgkCvZu6VVyj6IYtqEb05BA,6618
562
562
  reconcile/utils/external_resources.py,sha256=a2CkJ3KLociYBnc_9F2VWfZGWMhzDl6fDNhwo2U-MWU,7501
563
563
  reconcile/utils/filtering.py,sha256=zZnHH0u0SaTDyzuFXZ_mREURGLvjEqQIQy4z-7QBVlc,419
@@ -649,7 +649,7 @@ reconcile/utils/mr/__init__.py,sha256=JQS8xmLZdG4TgjAFZp2ltuV9c1sDFHIHJmpn1bkY9r
649
649
  reconcile/utils/mr/app_interface_reporter.py,sha256=6Kpg93V9FvcOke9Jimkva359MQ-ZyBIkUpf8QIA6-to,1793
650
650
  reconcile/utils/mr/aws_access.py,sha256=w-UJutB_OfBJOvr-gsPzhtBPkDfKcNZZWGGuI9cN3HI,2605
651
651
  reconcile/utils/mr/base.py,sha256=4Wah3Eg03OzVq503uzUv-HxV_0nMh6bz2ro1JejKv9k,7365
652
- reconcile/utils/mr/clusters_updates.py,sha256=gOCzcUyVV5yVNp2CbvGaPH1leSVlYlSCfQAiv70_K_k,2233
652
+ reconcile/utils/mr/clusters_updates.py,sha256=pcusPAwRUkvyk_-bixsRNTzSvpTLypJ1kflq5UEVgcM,2271
653
653
  reconcile/utils/mr/glitchtip_access_reporter.py,sha256=dTv6FRpLnR2Itxw0oZ-ShKp8hMlrP2O6LyeAXmTv2V4,5045
654
654
  reconcile/utils/mr/labels.py,sha256=RssIgQcIgWmxM89I3ulkLRa0VA_r7X-sWRn2hZWGGPU,794
655
655
  reconcile/utils/mr/notificator.py,sha256=2Xyg5Xh3xFQITdTmZ8Nry5qe0uC_w_On4uMPdlN5Bl4,2998
@@ -714,8 +714,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
714
714
  tools/test/test_qontract_cli.py,sha256=OvalpVRfY4pNmpMaWHHYqBjV68b1eGQjX8SCyTAXb1w,3501
715
715
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
716
716
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
717
- qontract_reconcile-0.10.1rc617.dist-info/METADATA,sha256=mAOtBt-c6TFLZ1D8lqVPM8Jm084k8DldpI1jF1aNwjk,2382
718
- qontract_reconcile-0.10.1rc617.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
719
- qontract_reconcile-0.10.1rc617.dist-info/entry_points.txt,sha256=rIxI5zWtHNlfpDeq1a7pZXAPoqf7HG32KMTN3MeWK_8,429
720
- qontract_reconcile-0.10.1rc617.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
721
- qontract_reconcile-0.10.1rc617.dist-info/RECORD,,
717
+ qontract_reconcile-0.10.1rc619.dist-info/METADATA,sha256=2yJKUZaT3K1sGAFnODL9gmIb7fdaE3OUR0J03J_n4s0,2382
718
+ qontract_reconcile-0.10.1rc619.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
719
+ qontract_reconcile-0.10.1rc619.dist-info/entry_points.txt,sha256=rIxI5zWtHNlfpDeq1a7pZXAPoqf7HG32KMTN3MeWK_8,429
720
+ qontract_reconcile-0.10.1rc619.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
721
+ qontract_reconcile-0.10.1rc619.dist-info/RECORD,,
@@ -200,3 +200,7 @@ def run(dry_run):
200
200
  act(
201
201
  dry_run, ocm_map, current_state, current_failed, desired_state, current_deleting
202
202
  )
203
+
204
+
205
+ def early_exit_desired_state(*args: Any, **kwargs: Any) -> dict[str, Any]:
206
+ return {"state": fetch_desired_state()}
@@ -100,13 +100,13 @@ def log_stream_handler(
100
100
  :param logger: A logger
101
101
  :return: A stream generator
102
102
  """
103
- log_stream = StringIO()
104
- log_handler = logging.StreamHandler(log_stream)
105
- logger.addHandler(log_handler)
106
- try:
107
- yield log_stream
108
- finally:
109
- logger.removeHandler(log_handler)
103
+ with StringIO() as log_stream:
104
+ log_handler = logging.StreamHandler(log_stream)
105
+ logger.addHandler(log_handler)
106
+ try:
107
+ yield log_stream
108
+ finally:
109
+ logger.removeHandler(log_handler)
110
110
 
111
111
 
112
112
  def _log_cached_log_output(
@@ -57,15 +57,16 @@ class CreateClustersUpdates(MergeRequestBase):
57
57
  # content.update(cluster_updates) :(
58
58
  content.update(cluster_updates["root"])
59
59
 
60
- new_content = StringIO()
61
- yaml.dump(content, new_content)
60
+ with StringIO() as stream:
61
+ yaml.dump(content, stream)
62
+ new_content = stream.getvalue()
62
63
 
63
64
  msg = f"update cluster {cluster_name} spec fields"
64
65
  gitlab_cli.update_file(
65
66
  branch_name=self.branch,
66
67
  file_path=cluster_path,
67
68
  commit_message=msg,
68
- content=new_content.getvalue(),
69
+ content=new_content,
69
70
  )
70
71
 
71
72
  if not changes: