Skip to content

Commit 4137662

Browse files
committed
Merge branch 'update-251030' into mongo8013
2 parents 590624c + 916d820 commit 4137662

14 files changed

Lines changed: 416 additions & 19 deletions

.github/workflows/python-package.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
env:
3636
OCP_TOKEN: ${{ secrets.OCP_TOKEN }}
3737
OCP_SERVER: ${{ secrets.OCP_SERVER }}
38+
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
3839
run: |
3940
kubectl config set-cluster my-cluster --server=$OCP_SERVER
4041
kubectl config set-credentials my-user --token=$OCP_TOKEN

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ default_language_version:
22
python: python
33
repos:
44
- repo: https://github.com/hhatto/autopep8
5-
rev: v2.3.1
5+
rev: v2.3.2
66
hooks:
77
- id: autopep8
88
- repo: https://github.com/PyCQA/flake8
9-
rev: 7.1.1
9+
rev: 7.3.0
1010
hooks:
1111
- id: flake8
1212
- repo: https://github.com/ibm/detect-secrets
13-
rev: 0.13.1+ibm.62.dss
13+
rev: 0.13.1+ibm.64.dss
1414
hooks:
1515
- id: detect-secrets
1616
additional_dependencies: [boxsdk<4]

.secrets.baseline

Lines changed: 20 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-09-30T07:33:15Z",
6+
"generated_at": "2025-10-27T10:20:07Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -77,6 +77,24 @@
7777
}
7878
],
7979
"results": {
80+
"bin/mas-devops-notify-slack": [
81+
{
82+
"hashed_secret": "053f5ed451647be0bbb6f67b80d6726808cad97e",
83+
"is_secret": false,
84+
"is_verified": false,
85+
"line_number": 35,
86+
"type": "Secret Keyword",
87+
"verified_result": null
88+
},
89+
{
90+
"hashed_secret": "4f75456d6c1887d41ed176f7ad3e2cfff3fdfd91",
91+
"is_secret": false,
92+
"is_verified": false,
93+
"line_number": 44,
94+
"type": "Secret Keyword",
95+
"verified_result": null
96+
}
97+
],
8098
"src/mas/devops/templates/ibm-entitlement-dockerconfig.json.j2": [
8199
{
82100
"hashed_secret": "d2e2ab0f407e4ee3cf2ab87d61c31b25a74085e5",
@@ -156,7 +174,7 @@
156174
}
157175
]
158176
},
159-
"version": "0.13.1+ibm.62.dss",
177+
"version": "0.13.1+ibm.64.dss",
160178
"word_list": {
161179
"file": null,
162180
"hash": null

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ build: venv
1313
rm -f README.rst
1414
. venv/bin/activate && python -m build
1515

16+
# Note: "make install" needs to be ran once before this target will work, but we
17+
# don't want to set it as a dependency otherwise it unnecessarily slows down
18+
# fast implement/test cycles. "make install" created an editable install of the
19+
# package which is linked to the files you are editing so there is no need to
20+
# re-install after each change.
21+
unit-test:
22+
. venv/bin/activate && pytest test/src/mock
23+
1624
lint: venv
1725
rm -f README.rst
1826
. 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

bin/mas-devops-notify-slack

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
#!/usr/bin/env python3
2+
3+
# *****************************************************************************
4+
# Copyright (c) 2025 IBM Corporation and other Contributors.
5+
#
6+
# All rights reserved. This program and the accompanying materials
7+
# are made available under the terms of the Eclipse Public License v1.0
8+
# which accompanies this distribution, and is available at
9+
# http://www.eclipse.org/legal/epl-v10.html
10+
#
11+
# *****************************************************************************
12+
13+
import argparse
14+
import os
15+
import sys
16+
from mas.devops.slack import SlackUtil
17+
18+
19+
def notifyProvisionFyre(channel: str, rc: int) -> bool:
20+
name = os.getenv("CLUSTER_NAME", None)
21+
if name is None:
22+
print("CLUSTER_NAME env var must be set")
23+
sys.exit(1)
24+
25+
# Support optional metadata from standard IBM CD Toolchains environment variables
26+
toolchainLink = ""
27+
toolchainUrl = os.getenv("TOOLCHAIN_PIPELINERUN_URL", None)
28+
toolchainTriggerName = os.getenv("TOOLCHAIN_TRIGGER_NAME", None)
29+
if toolchainUrl is not None and toolchainTriggerName is not None:
30+
toolchainLink = f" | <{toolchainUrl}|Pipeline Run>"
31+
32+
if rc == 0:
33+
url = os.getenv("OCP_CLUSTER_URL", None)
34+
username = os.getenv("OCP_USERNAME", None)
35+
password = os.getenv("OCP_PASSWORD", None)
36+
37+
if url is None or username is None or password is None:
38+
print("OCP_CLUSTER_URL, OCP_USERNAME, and OCP_PASSWORD env vars must all be set")
39+
sys.exit(1)
40+
41+
message = [
42+
SlackUtil.buildHeader(f":glyph-ok: Your IBM DevIT Fyre OCP cluster ({name}) is ready"),
43+
SlackUtil.buildSection(f"{url}"),
44+
SlackUtil.buildSection(f"- Username: `{username}`\n - Password: `{password}`"),
45+
SlackUtil.buildSection(f"<https://beta.fyre.ibm.com/development/vms|Fyre Dashboard>{toolchainLink}")
46+
]
47+
else:
48+
message = [
49+
SlackUtil.buildHeader(f":glyph-fail: Your IBM DevIT Fyre OCP cluster ({name}) failed to deploy"),
50+
SlackUtil.buildSection(f"<https://beta.fyre.ibm.com/development/vms|Fyre Dashboard>{toolchainLink}")
51+
]
52+
53+
response = SlackUtil.postMessageBlocks(channel, message)
54+
return response.data.get("ok", False)
55+
56+
57+
if __name__ == "__main__":
58+
# If SLACK_TOKEN or SLACK_CHANNEL env vars are not set then silently exit taking no action
59+
SLACK_TOKEN = os.getenv("SLACK_TOKEN", None)
60+
SLACK_CHANNEL = os.getenv("SLACK_CHANNEL", None)
61+
if SLACK_TOKEN is None or SLACK_CHANNEL is None:
62+
sys.exit(0)
63+
64+
# Initialize the properties we need
65+
parser = argparse.ArgumentParser()
66+
67+
# Primary Options
68+
parser.add_argument("--action", required=True)
69+
parser.add_argument("--rc", required=True, type=int)
70+
args, unknown = parser.parse_known_args()
71+
72+
if args.action == "ocp-provision-fyre":
73+
notifyProvisionFyre(SLACK_CHANNEL, args.rc)

setup.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# *****************************************************************************
2-
# Copyright (c) 2024 IBM Corporation and other Contributors.
2+
# Copyright (c) 2024, 2025 IBM Corporation and other Contributors.
33
#
44
# All rights reserved. This program and the accompanying materials
55
# are made available under the terms of the Eclipse Public License v1.0
@@ -62,15 +62,17 @@ def get_version(rel_path):
6262
'jinja2', # BSD License
6363
'jinja2-base64-filters', # MIT License
6464
'semver', # BSD License
65-
'boto3' # Apache Software License
65+
'boto3', # Apache Software License
66+
'slack_sdk', # MIT License
6667
],
6768
extras_require={
6869
'dev': [
6970
'build', # MIT License
7071
'flake8', # MIT License
7172
'pytest', # MIT License
7273
'pytest-mock', # MIT License
73-
'requests-mock' # Apache Software License
74+
'requests-mock', # Apache Software License
75+
'setuptools', # MIT License
7476
]
7577
},
7678
classifiers=[
@@ -89,6 +91,7 @@ def get_version(rel_path):
8991
scripts=[
9092
'bin/mas-devops-db2-validate-config',
9193
'bin/mas-devops-create-initial-users-for-saas',
92-
'bin/mas-devops-saas-job-cleaner'
94+
'bin/mas-devops-saas-job-cleaner',
95+
'bin/mas-devops-notify-slack',
9396
]
9497
)

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

