qontract-reconcile 0.10.1rc1130__py3-none-any.whl → 0.10.1rc1132__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.1rc1130
3
+ Version: 0.10.1rc1132
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
@@ -140,7 +140,7 @@ reconcile/aus/version_gates/ocp_gate_handler.py,sha256=RW1ppDaCZXVegV9AzzqYXxDUu
140
140
  reconcile/aus/version_gates/sts_version_gate_handler.py,sha256=swwwz0YyvrEBf_InqrRRBCt2QzHYNvvq8jz9aYwElh4,3663
141
141
  reconcile/aws_account_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
142
142
  reconcile/aws_account_manager/integration.py,sha256=WOE_mi45pvJW4TNKh4mCGSViJiElH--T4Wg0CLMYxpY,14988
143
- reconcile/aws_account_manager/merge_request_manager.py,sha256=eLRf7D6j9sPvJh3xpYRkrckleGrZcr6J0aED7xmNbXI,3815
143
+ reconcile/aws_account_manager/merge_request_manager.py,sha256=fz9s1VrBGHi0MdUR9D1Pqo7Q2lHlzbgzgYEE4kEYm9s,3950
144
144
  reconcile/aws_account_manager/metrics.py,sha256=YB10ea4kIGwJfs5N14RF-RoXPb-QQWaDBz1jLZ3YWE0,917
145
145
  reconcile/aws_account_manager/reconciler.py,sha256=8mwwcWVVNoUzmttzxgnLyePqN823v1t_dQCNCrx1mG0,15035
146
146
  reconcile/aws_account_manager/utils.py,sha256=iYPPOtbZ7FiKkz9v5f1YXRIHw5YFOtSavUkF8oMwfJY,1439
@@ -188,7 +188,7 @@ reconcile/dynatrace_token_provider/model.py,sha256=gkpqo5rRRueBXnIMjp4EEHqBUBuU6
188
188
  reconcile/dynatrace_token_provider/ocm.py,sha256=MwYCZIxW4f-1jzFTxxN__sity6S8O7bbKUdyTFEVO7U,4325
189
189
  reconcile/dynatrace_token_provider/validate.py,sha256=40_9QmHoB3-KBc0k_0D4QO00PpNNPS-gU9Z6cIcWga8,1920
190
190
  reconcile/endpoints_discovery/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
191
- reconcile/endpoints_discovery/integration.py,sha256=q01DJgCv1YiDY-VUWDfQ5kfGm67BUhP-YP7c0JQObj8,12333
191
+ reconcile/endpoints_discovery/integration.py,sha256=V6uriGAM4Ki9bjTpM2kmRh1UVcyIIFdJK4w0YsorUo8,12704
192
192
  reconcile/endpoints_discovery/merge_request.py,sha256=_yLb4tnvoZMCko8rta2C_CvOInJa9pa3HzSmHNtjgGU,2978
193
193
  reconcile/endpoints_discovery/merge_request_manager.py,sha256=wUMsumxv8RnWaRattax4HfoRlhtVzmgro3GiJJ1C4Vc,6392
194
194
  reconcile/external_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -871,8 +871,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
871
871
  tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
872
872
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
873
873
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
874
- qontract_reconcile-0.10.1rc1130.dist-info/METADATA,sha256=S4CrU7hnXRPr8ACKCIDkMZMpEQMGPOqLx4p5CRGhV_8,2213
875
- qontract_reconcile-0.10.1rc1130.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
876
- qontract_reconcile-0.10.1rc1130.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
877
- qontract_reconcile-0.10.1rc1130.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
878
- qontract_reconcile-0.10.1rc1130.dist-info/RECORD,,
874
+ qontract_reconcile-0.10.1rc1132.dist-info/METADATA,sha256=lELtTQsA2H3TPWaNDegyi61VlMiwzJkt9pEYK0BdARA,2213
875
+ qontract_reconcile-0.10.1rc1132.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
876
+ qontract_reconcile-0.10.1rc1132.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
877
+ qontract_reconcile-0.10.1rc1132.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
878
+ qontract_reconcile-0.10.1rc1132.dist-info/RECORD,,
@@ -88,10 +88,12 @@ class MergeRequestManager:
88
88
  self._vcs.get_file_content_from_app_interface_master(
89
89
  file_path=account_tmpl_file_path
90
90
  )
91
- # File already exists
92
- raise FileExistsError(
93
- f"File {account_tmpl_file_path} already exists in the repository"
91
+ # File already exists. nothing to do.
92
+ logging.debug(
93
+ "The template collection file %s already exists. This may happen if the MR has been merged but template-renderer isn't running yet.",
94
+ account_tmpl_file_path,
94
95
  )
96
+ return
95
97
  except GitlabGetError as e:
96
98
  if e.response_code != 404:
97
99
  raise e
@@ -1,4 +1,5 @@
1
1
  import logging
2
+ from collections import defaultdict
2
3
  from collections.abc import Callable, Iterable
3
4
  from typing import TypedDict
4
5
 
@@ -43,7 +44,7 @@ from reconcile.utils.unleash import get_feature_toggle_state
43
44
  from reconcile.utils.vcs import VCS
44
45
 
45
46
  QONTRACT_INTEGRATION = "endpoints-discovery"
46
- QONTRACT_INTEGRATION_VERSION = make_semver(1, 0, 0)
47
+ QONTRACT_INTEGRATION_VERSION = make_semver(1, 0, 1)
47
48
 
48
49
 
49
50
  class EndpointsDiscoveryIntegrationParams(PydanticRunParams):
@@ -137,13 +138,21 @@ class EndpointsDiscoveryIntegration(
137
138
  )
138
139
  return []
139
140
 
141
+ routes = defaultdict(list)
142
+ for item in oc.get_items(kind="Route", namespace=namespace.name):
143
+ tls = bool(item["spec"].get("tls"))
144
+ host = item["spec"]["host"]
145
+ # group all routes with the same hostname/tls
146
+ routes[(host, tls)].append(item["metadata"]["name"])
147
+
148
+ # merge all routes with the same hostname into one and combine the names
140
149
  return [
141
150
  Route(
142
- name=item["metadata"]["name"],
143
- host=item["spec"]["host"],
144
- tls=bool(item["spec"].get("tls")),
151
+ name="|".join(sorted(names)),
152
+ host=host,
153
+ tls=tls,
145
154
  )
146
- for item in oc.get_items(kind="Route", namespace=namespace.name)
155
+ for (host, tls), names in routes.items()
147
156
  ]
148
157
 
149
158
  def get_endpoint_changes(