qontract-reconcile 0.10.2.dev130__py3-none-any.whl → 0.10.2.dev132__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.2.dev130.dist-info → qontract_reconcile-0.10.2.dev132.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.2.dev130.dist-info → qontract_reconcile-0.10.2.dev132.dist-info}/RECORD +15 -15
- reconcile/aus/advanced_upgrade_service.py +5 -0
- reconcile/aus/aus_label_source.py +6 -2
- reconcile/aus/base.py +59 -11
- reconcile/aus/models.py +6 -1
- reconcile/gql_definitions/advanced_upgrade_service/aus_clusters.py +1 -0
- reconcile/gql_definitions/advanced_upgrade_service/aus_organization.py +1 -0
- reconcile/gql_definitions/common/clusters.py +2 -0
- reconcile/gql_definitions/fragments/aus_organization.py +1 -0
- reconcile/gql_definitions/introspection.json +12 -0
- reconcile/queries.py +2 -0
- tools/cli_commands/erv2.py +3 -1
- {qontract_reconcile-0.10.2.dev130.dist-info → qontract_reconcile-0.10.2.dev132.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.2.dev130.dist-info → qontract_reconcile-0.10.2.dev132.dist-info}/entry_points.txt +0 -0
{qontract_reconcile-0.10.2.dev130.dist-info → qontract_reconcile-0.10.2.dev132.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.2.
|
3
|
+
Version: 0.10.2.dev132
|
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
|
{qontract_reconcile-0.10.2.dev130.dist-info → qontract_reconcile-0.10.2.dev132.dist-info}/RECORD
RENAMED
@@ -94,7 +94,7 @@ reconcile/quay_mirror.py,sha256=0KtQFwrvMNtlsPJ9F_-ICaVIjgIUjFxqipvAPcvyg3Q,1533
|
|
94
94
|
reconcile/quay_mirror_org.py,sha256=tXKuF6JtmaNRwu8_g_65U_Vpd6sFBYeXmJA-flVhylE,10764
|
95
95
|
reconcile/quay_permissions.py,sha256=9KOutS1w4RFQqkvMSy54VtsKNx56-phzP6yI_rEW-B8,4244
|
96
96
|
reconcile/quay_repos.py,sha256=cuEYG0HUe0ut5yvLdEwOF5-CmccpXQHRb_wDazvDrvQ,6895
|
97
|
-
reconcile/queries.py,sha256=
|
97
|
+
reconcile/queries.py,sha256=ICAkBP8atJEZlPCniMJljb2hJAZdvSZdT1-ciLqVGl8,51560
|
98
98
|
reconcile/query_validator.py,sha256=MSh5pKLBksws4AqfuvT8nrIGucIbqX-IOzYyPYTLO7k,1491
|
99
99
|
reconcile/requests_sender.py,sha256=914iluuF4UVgG3VyxxtnHOu4yf6YKS2fIy6PViSsFTQ,3875
|
100
100
|
reconcile/resource_scraper.py,sha256=znXCHrU7YwPfKuxGBiUrV7T1tYtn4vlz9qmZlfy6Flg,2307
|
@@ -121,13 +121,13 @@ reconcile/terraform_vpc_peerings.py,sha256=0N7uxG6Afe2oNrUyw-apjV-fX2P9TbI5A3xjX
|
|
121
121
|
reconcile/vault_replication.py,sha256=YD70ROZXC1dYnUcS3q1WgnAoIDSdoZVdZsUGc5fanNU,17556
|
122
122
|
reconcile/vpc_peerings_validator.py,sha256=aESqrhm1tpkc2iqSL1UV5to_HjNgjRSffD0crb_q49g,7113
|
123
123
|
reconcile/aus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
124
|
-
reconcile/aus/advanced_upgrade_service.py,sha256=
|
125
|
-
reconcile/aus/aus_label_source.py,sha256=
|
126
|
-
reconcile/aus/base.py,sha256=
|
124
|
+
reconcile/aus/advanced_upgrade_service.py,sha256=lt684trHbKvVDLwwuNVz3Wu_MnytFSbS_7MZTIITh9k,23969
|
125
|
+
reconcile/aus/aus_label_source.py,sha256=o0S2f0qwcII_8nzhHZhRQ83gEZ1DrSXyO4xzSwLebuU,4382
|
126
|
+
reconcile/aus/base.py,sha256=K-CLPUDpaFSfFsf_UgcvaUPCgqTLTGkx_aoUH0VWhv8,50431
|
127
127
|
reconcile/aus/cluster_version_data.py,sha256=VZWbUEIbrDKO-sroMpQtiWCTqDraTMd8tssKV0HyTQ0,7140
|
128
128
|
reconcile/aus/healthchecks.py,sha256=jR9c-syh9impnkV0fd6XW3Bnk7iRN5zv8oCRYM-yIRY,2700
|
129
129
|
reconcile/aus/metrics.py,sha256=nKT4m2zGT-QOMR0c-z-npVNKWsNMubzdffpU_f9n4II,3927
|
130
|
-
reconcile/aus/models.py,sha256=
|
130
|
+
reconcile/aus/models.py,sha256=qLjWLDJe5PGXPPtJ5PI01IVEYaSGweu9dkAgf0ZM2hk,8297
|
131
131
|
reconcile/aus/node_pool_spec.py,sha256=FkMggklG-4BgQwud2Swp2m3AAAKzZmeaXgohl9uwxZ8,1138
|
132
132
|
reconcile/aus/ocm_addons_upgrade_scheduler_org.py,sha256=SHbFEEq9ETtkkuzBBaNuwSDze8fj6DWHeA_XNgOyTbo,10308
|
133
133
|
reconcile/aus/ocm_upgrade_scheduler.py,sha256=2uPn13y3QGCHLoKwCc1Z7q9wQsoQf_F1HATMYUbl53s,3695
|
@@ -227,14 +227,14 @@ reconcile/glitchtip_project_alerts/integration.py,sha256=BgMx-NyV9mTuv7Sotb2OioC
|
|
227
227
|
reconcile/glitchtip_project_dsn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
228
228
|
reconcile/glitchtip_project_dsn/integration.py,sha256=2iugub-kHYkHNK33n0v9_TeWonuxCPah_VkoTPvaajE,8077
|
229
229
|
reconcile/gql_definitions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
230
|
-
reconcile/gql_definitions/introspection.json,sha256=
|
230
|
+
reconcile/gql_definitions/introspection.json,sha256=mzkjTtBMjRDoC00njCLGylyb85atOvRRPzQo4GhKti8,2283808
|
231
231
|
reconcile/gql_definitions/acs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
232
232
|
reconcile/gql_definitions/acs/acs_instances.py,sha256=L91WW9LbhJbBSrECqShQpFtjoBOsmNIYLRpMbx1io5o,2181
|
233
233
|
reconcile/gql_definitions/acs/acs_policies.py,sha256=bN5i4mks10Z23KJSj7jqp966Osq2dps4d-sPH9gjxEA,7008
|
234
234
|
reconcile/gql_definitions/acs/acs_rbac.py,sha256=cZsIlCWliPQdQHgmBsIMx54fJNOtkdRXLzmOKZmJNHk,3009
|
235
235
|
reconcile/gql_definitions/advanced_upgrade_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
236
|
-
reconcile/gql_definitions/advanced_upgrade_service/aus_clusters.py,sha256=
|
237
|
-
reconcile/gql_definitions/advanced_upgrade_service/aus_organization.py,sha256=
|
236
|
+
reconcile/gql_definitions/advanced_upgrade_service/aus_clusters.py,sha256=230uwBoBaaVz686d_WNZT9eAw6BX2VpoQX0mKhf5UcM,4390
|
237
|
+
reconcile/gql_definitions/advanced_upgrade_service/aus_organization.py,sha256=9uWc_zpTrl06ysfbrkqZsIGuCoVTZONDyj0V2UkkX7o,3388
|
238
238
|
reconcile/gql_definitions/app_interface_metrics_exporter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
239
239
|
reconcile/gql_definitions/app_interface_metrics_exporter/onboarding_status.py,sha256=uVEEqU6YYmKsNTo6EWlFnoVmqha2rvBDx-wiD64VmG0,1679
|
240
240
|
reconcile/gql_definitions/app_sre_tekton_access_revalidation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -276,7 +276,7 @@ reconcile/gql_definitions/common/app_quay_repos_escalation_policies.py,sha256=ck
|
|
276
276
|
reconcile/gql_definitions/common/apps.py,sha256=lC7uZjyHAvJXhCDPJJ-dQJInBJkUCNZoe129XMa67wo,1868
|
277
277
|
reconcile/gql_definitions/common/aws_vpc_requests.py,sha256=2lpyy-QSfHPSTvV_zbnqzqUoFzVNl-CJDmoqd_zVSX4,2366
|
278
278
|
reconcile/gql_definitions/common/aws_vpcs.py,sha256=Dss9dQ3xagnz3Ltg1e9mtG2PAmQGBbUzKCmmzvuN28s,1892
|
279
|
-
reconcile/gql_definitions/common/clusters.py,sha256=
|
279
|
+
reconcile/gql_definitions/common/clusters.py,sha256=j646LA-vlHbA131OrCF13g8rPPrBPWL3PLrvqWLZs58,21979
|
280
280
|
reconcile/gql_definitions/common/clusters_minimal.py,sha256=JYrJV_aStmryiiGKyiXhj47qpF_8KilCqy-d9CofBCo,4635
|
281
281
|
reconcile/gql_definitions/common/clusters_with_dms.py,sha256=GJ53P8tgMLh1NfVkaV9_AmaqF9pNUqJZcDkcKzKzUy0,2242
|
282
282
|
reconcile/gql_definitions/common/clusters_with_peering.py,sha256=B1Hi3u6rZZsl4bDDPMLIcSRI5lNFuh29lPVVTOrRRpQ,11929
|
@@ -321,7 +321,7 @@ reconcile/gql_definitions/external_resources/fragments/external_resources_module
|
|
321
321
|
reconcile/gql_definitions/fleet_labeler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
322
322
|
reconcile/gql_definitions/fleet_labeler/fleet_labels.py,sha256=XPk1YFmiCtGlwrldxdABwYaT-wgZdTjpDFHmUnq6xcM,4349
|
323
323
|
reconcile/gql_definitions/fragments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
324
|
-
reconcile/gql_definitions/fragments/aus_organization.py,sha256=
|
324
|
+
reconcile/gql_definitions/fragments/aus_organization.py,sha256=21L_d35HCGbn-PaZSzIGzIVm3Wt-IPTdBzftxK5Y0h4,4850
|
325
325
|
reconcile/gql_definitions/fragments/aws_account_common.py,sha256=3-7ZAP6GSff7Z2Syz2VQCLY4IySqBOSVmceaRiVNQpw,2385
|
326
326
|
reconcile/gql_definitions/fragments/aws_account_managed.py,sha256=V_9pH0wVza2sPyq8ckkabNMYIRZt6VW4Nixw_jAxaMc,1892
|
327
327
|
reconcile/gql_definitions/fragments/aws_account_sso.py,sha256=ITR3PLz4Iq1SiWAoYGWPDuHJnAmTyZ0QQqs2Zsi8pxA,979
|
@@ -769,7 +769,7 @@ tools/sd_app_sre_alert_report.py,sha256=jQpJdXVID68bSNtJNOGDh0-ei1CfEUS4Itr4MAaB
|
|
769
769
|
tools/template_validation.py,sha256=qpKYaTgk0GOPGa2Ct5_5sKdwIHtCAKIBGzsMPuJU5fw,3371
|
770
770
|
tools/cli_commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
771
771
|
tools/cli_commands/container_images_report.py,sha256=SXh6sZ1dXXzd-2R5eeBufCtW3J4-Y55--0MZLdo4lr8,5409
|
772
|
-
tools/cli_commands/erv2.py,sha256=
|
772
|
+
tools/cli_commands/erv2.py,sha256=5EekfLBoA0spsdUHrPH47_x7bxxe_q7dTWW7nDw3UxM,23833
|
773
773
|
tools/cli_commands/gpg_encrypt.py,sha256=JWwds_Qg7KhSJMIGUh8TfI5-Jf17iUtmaEi4kWJxfVE,4907
|
774
774
|
tools/cli_commands/systems_and_tools.py,sha256=EMHOF1AtUDaoSk0bbjl6oUKYAz4rTZjIBaF-6E6GspM,16816
|
775
775
|
tools/cli_commands/cost_report/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -791,7 +791,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
791
791
|
tools/saas_promotion_state/saas_promotion_state.py,sha256=UfwwRLS5Ya4_Nh1w5n1dvoYtchQvYE9yj1VANt2IKqI,3925
|
792
792
|
tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
|
793
793
|
tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y,894
|
794
|
-
qontract_reconcile-0.10.2.
|
795
|
-
qontract_reconcile-0.10.2.
|
796
|
-
qontract_reconcile-0.10.2.
|
797
|
-
qontract_reconcile-0.10.2.
|
794
|
+
qontract_reconcile-0.10.2.dev132.dist-info/METADATA,sha256=NGyCyUtUnoFRVQrSNesrYtCpD5s1naAW4KIK676EcK0,24566
|
795
|
+
qontract_reconcile-0.10.2.dev132.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
796
|
+
qontract_reconcile-0.10.2.dev132.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
|
797
|
+
qontract_reconcile-0.10.2.dev132.dist-info/RECORD,,
|
@@ -289,6 +289,10 @@ class OrganizationLabelSet(BaseModel):
|
|
289
289
|
|
290
290
|
blocked_versions: CSV | None = Field(alias=aus_label_key("blocked-versions"))
|
291
291
|
|
292
|
+
sector_max_parallel_upgrades: dict[str, str] = labelset_groupfield(
|
293
|
+
group_prefix=aus_label_key("sector-max-parallel-upgrades.")
|
294
|
+
)
|
295
|
+
|
292
296
|
sector_deps: dict[str, CSV] = labelset_groupfield(
|
293
297
|
group_prefix=aus_label_key("sector-deps.")
|
294
298
|
)
|
@@ -311,6 +315,7 @@ class OrganizationLabelSet(BaseModel):
|
|
311
315
|
return [
|
312
316
|
OpenShiftClusterManagerSectorV1(
|
313
317
|
name=s,
|
318
|
+
maxParallelUpgrades=self.sector_max_parallel_upgrades.get(s),
|
314
319
|
dependencies=[
|
315
320
|
OpenShiftClusterManagerSectorDependenciesV1(name=d, ocm=None)
|
316
321
|
for d in self.sector_deps.get(s, [])
|
@@ -88,8 +88,12 @@ class AUSOrganizationLabelSource(LabelSource):
|
|
88
88
|
)
|
89
89
|
# sector dependencies
|
90
90
|
for sector in organization.sectors or []:
|
91
|
-
if sector.
|
92
|
-
labels[aus_label_key(f"
|
91
|
+
if sector.max_parallel_upgrades:
|
92
|
+
labels[aus_label_key(f"sector-max-parallel-upgrades.{sector.name}")] = (
|
93
|
+
sector.max_parallel_upgrades
|
94
|
+
)
|
95
|
+
if sector.dependencies is not None:
|
96
|
+
labels[aus_label_key(f"sector-deps.{sector.name}")] = ",".join(
|
93
97
|
sorted([dep.name for dep in sector.dependencies])
|
94
98
|
)
|
95
99
|
# version-data sharing
|
reconcile/aus/base.py
CHANGED
@@ -5,6 +5,7 @@ from abc import (
|
|
5
5
|
ABC,
|
6
6
|
abstractmethod,
|
7
7
|
)
|
8
|
+
from collections import defaultdict
|
8
9
|
from collections.abc import Callable, Sequence
|
9
10
|
from datetime import (
|
10
11
|
datetime,
|
@@ -982,6 +983,47 @@ def verify_lock_should_skip(
|
|
982
983
|
return False
|
983
984
|
|
984
985
|
|
986
|
+
def verify_max_upgrades_should_skip(
|
987
|
+
desired: ClusterUpgradeSpec,
|
988
|
+
sector_upgrades: dict[str, set[str]],
|
989
|
+
sector: Sector | None,
|
990
|
+
) -> bool:
|
991
|
+
if sector is None:
|
992
|
+
return False
|
993
|
+
|
994
|
+
current_upgrades = sector_upgrades[sector.name]
|
995
|
+
# Allow at least one upgrade
|
996
|
+
if len(current_upgrades) == 0:
|
997
|
+
return False
|
998
|
+
|
999
|
+
# if sector.max_parallel_upgrades is not set, we allow all upgrades
|
1000
|
+
if sector.max_parallel_upgrades is None:
|
1001
|
+
return False
|
1002
|
+
|
1003
|
+
sector_cluster_count = len(sector.specs)
|
1004
|
+
|
1005
|
+
if sector.max_parallel_upgrades.endswith("%"):
|
1006
|
+
max_parallel_upgrades_percent = int(sector.max_parallel_upgrades[:-1])
|
1007
|
+
max_parallel_upgrades = round(
|
1008
|
+
sector_cluster_count * max_parallel_upgrades_percent / 100
|
1009
|
+
)
|
1010
|
+
else:
|
1011
|
+
max_parallel_upgrades = int(sector.max_parallel_upgrades)
|
1012
|
+
|
1013
|
+
# we allow at least one upgrade
|
1014
|
+
if max_parallel_upgrades == 0:
|
1015
|
+
max_parallel_upgrades = 1
|
1016
|
+
|
1017
|
+
if len(current_upgrades) >= max_parallel_upgrades:
|
1018
|
+
logging.debug(
|
1019
|
+
f"[{desired.org.org_id}/{desired.org.name}/{desired.cluster.name}] skipping cluster: "
|
1020
|
+
f"sector '{sector.name}' has reached max parallel upgrades {sector.max_parallel_upgrades}"
|
1021
|
+
)
|
1022
|
+
return True
|
1023
|
+
|
1024
|
+
return False
|
1025
|
+
|
1026
|
+
|
985
1027
|
def _create_upgrade_policy(
|
986
1028
|
next_schedule: str, spec: ClusterUpgradeSpec, version: str
|
987
1029
|
) -> AbstractUpgradePolicy:
|
@@ -1042,25 +1084,32 @@ def calculate_diff(
|
|
1042
1084
|
list: upgrade policies to be applied
|
1043
1085
|
"""
|
1044
1086
|
|
1045
|
-
|
1046
|
-
|
1087
|
+
locked: dict[str, str] = {}
|
1088
|
+
sector_upgrades: dict[str, set[str]] = defaultdict(set)
|
1089
|
+
|
1090
|
+
def set_upgrading(
|
1091
|
+
cluster_id: str, mutexes: set[str] | None, sector_name: str | None
|
1047
1092
|
) -> None:
|
1048
1093
|
for mutex in mutexes or set():
|
1049
1094
|
locked[mutex] = cluster_id
|
1095
|
+
if sector_name:
|
1096
|
+
sector_upgrades[sector_name].add(cluster_id)
|
1050
1097
|
|
1051
1098
|
diffs: list[UpgradePolicyHandler] = []
|
1052
1099
|
|
1053
1100
|
# all clusters IDs with a current upgradePolicy are considered locked
|
1054
|
-
locked: dict[str, str] = {}
|
1055
1101
|
for spec in desired_state.specs:
|
1056
1102
|
if spec.cluster.id in [s.cluster.id for s in current_state]:
|
1057
|
-
|
1058
|
-
|
1103
|
+
sector_name = spec.upgrade_policy.conditions.sector
|
1104
|
+
set_upgrading(spec.cluster.id, spec.effective_mutexes, sector_name)
|
1059
1105
|
|
1060
1106
|
addon_service = init_addon_service(desired_state.org.environment)
|
1061
1107
|
now = datetime.utcnow()
|
1062
1108
|
gates = get_version_gates(ocm_api)
|
1063
1109
|
for spec in desired_state.specs:
|
1110
|
+
sector_name = spec.upgrade_policy.conditions.sector
|
1111
|
+
sector = desired_state.sectors[sector_name] if sector_name else None
|
1112
|
+
|
1064
1113
|
# Upgrading node pools, only required for Hypershift clusters
|
1065
1114
|
# do this in the same loop, to skip cluster on node pool upgrade
|
1066
1115
|
if spec.cluster.is_rosa_hypershift():
|
@@ -1070,7 +1119,7 @@ def calculate_diff(
|
|
1070
1119
|
node_pool_update = _calculate_node_pool_diffs(spec, now)
|
1071
1120
|
if node_pool_update: # node pool update policy not yet created
|
1072
1121
|
diffs.append(node_pool_update)
|
1073
|
-
|
1122
|
+
set_upgrading(spec.cluster.id, spec.effective_mutexes, sector_name)
|
1074
1123
|
continue
|
1075
1124
|
|
1076
1125
|
# ignore clusters with an existing upgrade policy
|
@@ -1089,10 +1138,9 @@ def calculate_diff(
|
|
1089
1138
|
if verify_lock_should_skip(spec, locked):
|
1090
1139
|
continue
|
1091
1140
|
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
sector = desired_state.sectors[sector_name]
|
1141
|
+
if verify_max_upgrades_should_skip(spec, sector_upgrades, sector):
|
1142
|
+
continue
|
1143
|
+
|
1096
1144
|
version = upgradeable_version(spec, version_data, sector)
|
1097
1145
|
if version:
|
1098
1146
|
if addon_id:
|
@@ -1139,7 +1187,7 @@ def calculate_diff(
|
|
1139
1187
|
policy=_create_upgrade_policy(next_schedule, spec, version),
|
1140
1188
|
)
|
1141
1189
|
)
|
1142
|
-
|
1190
|
+
set_upgrading(spec.cluster.id, spec.effective_mutexes, sector_name)
|
1143
1191
|
|
1144
1192
|
return diffs
|
1145
1193
|
|
reconcile/aus/models.py
CHANGED
@@ -137,7 +137,11 @@ class OrganizationUpgradeSpec(BaseModel):
|
|
137
137
|
|
138
138
|
# extract sectors
|
139
139
|
self._sectors = {
|
140
|
-
s.name: Sector(
|
140
|
+
s.name: Sector(
|
141
|
+
org_id=self.org.org_id,
|
142
|
+
name=s.name,
|
143
|
+
max_parallel_upgrades=s.max_parallel_upgrades,
|
144
|
+
)
|
141
145
|
for s in self.org.sectors or []
|
142
146
|
}
|
143
147
|
|
@@ -223,6 +227,7 @@ class SectorConfigError(Exception):
|
|
223
227
|
|
224
228
|
class Sector(BaseModel):
|
225
229
|
name: str
|
230
|
+
max_parallel_upgrades: str | None
|
226
231
|
dependencies: list[Sector] = Field(default_factory=list)
|
227
232
|
_specs: dict[str, ClusterUpgradeSpec] = PrivateAttr(default_factory=dict)
|
228
233
|
|
@@ -148,6 +148,7 @@ query Clusters($name: String) {
|
|
148
148
|
}
|
149
149
|
sectors {
|
150
150
|
name
|
151
|
+
maxParallelUpgrades
|
151
152
|
dependencies {
|
152
153
|
name
|
153
154
|
ocm {
|
@@ -388,6 +389,7 @@ class OpenShiftClusterManagerSectorDependenciesV1(ConfiguredBaseModel):
|
|
388
389
|
|
389
390
|
class OpenShiftClusterManagerSectorV1(ConfiguredBaseModel):
|
390
391
|
name: str = Field(..., alias="name")
|
392
|
+
max_parallel_upgrades: Optional[str] = Field(..., alias="maxParallelUpgrades")
|
391
393
|
dependencies: Optional[list[OpenShiftClusterManagerSectorDependenciesV1]] = Field(..., alias="dependencies")
|
392
394
|
|
393
395
|
|
@@ -67,6 +67,7 @@ class OpenShiftClusterManagerSectorDependenciesV1(ConfiguredBaseModel):
|
|
67
67
|
|
68
68
|
class OpenShiftClusterManagerSectorV1(ConfiguredBaseModel):
|
69
69
|
name: str = Field(..., alias="name")
|
70
|
+
max_parallel_upgrades: Optional[str] = Field(..., alias="maxParallelUpgrades")
|
70
71
|
dependencies: Optional[list[OpenShiftClusterManagerSectorDependenciesV1]] = Field(..., alias="dependencies")
|
71
72
|
|
72
73
|
|
@@ -8079,6 +8079,18 @@
|
|
8079
8079
|
"isDeprecated": false,
|
8080
8080
|
"deprecationReason": null
|
8081
8081
|
},
|
8082
|
+
{
|
8083
|
+
"name": "maxParallelUpgrades",
|
8084
|
+
"description": null,
|
8085
|
+
"args": [],
|
8086
|
+
"type": {
|
8087
|
+
"kind": "SCALAR",
|
8088
|
+
"name": "String",
|
8089
|
+
"ofType": null
|
8090
|
+
},
|
8091
|
+
"isDeprecated": false,
|
8092
|
+
"deprecationReason": null
|
8093
|
+
},
|
8082
8094
|
{
|
8083
8095
|
"name": "dependencies",
|
8084
8096
|
"description": null,
|
reconcile/queries.py
CHANGED
@@ -739,6 +739,7 @@ CLUSTERS_QUERY = """
|
|
739
739
|
}
|
740
740
|
sectors {
|
741
741
|
name
|
742
|
+
maxParallelUpgrades
|
742
743
|
dependencies {
|
743
744
|
name
|
744
745
|
}
|
@@ -1348,6 +1349,7 @@ OCM_QUERY = """
|
|
1348
1349
|
}
|
1349
1350
|
sectors {
|
1350
1351
|
name
|
1352
|
+
maxParallelUpgrades
|
1351
1353
|
dependencies {
|
1352
1354
|
name
|
1353
1355
|
ocm {
|
tools/cli_commands/erv2.py
CHANGED
@@ -222,7 +222,7 @@ class Erv2Cli:
|
|
222
222
|
raise
|
223
223
|
|
224
224
|
def enter_shell(self, credentials: Path) -> None:
|
225
|
-
"""Run the
|
225
|
+
"""Run the ERv2 container and enter the shell."""
|
226
226
|
input_file = self.temp / "input.json"
|
227
227
|
input_file.write_text(self.input_data)
|
228
228
|
|
@@ -242,6 +242,8 @@ class Erv2Cli:
|
|
242
242
|
f"{credentials!s}:/credentials:Z",
|
243
243
|
"-e",
|
244
244
|
"AWS_SHARED_CREDENTIALS_FILE=/credentials",
|
245
|
+
"-e",
|
246
|
+
"WORK=/tmp/work",
|
245
247
|
"--entrypoint",
|
246
248
|
"/bin/bash",
|
247
249
|
self.image,
|
{qontract_reconcile-0.10.2.dev130.dist-info → qontract_reconcile-0.10.2.dev132.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|