qontract-reconcile 0.10.2.dev79__py3-none-any.whl → 0.10.2.dev80__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.4
2
2
  Name: qontract-reconcile
3
- Version: 0.10.2.dev79
3
+ Version: 0.10.2.dev80
4
4
  Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
5
5
  Project-URL: homepage, https://github.com/app-sre/qontract-reconcile
6
6
  Project-URL: repository, https://github.com/app-sre/qontract-reconcile
@@ -208,8 +208,8 @@ reconcile/external_resources/secrets_sync.py,sha256=50fK4fzgSz-K8uy5_DQQWA_ju_rT
208
208
  reconcile/external_resources/state.py,sha256=gF3ACdl7YiUlbQ4uEGrD6i_Txxqr6mT9f8IFlTQ-8dY,13176
209
209
  reconcile/fleet_labeler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
210
210
  reconcile/fleet_labeler/dependencies.py,sha256=Ta-SLnrHRN4OBAmhE_mTk1P7y1X7AInIiQsIYaY6hY0,2910
211
- reconcile/fleet_labeler/integration.py,sha256=jlgHR9U95x4paAckyqlD0FlFn1b-RhBJNYT4htKkrlk,7262
212
- reconcile/fleet_labeler/merge_request.py,sha256=Mg_ueGj3ZMYIOT6yz2nb8jlpoR1V7fSkCIbljCtnmCc,1137
211
+ reconcile/fleet_labeler/integration.py,sha256=gDK97QvsJ5IEo1t1ci4yxTRM7VSDj4uP9l30zHi_rWo,7700
212
+ reconcile/fleet_labeler/merge_request.py,sha256=VA_XSIob4LWYb02dRUr9coXjIa8_0prObI1v5Gqi_mY,1513
213
213
  reconcile/fleet_labeler/meta.py,sha256=DF7O4T9wvQ7-xTWXvuNw1OG_F0SBmRrjFBtVy9wWh9U,146
214
214
  reconcile/fleet_labeler/metrics.py,sha256=wx9BmXLsN67m-aSsf81iB7Ehj5SzUsS2WB75isUReZg,662
215
215
  reconcile/fleet_labeler/ocm.py,sha256=GGsz-bq1g8BJVVMCfI2kSwZCyngbQoZ3i3k8fO608KA,2506
@@ -786,7 +786,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
786
786
  tools/saas_promotion_state/saas_promotion_state.py,sha256=UfwwRLS5Ya4_Nh1w5n1dvoYtchQvYE9yj1VANt2IKqI,3925
787
787
  tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
788
788
  tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y,894
789
- qontract_reconcile-0.10.2.dev79.dist-info/METADATA,sha256=60Q1QohZz4pk4aCZ-CPMJbA4Q0YnfgOnLVWp7hlfKZc,24565
790
- qontract_reconcile-0.10.2.dev79.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
791
- qontract_reconcile-0.10.2.dev79.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
792
- qontract_reconcile-0.10.2.dev79.dist-info/RECORD,,
789
+ qontract_reconcile-0.10.2.dev80.dist-info/METADATA,sha256=y3d1ijPuxlumADt6r3Yu1YqzS50B3kC5hlk0R5Nn1w8,24565
790
+ qontract_reconcile-0.10.2.dev80.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
791
+ qontract_reconcile-0.10.2.dev80.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
792
+ qontract_reconcile-0.10.2.dev80.dist-info/RECORD,,
@@ -180,6 +180,15 @@ class FleetLabelerIntegration(QontractReconcileIntegration[NoParams]):
180
180
  if not (cluster_ids_to_delete or clusters_to_add):
181
181
  return
182
182
 
183
+ for yaml_cluster in clusters_to_add:
184
+ logging.info(
185
+ f"[{spec.name}] Adding cluster '{yaml_cluster.name}' with id '{yaml_cluster.cluster_id}' to inventory with default labels {yaml_cluster.subscription_labels_content}."
186
+ )
187
+ for cluster_id in cluster_ids_to_delete:
188
+ logging.info(
189
+ f"[{spec.name}] Deleting cluster {cluster_id=} from inventory."
190
+ )
191
+
183
192
  current_content = vcs.get_file_content_from_main(path=spec.path)
184
193
  # Lets make sure we are deterministic when adding new clusters
185
194
  # The overhead is neglectable and it makes testing easier
@@ -17,6 +17,9 @@ class YamlCluster(BaseModel):
17
17
 
18
18
 
19
19
  class FleetLabelerUpdates(MergeRequestBase):
20
+ # Note, this name is used for the branch name that is being created.
21
+ name = "fleet_labeler_updates"
22
+
20
23
  def __init__(
21
24
  self,
22
25
  path: str,
@@ -24,7 +27,6 @@ class FleetLabelerUpdates(MergeRequestBase):
24
27
  ):
25
28
  self._path = path
26
29
  self._content = content
27
- self._title = f"[Fleet Labeler] Update cluster inventory for {path}"
28
30
 
29
31
  super().__init__()
30
32
 
@@ -32,11 +34,17 @@ class FleetLabelerUpdates(MergeRequestBase):
32
34
 
33
35
  @property
34
36
  def title(self) -> str:
35
- return self._title
37
+ return f"[Fleet Labeler] Update cluster inventory for {self._path}"
36
38
 
37
39
  @property
38
40
  def description(self) -> str:
39
- return self._title
41
+ return f"""
42
+ This is an automatically generated MR by the [fleet-labeler](https://github.com/app-sre/qontract-reconcile/tree/master/reconcile/fleet_labeler) integration.
43
+
44
+ This MR updates the cluster inventory for the fleet label spec defined at {self._path}.
45
+
46
+ Please do not manually change anything in this MR.
47
+ """
40
48
 
41
49
  def process(self, gitlab_cli: GitLabApi) -> None:
42
50
  msg = "update cluster inventory"