Lines changed: 5 additions & 5 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: sha256:4699c6dbcead9bee28597f9aea944a50cb4399ee699603e6e9e0bfd699b05d1c
8+
catalog_digest: sha256:801e7f3662049c86e078dedfea78728a2f8e5674744b8b954db7de93ebabbdeb
99

1010
ocp_compatibility:
1111
- 4.15
@@ -46,7 +46,7 @@ elasticsearch_version: 1.1.2667 # Operator version 1.1.2667
4646
# Maximo Application Suite
4747
# -----------------------------------------------------------------------------
4848
mas_core_version:
49-
9.2.x-feature: 9.2.0-pre.stable_11883 # Need to update
49+
9.2.x-feature: 9.2.0-pre.stable_2456 # Updated
5050
9.1.x: 9.1.5 # Updated
5151
9.0.x: 9.0.16 # Updated
5252
8.10.x: 8.10.30 # Updated
@@ -67,7 +67,7 @@ mas_iot_version:
6767
8.10.x: 8.7.27 # Updated
6868
8.11.x: 8.8.23 # Updated
6969
mas_manage_version:
70-
9.2.x-feature: 9.2.0-pre.stable_13752 # Need to update
70+
9.2.x-feature: 9.2.0-pre.stable_14287 # Updated
7171
9.1.x: 9.1.5 # Updated
7272
9.0.x: 9.0.18 # Updated
7373
8.10.x: 8.6.31 # Updated
@@ -78,7 +78,7 @@ mas_monitor_version:
7878
8.10.x: 8.10.24 # Updated
7979
8.11.x: 8.11.22 # Updated
8080
mas_optimizer_version:
81-
9.2.x-feature: 9.2.0-pre.stable_525 # Need to update
81+
9.2.x-feature: 9.2.0-pre.stable_2382 # Updated
8282
9.1.x: 9.1.5 # Updated
8383
9.0.x: 9.0.16 # Updated
8484
8.10.x: 8.4.23 # Updated
@@ -89,7 +89,7 @@ mas_predict_version:
8989
8.10.x: 8.8.11 # Updated
9090
8.11.x: 8.9.13 # Updated
9191
mas_visualinspection_version:
92-
9.1.x: 9.1.3 # No update for 251030
92+
9.1.x: 9.1.3 # No update for v9-251030
9393
9.0.x: 9.0.13 # Updated
9494
8.10.x: 8.8.4 # No Update
9595
8.11.x: 8.9.16 # Updated

