Skip to content

Commit 8ee650c

Browse files
committed
[patch] Return richer placeholder for dev catalogs
When getCatalog() detects a dev/master (rolling) catalog, return a richer placeholder that includes CatalogSource fields plus the version-metadata keys consumed by CLI code (processCatalogChoice, validateCatalog, pipelinerun generation). Adds an empty catalog_digest sentinel, ocp_compatibility, dependency default versions, and MAS component channel→version mappings for dev channels so downstream logic won't crash and can make sensible decisions for rolling builds. Keeps rolling-build semantics (no fixed digest) while providing the metadata surface expected elsewhere.
1 parent 70ddc31 commit 8ee650c

1 file changed

Lines changed: 58 additions & 3 deletions

File tree

‎src/mas/devops/data/__init__.py‎

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,13 @@ def getCatalog(name: str) -> dict:
5555
NoSuchCatalogError: If the specified catalog does not exist and is not a dev catalog.
5656
"""
5757
# Dev/master catalogs are rolling builds served from Artifactory.
58-
# They have no static yaml descriptor — return a minimal placeholder so
59-
# that downstream logic (update validation, pipelinerun generation) can
60-
# proceed without crashing.
58+
# They have no static yaml descriptor — return a descriptor with the
59+
# CatalogSource fields plus the version-metadata keys that the CLI
60+
# accesses (processCatalogChoice, validateCatalog, etc.).
61+
# Rolling builds have no fixed digest; empty string is used as a sentinel.
6162
if _isDevCatalogId(name):
6263
return {
64+
# --- Kubernetes CatalogSource fields ---
6365
"apiVersion": "operators.coreos.com/v1alpha1",
6466
"kind": "CatalogSource",
6567
"metadata": {
@@ -72,6 +74,59 @@ def getCatalog(name: str) -> dict:
7274
"sourceType": "grpc",
7375
"publisher": "IBM",
7476
},
77+
# --- Catalog version metadata (dev/rolling — no fixed values) ---
78+
# Empty digest signals a rolling build; CLI code guards on this where needed.
79+
"catalog_digest": "",
80+
"ocp_compatibility": [],
81+
# Dependency default versions — kept in sync with the latest monthly catalog.
82+
"mongo_extras_version_default": "8.0.20",
83+
"db2_channel_default": "v120104.0",
84+
"cpd_product_version_default": "5.2.0",
85+
# MAS channel → version mappings for dev channels.
86+
"mas_core_version": {
87+
"9.2.x-dev": "9.2.x-dev",
88+
"9.1.x-dev": "9.1.x-dev",
89+
"9.0.x-dev": "9.0.x-dev",
90+
},
91+
"aiservice_version": {
92+
"9.2.x-dev": "9.2.x-dev",
93+
"9.1.x-dev": "9.1.x-dev",
94+
},
95+
"mas_manage_version": {
96+
"9.2.x-dev": "9.2.x-dev",
97+
"9.1.x-dev": "9.1.x-dev",
98+
"9.0.x-dev": "9.0.x-dev",
99+
},
100+
"mas_iot_version": {
101+
"9.2.x-dev": "9.2.x-dev",
102+
"9.1.x-dev": "9.1.x-dev",
103+
"9.0.x-dev": "9.0.x-dev",
104+
},
105+
"mas_monitor_version": {
106+
"9.2.x-dev": "9.2.x-dev",
107+
"9.1.x-dev": "9.1.x-dev",
108+
"9.0.x-dev": "9.0.x-dev",
109+
},
110+
"mas_optimizer_version": {
111+
"9.2.x-dev": "9.2.x-dev",
112+
"9.1.x-dev": "9.1.x-dev",
113+
},
114+
"mas_predict_version": {
115+
"9.2.x-dev": "9.2.x-dev",
116+
"9.1.x-dev": "9.1.x-dev",
117+
},
118+
"mas_visualinspection_version": {
119+
"9.2.x-dev": "9.2.x-dev",
120+
"9.1.x-dev": "9.1.x-dev",
121+
},
122+
"mas_assist_version": {
123+
"9.2.x-dev": "9.2.x-dev",
124+
"9.1.x-dev": "9.1.x-dev",
125+
},
126+
"mas_facilities_version": {
127+
"9.2.x-dev": "9.2.x-dev",
128+
"9.1.x-dev": "9.1.x-dev",
129+
},
75130
}
76131

77132
moduleFile = path.abspath(__file__)

0 commit comments

Comments
 (0)