qontract-reconcile 0.10.1rc747__py3-none-any.whl → 0.10.1rc749__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.
- {qontract_reconcile-0.10.1rc747.dist-info → qontract_reconcile-0.10.1rc749.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc747.dist-info → qontract_reconcile-0.10.1rc749.dist-info}/RECORD +9 -9
- reconcile/aus/base.py +13 -4
- reconcile/utils/ocm/addons.py +37 -28
- reconcile/utils/ocm/base.py +11 -0
- reconcile/utils/vcs.py +6 -1
- {qontract_reconcile-0.10.1rc747.dist-info → qontract_reconcile-0.10.1rc749.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc747.dist-info → qontract_reconcile-0.10.1rc749.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc747.dist-info → qontract_reconcile-0.10.1rc749.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc747.dist-info → qontract_reconcile-0.10.1rc749.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.
|
3
|
+
Version: 0.10.1rc749
|
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
|
{qontract_reconcile-0.10.1rc747.dist-info → qontract_reconcile-0.10.1rc749.dist-info}/RECORD
RENAMED
@@ -122,7 +122,7 @@ reconcile/vpc_peerings_validator.py,sha256=Kv22HJVlTW9l9GB2eXwjPWqdDbr_VuvQBNPtt
|
|
122
122
|
reconcile/aus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
123
123
|
reconcile/aus/advanced_upgrade_service.py,sha256=MPqcWpq1QeYzBsB8rtTlo102h_cR_q83oOYtWAncuAk,22391
|
124
124
|
reconcile/aus/aus_label_source.py,sha256=qoP8Fgxuu1tCuhG6ixCWve7Ll-KD6a79E2uLAmC0ifw,4184
|
125
|
-
reconcile/aus/base.py,sha256=
|
125
|
+
reconcile/aus/base.py,sha256=RqFUwH2xiWFN1U6plp-UG77iFkK60b8YKODsD4YWWyc,49880
|
126
126
|
reconcile/aus/cluster_version_data.py,sha256=j4UyEBi5mQuvPq5Lo7a_L_0blxvH790wJV07uAiikFU,7126
|
127
127
|
reconcile/aus/healthchecks.py,sha256=S8_KPn_zFiOo_wf5XlVmz-I3tUDYAim3EGSqiSPMvLQ,2707
|
128
128
|
reconcile/aus/metrics.py,sha256=nKT4m2zGT-QOMR0c-z-npVNKWsNMubzdffpU_f9n4II,3927
|
@@ -664,7 +664,7 @@ reconcile/utils/throughput.py,sha256=iP4UWAe2LVhDo69mPPmgo9nQ7RxHD6_GS8MZe-aSiuM
|
|
664
664
|
reconcile/utils/unleash.py,sha256=1D56CsZfE3ShDtN3IErE1T2eeIwNmxhK-yYbCotJ99E,3601
|
665
665
|
reconcile/utils/vault.py,sha256=S0eHqvZ9N3fya1E8YDaUffEvLk_fdtpzL4rvWn6f828,14991
|
666
666
|
reconcile/utils/vaultsecretref.py,sha256=3Ed2uBy36TzSvL0B-l4FoWQqB2SbBKDKEuUPIO608Bo,931
|
667
|
-
reconcile/utils/vcs.py,sha256=
|
667
|
+
reconcile/utils/vcs.py,sha256=iiAWQXNftKIRoakXEOPT6ubB_ybSuInIQ6jcMxa_NKk,8558
|
668
668
|
reconcile/utils/acs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
669
669
|
reconcile/utils/acs/base.py,sha256=kjcxLGIMe8oLNFOxZ_bDcClFqGCL7Auwug5is0yNGbw,2555
|
670
670
|
reconcile/utils/acs/notifiers.py,sha256=2n5blP9N1FdGLZuy3do9bpjd8NKg88kmLNNqhAGn8w4,5013
|
@@ -715,8 +715,8 @@ reconcile/utils/mr/ocm_update_recommended_version.py,sha256=p_aVP0TGrlKk9WBwgQnY
|
|
715
715
|
reconcile/utils/mr/ocm_upgrade_scheduler_org_updates.py,sha256=RzEKRT_BhvB2ud9pyNFZ1cNZFmDGBUah9vjpP0y9f9w,2810
|
716
716
|
reconcile/utils/mr/user_maintenance.py,sha256=cHPBn8zrReWLHalyk-EFdkFJe9zjVjRoZhT4t2zZfGE,3956
|
717
717
|
reconcile/utils/ocm/__init__.py,sha256=xv7CJp7K9LCQfa4gL_W0MMCOD1P4qOy8t5aZj1xXNUE,808
|
718
|
-
reconcile/utils/ocm/addons.py,sha256=
|
719
|
-
reconcile/utils/ocm/base.py,sha256=
|
718
|
+
reconcile/utils/ocm/addons.py,sha256=IHlqOO12TAdYwwU6Oedz3ussF1kELj9EI5GxPP6LKi8,7376
|
719
|
+
reconcile/utils/ocm/base.py,sha256=sdcINGBy1FlotY0MZuVC--Yn3zcYDn_N33ownMD8SQE,14030
|
720
720
|
reconcile/utils/ocm/cluster_groups.py,sha256=F8oqVqN_4QUnGL0K61zZhoYIzJeP57EcmZpwmoV0mr4,1751
|
721
721
|
reconcile/utils/ocm/clusters.py,sha256=Nw9m-jgN3GHHCh6w9UOBbMV4rtS24_-Ep09jAWQ-_fE,7653
|
722
722
|
reconcile/utils/ocm/identity_providers.py,sha256=dKed09N8iWmn39tI_MpwgVe47x23eLsknGbjMUxtwr4,2175
|
@@ -778,8 +778,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
|
|
778
778
|
tools/test/test_qontract_cli.py,sha256=w2l4BHB09k1d-BGJ1jBUNCqDv7zkqYrMHojQXg-21kQ,4155
|
779
779
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
780
780
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
781
|
-
qontract_reconcile-0.10.
|
782
|
-
qontract_reconcile-0.10.
|
783
|
-
qontract_reconcile-0.10.
|
784
|
-
qontract_reconcile-0.10.
|
785
|
-
qontract_reconcile-0.10.
|
781
|
+
qontract_reconcile-0.10.1rc749.dist-info/METADATA,sha256=GRynYliT4W9vldAPG4g1WPRh010gG9Zk7BAX643Wico,2382
|
782
|
+
qontract_reconcile-0.10.1rc749.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
783
|
+
qontract_reconcile-0.10.1rc749.dist-info/entry_points.txt,sha256=rIxI5zWtHNlfpDeq1a7pZXAPoqf7HG32KMTN3MeWK_8,429
|
784
|
+
qontract_reconcile-0.10.1rc749.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
785
|
+
qontract_reconcile-0.10.1rc749.dist-info/RECORD,,
|
reconcile/aus/base.py
CHANGED
@@ -587,13 +587,22 @@ def fetch_current_state(
|
|
587
587
|
for spec in org_upgrade_spec.specs:
|
588
588
|
if addons and isinstance(spec, ClusterAddonUpgradeSpec):
|
589
589
|
addon_spec = cast(ClusterAddonUpgradeSpec, spec)
|
590
|
-
|
590
|
+
addon_upgrade_policies = addon_service.get_addon_upgrade_policies(
|
591
591
|
ocm_api, spec.cluster.id, addon_id=addon_spec.addon.addon.id
|
592
592
|
)
|
593
|
-
for
|
594
|
-
upgrade_policy["cluster"] = spec.cluster
|
593
|
+
for addon_upgrade_policy in addon_upgrade_policies:
|
595
594
|
current_state.append(
|
596
|
-
AddonUpgradePolicy(
|
595
|
+
AddonUpgradePolicy(
|
596
|
+
id=addon_upgrade_policy.id,
|
597
|
+
addon_id=addon_spec.addon.addon.id,
|
598
|
+
cluster=spec.cluster,
|
599
|
+
next_run=addon_upgrade_policy.next_run,
|
600
|
+
schedule=addon_upgrade_policy.schedule,
|
601
|
+
schedule_type=addon_upgrade_policy.schedule_type,
|
602
|
+
version=addon_upgrade_policy.version,
|
603
|
+
state=addon_upgrade_policy.state,
|
604
|
+
addon_service=addon_service,
|
605
|
+
)
|
597
606
|
)
|
598
607
|
elif spec.cluster.is_rosa_hypershift():
|
599
608
|
upgrade_policies = get_control_plane_upgrade_policies(
|
reconcile/utils/ocm/addons.py
CHANGED
@@ -3,18 +3,12 @@ from typing import (
|
|
3
3
|
Optional,
|
4
4
|
)
|
5
5
|
|
6
|
-
from reconcile.utils.ocm.base import
|
6
|
+
from reconcile.utils.ocm.base import (
|
7
|
+
OCMAddonInstallation,
|
8
|
+
OCMAddonUpgradePolicy,
|
9
|
+
)
|
7
10
|
from reconcile.utils.ocm_base_client import OCMBaseClient
|
8
11
|
|
9
|
-
ADDON_UPGRADE_POLICY_DESIRED_KEYS = {
|
10
|
-
"id",
|
11
|
-
"addon_id",
|
12
|
-
"schedule_type",
|
13
|
-
"schedule",
|
14
|
-
"next_run",
|
15
|
-
"version",
|
16
|
-
}
|
17
|
-
|
18
12
|
|
19
13
|
class AddonService:
|
20
14
|
def get_addon_latest_versions(self, ocm_api: OCMBaseClient) -> dict[str, str]:
|
@@ -65,7 +59,7 @@ class AddonService:
|
|
65
59
|
|
66
60
|
def get_addon_upgrade_policies(
|
67
61
|
self, ocm_api: OCMBaseClient, cluster_id: str, addon_id: Optional[str] = None
|
68
|
-
) -> list[
|
62
|
+
) -> list[OCMAddonUpgradePolicy]:
|
69
63
|
raise NotImplementedError()
|
70
64
|
|
71
65
|
def create_addon_upgrade_policy(
|
@@ -95,23 +89,30 @@ class AddonServiceV1(AddonService):
|
|
95
89
|
|
96
90
|
def get_addon_upgrade_policies(
|
97
91
|
self, ocm_api: OCMBaseClient, cluster_id: str, addon_id: Optional[str] = None
|
98
|
-
) -> list[
|
99
|
-
results: list[
|
92
|
+
) -> list[OCMAddonUpgradePolicy]:
|
93
|
+
results: list[OCMAddonUpgradePolicy] = []
|
100
94
|
|
101
95
|
for policy in ocm_api.get_paginated(
|
102
96
|
f"{self.addon_base_api_path()}/clusters/{cluster_id}/addon_upgrade_policies"
|
103
97
|
):
|
104
98
|
if addon_id and policy["addon_id"] != addon_id:
|
105
99
|
continue
|
106
|
-
|
107
|
-
|
108
|
-
for k, v in policy.items()
|
109
|
-
if k in ADDON_UPGRADE_POLICY_DESIRED_KEYS
|
110
|
-
}
|
111
|
-
policy_data["state"] = self._get_addon_upgrade_policy_state(
|
100
|
+
|
101
|
+
state = self._get_addon_upgrade_policy_state(
|
112
102
|
ocm_api, cluster_id, policy["id"]
|
113
103
|
)
|
114
|
-
results.append(
|
104
|
+
results.append(
|
105
|
+
OCMAddonUpgradePolicy(
|
106
|
+
id=policy["id"],
|
107
|
+
addon_id=addon_id,
|
108
|
+
cluster_id=cluster_id,
|
109
|
+
schedule_type=policy["schedule_type"],
|
110
|
+
schedule=policy.get("schedule"),
|
111
|
+
next_run=policy.get("next_run"),
|
112
|
+
version=policy["version"],
|
113
|
+
state=state,
|
114
|
+
)
|
115
|
+
)
|
115
116
|
|
116
117
|
return results
|
117
118
|
|
@@ -171,20 +172,28 @@ class AddonServiceV2(AddonService):
|
|
171
172
|
|
172
173
|
def get_addon_upgrade_policies(
|
173
174
|
self, ocm_api: OCMBaseClient, cluster_id: str, addon_id: Optional[str] = None
|
174
|
-
) -> list[
|
175
|
-
results: list[
|
175
|
+
) -> list[OCMAddonUpgradePolicy]:
|
176
|
+
results: list[OCMAddonUpgradePolicy] = []
|
176
177
|
|
177
178
|
for policy in ocm_api.get_paginated(
|
178
179
|
f"{self.addon_base_api_path()}/clusters/{cluster_id}/upgrade_plans"
|
179
180
|
):
|
180
181
|
if addon_id and policy["addon_id"] != addon_id:
|
181
182
|
continue
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
183
|
+
|
184
|
+
results.append(
|
185
|
+
OCMAddonUpgradePolicy(
|
186
|
+
id=policy["id"],
|
187
|
+
addon_id=addon_id,
|
188
|
+
cluster_id=cluster_id,
|
189
|
+
schedule_type=policy["type"],
|
190
|
+
schedule=policy.get("schedule"),
|
191
|
+
next_run=policy.get("next_run"),
|
192
|
+
version=policy["version"],
|
193
|
+
state=policy.get("state"),
|
194
|
+
addon_service=self,
|
195
|
+
)
|
196
|
+
)
|
188
197
|
|
189
198
|
return results
|
190
199
|
|
reconcile/utils/ocm/base.py
CHANGED
@@ -575,6 +575,17 @@ class OCMOIdentityProviderOidc(OCMOIdentityProvider):
|
|
575
575
|
return self.name == other.name and self.open_id == other.open_id
|
576
576
|
|
577
577
|
|
578
|
+
class OCMAddonUpgradePolicy(BaseModel):
|
579
|
+
id: str
|
580
|
+
addon_id: str
|
581
|
+
cluster_id: str
|
582
|
+
next_run: Optional[str]
|
583
|
+
schedule: Optional[str]
|
584
|
+
schedule_type: str
|
585
|
+
version: str
|
586
|
+
state: Optional[str]
|
587
|
+
|
588
|
+
|
578
589
|
def build_label_container(
|
579
590
|
*label_iterables: Optional[Iterable[OCMLabel]],
|
580
591
|
) -> LabelContainer:
|
reconcile/utils/vcs.py
CHANGED
@@ -216,8 +216,13 @@ class VCS:
|
|
216
216
|
self._app_interface_api.close(mr)
|
217
217
|
|
218
218
|
def get_file_content_from_app_interface_master(self, file_path: str) -> str:
|
219
|
+
file_path = (
|
220
|
+
f"data/{file_path.lstrip('/')}"
|
221
|
+
if not file_path.startswith("data")
|
222
|
+
else file_path
|
223
|
+
)
|
219
224
|
return self._app_interface_api.project.files.get(
|
220
|
-
file_path=
|
225
|
+
file_path=file_path, ref="master"
|
221
226
|
).decode()
|
222
227
|
|
223
228
|
def get_open_app_interface_merge_requests(self) -> list[ProjectMergeRequest]:
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc747.dist-info → qontract_reconcile-0.10.1rc749.dist-info}/top_level.txt
RENAMED
File without changes
|