src/mas/devops/data/catalogs/v9-251030-ppc64le.yaml

Lines changed: 3 additions & 3 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: sha256:4a06a6ae769a96626c09f8f8bd157a866acc1773ceaee83bccd341a8fe9814c0
8+
catalog_digest: sha256:5d2804e69cfaaa754e664ef357a7c9dd87be25f504935e1d0c3328f5f2dc2a89
99

1010
uds_version: 2.0.12 # Operator version 2.0.12 # sticking to 2.0.12 version # Please do Not Change
1111
sls_version: 3.12.2 # Operator version 3.10.0 (https://github.ibm.com/maximoappsuite/ibm-sls/releases)
@@ -15,13 +15,13 @@ db2u_version: 7.3.1+20250821.161005.16793 # Operator version 110509.0.2 to fi
1515
# Maximo Application Suite
1616
# -----------------------------------------------------------------------------
1717
mas_core_version:
18-
9.2.x-feature: 9.2.0-pre.stable_11883 # Need to update
18+
9.2.x-feature: 9.2.0-pre.stable_2456 # Updated
1919
9.1.x: 9.1.5 # Updated
2020
9.0.x: 9.0.16 # Updated
2121
8.10.x: "" # Not Supported
2222
8.11.x: "" # Not Supported
2323
mas_manage_version:
24-
9.2.x-feature: 9.2.0-pre.stable_13752 # Need to update
24+
9.2.x-feature: 9.2.0-pre.stable_14287 # Need to update
2525
9.1.x: 9.1.5 # Updated
2626
9.0.x: 9.0.18 # Updated
2727
8.10.x: "" # Not Supported

src/mas/devops/data/catalogs/v9-251030-s390x.yaml

Lines changed: 3 additions & 1 deletion
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: sha256:06af3ce91ea4f440aa21e00f54d0697dd85bc77fdd1b093d9efafdd048924125
8+
catalog_digest: sha256:d255bacdf12edb7009c6fe6ab5289aaf3c09c582e927f5498477d14204b2b236
99

1010
uds_version: 2.0.12 # Operator version 2.0.12 # sticking to 2.0.12 version # Please do Not Change
1111
sls_version: 3.12.2 # Operator version 3.10.0 (https://github.ibm.com/maximoappsuite/ibm-sls/releases)
@@ -15,12 +15,14 @@ db2u_version: 7.2.0+20250522.212407.15144 # Operator version 110509.0.2 to fi
1515
# Maximo Application Suite
1616
# -----------------------------------------------------------------------------
1717
mas_core_version:
18+
9.2.x-feature: 9.2.0-pre.stable_2456 # Updated
1819
9.1.x-feature: 9.1.0 # No Update
1920
9.1.x: 9.1.5 # Updated
2021
9.0.x: 9.0.16 # Updated
2122
8.10.x: "" # Not Supported
2223
8.11.x: "" # Not Supported
2324
mas_manage_version:
25+
9.2.x-feature: 9.2.0-pre.stable_14287 # Updated
2426
9.1.x-feature: 9.1.0 # No Update
2527
9.1.x: 9.1.5 # Updated
2628
9.0.x: 9.0.18 # Updated

src/mas/devops/mas.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ def getDefaultStorageClasses(dynClient: DynamicClient) -> dict:
7070
result.rwo = "ocs-external-storagecluster-ceph-rbd"
7171
result.rwx = "ocs-external-storagecluster-cephfs"
7272
break
73+
elif storageClass.metadata.name == "longhorn":
74+
result.provider = "longhorn"
75+
result.providerName = "Longhorn"
76+
result.rwo = "longhorn"
77+
result.rwx = "longhorn"
78+
break
7379
elif storageClass.metadata.name == "nfs-client":
7480
result.provider = "nfs"
7581
result.providerName = "NFS Client"

0 commit comments

Comments
 (0)