Skip to content

Commit 81a6633

Browse files
authored
Merge branch 'stable' into update-251224
2 parents acc43f1 + 9913f14 commit 81a6633

16 files changed

Lines changed: 671 additions & 488 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
2727
# 2. Python Package Build
2828
# -------------------------------------------------------------------------------------------
29-
- name: Set up Python 3.11
29+
- name: Set up Python 3.12
3030
uses: actions/setup-python@v5
3131
with:
32-
python-version: 3.11
32+
python-version: 3.12
3333

3434
- name: Build the Python package
3535
env:

.github/workflows/python-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
2626
# 2. Python Package Build
2727
# -------------------------------------------------------------------------------------------
28-
- name: Set up Python 3.11
28+
- name: Set up Python 3.12
2929
uses: actions/setup-python@v5
3030
with:
31-
python-version: 3.11
31+
python-version: 3.12
3232

3333
- name: Build the Python package
3434
env:

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
.PHONY: install build lint pyinstaller clean
22

3-
venv:
4-
python3 -m venv venv
3+
.venv:
4+
python3 -m venv .venv
55

66
clean:
7-
rm -rf venv
7+
rm -rf .venv
88

9-
install: venv
10-
. venv/bin/activate && python -m pip install --editable .[dev]
9+
install: .venv
10+
. .venv/bin/activate && python -m pip install --editable .[dev]
1111

12-
build: venv
12+
build: .venv
1313
rm -f README.rst
14-
. venv/bin/activate && python -m build
14+
. .venv/bin/activate && python -m build
1515

1616
# Note: "make install" needs to be ran once before this target will work, but we
1717
# don't want to set it as a dependency otherwise it unnecessarily slows down
1818
# fast implement/test cycles. "make install" created an editable install of the
1919
# package which is linked to the files you are editing so there is no need to
2020
# re-install after each change.
2121
unit-test:
22-
. venv/bin/activate && pytest test/src/mock
22+
. .venv/bin/activate && pytest test/src/mock
2323

24-
lint: venv
24+
lint: .venv
2525
rm -f README.rst
26-
. venv/bin/activate && flake8 src --count --select=E9,F63,F7,F82 --show-source --statistics && flake8 src --count --exit-zero --max-complexity=10 --max-line-length=200 --statistics
26+
. .venv/bin/activate && flake8 src --count --select=E9,F63,F7,F82 --show-source --statistics && flake8 src --count --exit-zero --max-complexity=10 --max-line-length=200 --statistics
2727

2828
pyinstaller: venv
2929
rm -f README.rst
30-
. venv/bin/activate && pyinstaller src/mas-upgrade --onefile --noconfirm --add-data="src/mas/devops/templates/ibm-mas-tekton.yaml:mas/devops/templates" --add-data="src/mas/devops/templates/subscription.yml.j2:mas/devops/templates/" --add-data="src/mas/devops/templates/pipelinerun-upgrade.yml.j2:mas/devops/templates/"
30+
. .venv/bin/activate && pyinstaller src/mas-upgrade --onefile --noconfirm --add-data="src/mas/devops/templates/ibm-mas-tekton.yaml:mas/devops/templates" --add-data="src/mas/devops/templates/subscription.yml.j2:mas/devops/templates/" --add-data="src/mas/devops/templates/pipelinerun-upgrade.yml.j2:mas/devops/templates/"

