Skip to content

Commit 230a46c

Browse files
author
Bhautik Vala
committed
[patch] Merge branch 'stable' into aisvc-upgrade
2 parents a8629cb + cee9976 commit 230a46c

8 files changed

Lines changed: 261 additions & 5 deletions

File tree

.secrets.baseline

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2025-02-28T10:11:51Z",
6+
"generated_at": "2025-09-30T07:33:15Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -92,7 +92,7 @@
9292
"hashed_secret": "a4b48a81cdab1e1a5dd37907d6c85ca1c61ddc7c",
9393
"is_secret": false,
9494
"is_verified": false,
95-
"line_number": 263,
95+
"line_number": 290,
9696
"type": "Secret Keyword",
9797
"verified_result": null
9898
}
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
---
2+
# Case bundle configuration for IBM Maximo Operator Catalog 250925 (AMD64)
3+
# -----------------------------------------------------------------------------
4+
# In the future this won't be necessary as we'll be able to mirror from the
5+
# catalog itself, but not everything in the catalog supports this yet (including MAS)
6+
# so we need to use the CASE bundle mirror process still.
7+
8+
catalog_digest: sha256:db5ac0b24bc6c0cb2af8eebcf529fee8ce944196d49aaf7448a00b6e9ffa8d96
9+
10+
ocp_compatibility:
11+
- 4.15
12+
- 4.16
13+
- 4.17
14+
- 4.18
15+
16+
# Dependencies
17+
# -----------------------------------------------------------------------------
18+
ibm_licensing_version: 4.2.17 # Operator version 4.2.14 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-licensing)
19+
common_svcs_version: 4.12.0 # Operator version 4.12.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services)
20+
common_svcs_version_1: 4.11.0 # Additional version 4.11.0
21+
22+
cp4d_platform_version: 5.1.1 # Operator version 5.1.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-datacore/)
23+
ibm_zen_version: 6.1.1+20250218.180746.89 # For CPD5 ibm-zen has to be explicitily mirrored
24+
25+
db2u_version: 7.3.1+20250821.161005.16793 # Operator version 110509.0.6 to find the version 7.3.1+20250821.161005.16793, search db2u-operator digest on repo (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator)
26+
events_version: 5.0.1 # Operator version 5.0.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator)
27+
uds_version: 2.0.12 # Operator version 2.0.12 # sticking to 2.0.12 version # Please do Not Change
28+
sls_version: 3.12.2 # Operator version 3.10.0 (https://github.ibm.com/maximoappsuite/ibm-sls/releases)
29+
tsm_version: 1.7.1 # Operator version 1.5.4 (https://github.ibm.com/maximoappsuite/ibm-truststore-mgr/releases)
30+
dd_version: 1.1.19 # Operator version 1.1.14 (https://github.ibm.com/maximoappsuite/ibm-data-dictionary/releases)
31+
appconnect_version: 6.2.0 # Operator version 6.2.0 # sticking to 6.2.0 version # Please do Not Change
32+
wsl_version: 10.2.0 # used for wsl and wsl_runtimes unless wsl_runtimes_version also specified
33+
wsl_runtimes_version: 10.3.0 # cpd 5.1.3 uses version 10.3.0 of wsl runtimes but only 10.2.0 for wsl itself
34+
wml_version: 10.2.0 # Operator version 5.0.0
35+
36+
# Why are these commented out?
37+
# ccs_build: +20240528.144404.460 # ibm-ccs from version 9.0.0 requires the build version
38+
# datarefinery_build: +20240517.202103.146
39+
40+
spark_version: 10.2.0 # Operator version 7.3.0
41+
cognos_version: 27.2.0 # Operator version 25.0.0
42+
couchdb_version: 1.0.13 # Operator version 2.2.1 (1.0.13) sticking with 1.0.13 # (This is required for Assist 9.0, https://github.com/IBM/cloud-pak/blob/master/repo/case/ibm-couchdb/index.yaml)
43+
elasticsearch_version: 1.1.2667 # Operator version 1.1.2667
44+
45+
46+
# Maximo Application Suite
47+
# -----------------------------------------------------------------------------
48+
mas_core_version:
49+
9.2.x-feature: 9.2.0-pre.stable_11883 # Updated
50+
9.1.x-feature: 9.1.0 # No Update
51+
9.1.x: 9.1.4 # Updated
52+
9.0.x: 9.0.15 # Updated
53+
8.10.x: 8.10.29 # Updated
54+
8.11.x: 8.11.26 # Updated
55+
mas_assist_version:
56+
9.1.x: 9.1.3 # Updated
57+
9.0.x: 9.0.9 # Updated
58+
8.10.x: 8.7.8 # No Update
59+
8.11.x: 8.8.7 # No Update
60+
mas_hputilities_version:
61+
9.1.x: "" # Not Supported
62+
9.0.x: "" # Not Supported
63+
8.10.x: 8.6.7 # No Update
64+
8.11.x: "" # Not Supported
65+
mas_iot_version:
66+
9.1.x: 9.1.3 # Updated
67+
9.0.x: 9.0.12 # Updated
68+
8.10.x: 8.7.26 # Updated
69+
8.11.x: 8.8.22 # Updated
70+
mas_manage_version:
71+
9.2.x-feature: 9.2.0-pre.stable_13752 # Updated
72+
9.1.x-feature: 9.1.0 # No Update
73+
9.1.x: 9.1.3 # Updated
74+
9.0.x: 9.0.17 # Updated
75+
8.10.x: 8.6.30 # Updated
76+
8.11.x: 8.7.24 # Updated
77+
mas_monitor_version:
78+
9.1.x: 9.1.3 # Updated
79+
9.0.x: 9.0.13 # Updated
80+
8.10.x: 8.10.23 # Updated
81+
8.11.x: 8.11.21 # Updated
82+
mas_optimizer_version:
83+
9.2.x-feature: 9.2.0-pre.stable_525 # Updated
84+
9.1.x-feature: 9.1.0 # No Update
85+
9.1.x: 9.1.4 # No Update
86+
9.0.x: 9.0.15 # No Update
87+
8.10.x: 8.4.22 # No Update
88+
8.11.x: 8.5.21 # No Update
89+
mas_predict_version:
90+
9.1.x: 9.1.2 # Updated
91+
9.0.x: 9.0.9 # Updated
92+
8.10.x: 8.8.10 # Updated
93+
8.11.x: 8.9.12 # Updated
94+
mas_visualinspection_version:
95+
9.1.x-feature: 9.1.0 # No Update
96+
9.1.x: 9.1.2 # Updated
97+
9.0.x: 9.0.12 # Updated
98+
8.10.x: 8.8.4 # No Update
99+
8.11.x: 8.9.15 # Updated
100+
mas_facilities_version:
101+
9.1.x: 9.1.3 # Updated
102+
9.0.x: "" # Not Supported
103+
8.10.x: "" # Not Supported
104+
8.11.x: "" # Not Supported
105+
106+
107+
# Maximo AI Service
108+
# ------------------------------------------------------------------------------
109+
aiservice_version:
110+
9.1.x: 9.1.7 # Updated
111+
112+
# Extra Images for UDS
113+
# ------------------------------------------------------------------------------
114+
uds_extras_version: 1.5.0
115+
116+
# Extra Images for Mongo
117+
# ------------------------------------------------------------------------------
118+
mongo_extras_version_default: 7.0.23
119+
120+
# Variables used to mirror additional mongo image versions
121+
mongo_extras_version_4: 4.4.21
122+
mongo_extras_version_5: 5.0.23
123+
mongo_extras_version_6: 6.0.12
124+
mongo_extras_version_7: 7.0.23
125+
126+
# Extra Images for Db2u
127+
# ------------------------------------------------------------------------------
128+
db2u_extras_version: 1.0.6 # No Update
129+
db2u_filter: db2
130+
131+
# Extra Images for IBM Watson Discovery
132+
# ------------------------------------------------------------------------------
133+
#wd_extras_version: 1.0.4
134+
135+
# Extra Images for Amlen
136+
# ------------------------------------------------------------------------------
137+
amlen_extras_version: 1.1.3
138+
139+
# Default Cloud Pak for Data version
140+
# ------------------------------------------------------------------------------
141+
cpd_product_version_default: 5.1.3
142+
143+
# Extra Images for kmodels
144+
# ------------------------------------------------------------------------------
145+
kmodels_extras_version_default: 1.0.14
146+
147+
manage_extras_913: 9.1.3
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
# Case bundle configuration for IBM Maximo Operator Catalog 250925 (PPC)
3+
# -----------------------------------------------------------------------------
4+
# In the future this won't be necessary as we'll be able to mirror from the
5+
# catalog itself, but not everything in the catalog supports this yet (including MAS)
6+
# so we need to use the CASE bundle mirror process still.
7+
8+
catalog_digest: sha256:3f7809233f72bf6007e7099a1c38a3577e1ffb0197a29b891a24fef007a8dcf7
9+
10+
uds_version: 2.0.12 # Operator version 2.0.12 # sticking to 2.0.12 version # Please do Not Change
11+
sls_version: 3.12.2 # Operator version 3.10.0 (https://github.ibm.com/maximoappsuite/ibm-sls/releases)
12+
tsm_version: 1.7.1 # Operator version 1.5.4 (https://github.ibm.com/maximoappsuite/ibm-truststore-mgr/releases)
13+
db2u_version: 7.3.1+20250821.161005.16793 # Operator version 110509.0.2 to find the version 7.2.0, search CASE_VERSION in db2u, catalog.yaml into ibm-maximo-operator-catalog (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator)
14+
15+
# Maximo Application Suite
16+
# -----------------------------------------------------------------------------
17+
mas_core_version:
18+
9.2.x-feature: 9.2.0-pre.stable_11883 # Updated
19+
9.1.x-feature: 9.1.0 # No Update
20+
9.1.x: 9.1.4 # Updated
21+
9.0.x: 9.0.15 # Updated
22+
8.10.x: "" # Not Supported
23+
8.11.x: "" # Not Supported
24+
mas_manage_version:
25+
9.2.x-feature: 9.2.0-pre.stable_13752 # Updated
26+
9.1.x-feature: 9.1.0 # No Update
27+
9.1.x: 9.1.2 # No Update
28+
9.0.x: 9.0.17 # Updated
29+
8.10.x: "" # Not Supported
30+
8.11.x: "" # Not Supported
31+
32+
# Extra Images for UDS
33+
# ------------------------------------------------------------------------------
34+
uds_extras_version: 1.5.0
35+
36+
# Extra Images for Mongo
37+
# ------------------------------------------------------------------------------
38+
mongo_extras_version_default: 7.0.12
39+
40+
# Variables used to mirror additional mongo image versions
41+
mongo_extras_version_4: 4.4.21
42+
mongo_extras_version_5: 5.0.23
43+
mongo_extras_version_6: 6.0.12
44+
mongo_extras_version_7: 7.0.12