setup.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ def get_version(rel_path):
6767
],
6868
extras_require={
6969
'dev': [
70-
'build', # MIT License
71-
'flake8', # MIT License
72-
'pytest', # MIT License
73-
'pytest-mock', # MIT License
70+
'build', # MIT License
71+
'flake8', # MIT License
72+
'pytest', # MIT License
73+
'pytest-mock', # MIT License
7474
'requests-mock', # Apache Software License
75-
'setuptools', # MIT License
75+
'setuptools', # MIT License
7676
]
7777
},
7878
classifiers=[
@@ -81,9 +81,7 @@ def get_version(rel_path):
8181
'Operating System :: Microsoft :: Windows',
8282
'Operating System :: POSIX :: Linux',
8383
'Programming Language :: Python',
84-
'Programming Language :: Python :: 3.9',
85-
'Programming Language :: Python :: 3.10',
86-
'Programming Language :: Python :: 3.11',
84+
'Programming Language :: Python :: 3.12',
8785
'Topic :: Communications',
8886
'Topic :: Internet',
8987
'Topic :: Software Development :: Libraries :: Python Modules'

src/mas/devops/aiservice.py

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# *****************************************************************************
2+
# Copyright (c) 2025 IBM Corporation and other Contributors.
3+
#
4+
# All rights reserved. This program and the accompanying materials
5+
# are made available under the terms of the Eclipse Public License v1.0
6+
# which accompanies this distribution, and is available at
7+
# http://www.eclipse.org/legal/epl-v10.html
8+
#
9+
# *****************************************************************************
10+
11+
import logging
12+
from openshift.dynamic import DynamicClient
13+
from openshift.dynamic.exceptions import NotFoundError, ResourceNotFoundError, UnauthorizedError
14+
15+
from .ocp import listInstances
16+
from .olm import getSubscription
17+
18+
logger = logging.getLogger(__name__)
19+
20+
21+
def listAiServiceInstances(dynClient: DynamicClient) -> list:
22+
"""
23+
Get a list of AI Service instances on the cluster
24+
"""
25+
return listInstances(dynClient, "aiservice.ibm.com/v1", "AIServiceApp")
26+
27+
28+
def verifyAiServiceInstance(dynClient: DynamicClient, instanceId: str) -> bool:
29+
"""
30+
Validate that the chosen AI Service instance exists
31+
"""
32+
try:
33+
aiserviceAPI = dynClient.resources.get(api_version="aiservice.ibm.com/v1", kind="AIServiceApp")
34+
aiserviceAPI.get(name=instanceId, namespace=f"aiservice-{instanceId}")
35+
return True
36+
except NotFoundError:
37+
print("NOT FOUND")
38+
return False
39+
except ResourceNotFoundError:
40+
# The AIServiceApp CRD has not even been installed in the cluster
41+
print("RESOURCE NOT FOUND")
42+
return False
43+
except UnauthorizedError as e:
44+
logger.error(f"Error: Unable to verify AI Service instance due to failed authorization: {e}")
45+
return False
46+
47+
48+
def getAiserviceChannel(dynClient: DynamicClient, instanceId: str) -> str:
49+
"""
50+
Get the AI Service channel from the subscription
51+
"""
52+
aiserviceSubscription = getSubscription(dynClient, f"aiservice-{instanceId}", "ibm-aiservice")
53+
if aiserviceSubscription is None:
54+
return None
55+
else:
56+
return aiserviceSubscription.spec.channel

src/mas/devops/data/catalogs/v9-251224-amd64.yaml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# catalog itself, but not everything in the catalog supports this yet (including MAS)
66
# so we need to use the CASE bundle mirror process still.
77

8-
catalog_digest: TBC
8+
catalog_digest: sha256:b23d1c6d4b901da4fe1e8e2d3b42affbfcbac0ebbb8506a2d7e9634005ff924f #TBC
99

1010
ocp_compatibility:
1111
- 4.16
@@ -15,12 +15,12 @@ ocp_compatibility:
1515

1616
# Dependencies
1717
# -----------------------------------------------------------------------------
18-
ibm_licensing_version: 4.2.18 # Operator version 4.2.18 (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)
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.13.0 # Operator version 4.13.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services)
2020
common_svcs_version_1: 4.11.0 # Additional version 4.11.0
2121

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
22+
cp4d_platform_version: 5.2.0+20250709.170324 # Operator version 5.2.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-datacore/)
23+
ibm_zen_version: 6.2.0+20250530.152516.232 # For CPD5 ibm-zen has to be explicitily mirrored
2424

2525
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)
2626
events_version: 5.0.1 # Operator version 5.0.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator)
@@ -29,19 +29,20 @@ sls_version: 3.12.3 # Operator version 3.10.0 (https://
2929
tsm_version: 1.7.2 # Operator version 1.5.4 (https://github.ibm.com/maximoappsuite/ibm-truststore-mgr/releases)
3030
dd_version: 1.1.20 # Operator version 1.1.14 (https://github.ibm.com/maximoappsuite/ibm-data-dictionary/releases)
3131
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
32+
wsl_version: 11.0.0+20250521.202913.73 # used for wsl and wsl_runtimes unless wsl_runtimes_version also specified
33+
wsl_runtimes_version: 11.0.0+20250515.090949.21 # cpd 5.1.3 uses version 10.3.0 of wsl runtimes but only 10.2.0 for wsl itself
34+
wml_version: 11.0.0+20250530.193146.282 # Operator version 5.2.0
35+
postgress_version: 5.16.0+20250827.110911.2626 # ibm-cpd-cloud-native-postgresql-operator 5.2.0 cp4d
3536

3637
# Why are these commented out?
37-
# ccs_build: +20240528.144404.460 # ibm-ccs from version 9.0.0 requires the build version
38+
ccs_build: 11.0.0+20250605.130237.468
3839
# datarefinery_build: +20240517.202103.146
3940

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)
41+
spark_version: 11.0.0+20250604.163055.2097 # Operator version 5.2.0
42+
cognos_version: 28.0.0+20250515.175459.10054 # Operator version 25.0.0
43+
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)
4344
elasticsearch_version: 1.1.2667 # Operator version 1.1.2667
44-
45+
opensearch_version: 1.1.2494 # Operator version 1.1.2494
4546

4647
# Maximo Application Suite
4748
# -----------------------------------------------------------------------------
@@ -135,7 +136,7 @@ amlen_extras_version: 1.1.3
135136

136137
# Default Cloud Pak for Data version
137138
# ------------------------------------------------------------------------------
138-
cpd_product_version_default: 5.1.3
139+
cpd_product_version_default: 5.2.0
139140

140141
manage_extras_913: 9.1.3
141142
minio_version: RELEASE.2025-06-13T11-33-47Z

0 commit comments

Comments
 (0)