src/mas/devops/db2.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,12 @@ def check_reg_cfg(db2u_instance_cr: dict, core_v1_api: client.CoreV1Api, mas_ins
237237
for cr_k, cr_v in reg_cfg_cr.items():
238238
# regex ignores any trailing [O] (which indicates the param has been overridden I think)
239239
matches = re.search(fr"{cr_k}=(.*?)(?:\s\[O\])?$", reg_cfg_pod, re.MULTILINE)
240-
if matches is None:
240+
if matches is None and cr_v != '':
241241
failures.append(f"[registry cfg] {cr_k} not found in output of db2set command")
242242
continue
243-
pod_v = matches.group(1)
243+
pod_v = ''
244+
if cr_v != '':
245+
pod_v = matches.group(1)
244246

245247
if not cr_pod_v_matches(cr_k, cr_v, pod_v):
246248
failures.append(f"[registry cfg] {cr_k}: {cr_v} != {pod_v}")

src/mas/devops/mas.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,41 @@ def getMasChannel(dynClient: DynamicClient, instanceId: str) -> str:
245245
return masSubscription.spec.channel
246246

247247

248+
def getAppsSubscriptionChannel(dynClient: DynamicClient, instanceId: str) -> list:
249+
"""
250+
Return list of installed apps with their subscribed channel
251+
"""
252+
try:
253+
installedApps = []
254+
appKinds = [
255+
"assist",
256+
"facilities",
257+
"health",
258+
"hputilities",
259+
"iot",
260+
"manage",
261+
"monitor",
262+
"mso",
263+
"optimizer",
264+
"safety",
265+
"predict",
266+
"visualinspection",
267+
"aibroker"
268+
]
269+
for appKind in appKinds:
270+
appSubscription = getSubscription(dynClient, f"mas-{instanceId}-{appKind}", f"ibm-mas-{appKind}")
271+
if appSubscription is not None:
272+
installedApps.append({"appId": appKind, "channel": appSubscription.spec.channel})
273+
return installedApps
274+
except NotFoundError:
275+
return []
276+
except ResourceNotFoundError:
277+
return []
278+
except UnauthorizedError:
279+
logger.error("Error: Unable to get MAS app subscriptions due to failed authorization: {e}")
280+
return []
281+
282+
248283
def getAiserviceChannel(dynClient: DynamicClient, instanceId: str) -> str:
249284
"""
250285
Get the AI Service channel from the subscription

src/mas/devops/templates/pipelinerun-aiservice-install.yml.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ spec:
245245
value: "{{ aiservice_watsonxai_project_id }}"
246246
- name: aiservice_watsonx_action
247247
value: "{{ aiservice_watsonx_action }}"
248+
- name: aiservice_watsonxai_ca_crt
249+
value: "{{ aiservice_watsonxai_ca_crt }}"
248250

249251
workspaces:
250252
# The generated configuration files

test/src/test_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_list_catalogs():
2626
def test_get_newest_catalog_tag():
2727
catalogTag = getNewestCatalogTag("amd64")
2828
# Reminder: update this test when adding a new catalog each month!
29-
assert catalogTag == "v9-250902-amd64"
29+
assert catalogTag == "v9-250925-amd64"
3030

3131

3232
def test_get_newest_catalog_tag_fail():

test/src/test_db2.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,32 @@ def test_check_reg_cfg(mocker):
274274
])
275275

276276

277+
def test_check_reg_cfg_with_empty_value_in_cr(mocker):
278+
279+
mock_db2_pod_exec_db2set = mocker.patch("mas.devops.db2.db2_pod_exec_db2set")
280+
mock_db2_pod_exec_db2set.return_value = '''
281+
DB2AUTH=OSAUTHDB,ALLOW_LOCAL_FALLBACK,PLUGIN_AUTO_RELOAD
282+
DB2_FMP_COMM_HEAPSZ=65536 [O]
283+
'''
284+
285+
db2_instance_cr = dict(
286+
spec=dict(
287+
environment=dict(
288+
instance=dict(
289+
registry=dict(
290+
DB2AUTH='WRONG',
291+
NOTFOUNDINOUTPUT="",
292+
)
293+
)
294+
)
295+
)
296+
)
297+
298+
assert set(db2.check_reg_cfg(db2_instance_cr, None, None, None)) == set([
299+
"[registry cfg] DB2AUTH: WRONG != OSAUTHDB,ALLOW_LOCAL_FALLBACK,PLUGIN_AUTO_RELOAD"
300+
])
301+
302+
277303
@pytest.mark.parametrize("test_case_name, expected_failures", [
278304
# This test case simulates what will happen when we run the validate_db2_config using the IoT Db2uInstance CR
279305
# as we have it today in fvtsaas after the CR settings have been applied successfully to DB2

0 commit comments

Comments
 (0)