Skip to content

Commit 6fdd2ce

Browse files
Merge branch 'stable' into notification-ap
2 parents 68e3d16 + 42fe0e4 commit 6fdd2ce

12 files changed

Lines changed: 533 additions & 26 deletions

AGENT_INSTRUCTIONS.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# python-devops AI Coding Instructions
2+
3+
## Project Overview
4+
Python package for IBM Maximo DevOps utilities. Provides command-line tools for deployment automation, database validation, Slack notifications, and user management. Distributed as installable package with `setup.py`/`pyproject.toml` and standalone scripts in `bin/`.
5+
6+
## Architecture
7+
- **bin/**: Executable CLI scripts (entry points)
8+
- `mas-devops-*`: Command-line tools for specific operations
9+
- Scripts import from `src/` package for implementation
10+
- Each script typically wraps a single operational task
11+
- **src/**: Main package source code
12+
- Organized by module/function (import path: `from mas_devops import ...`)
13+
- Core utilities: configuration management, API clients, database handlers
14+
- **test/**: Test suite (pytest structure)
15+
- Mirror `src/` structure in test files
16+
- Run with `pytest` or `make test`
17+
- **build/**: Generated artifacts (don't edit)
18+
- `*.egg-info/`: Package metadata
19+
- `dist/`, `*.whl`: Distribution packages
20+
- **setup.py** / **pyproject.toml**: Package definition
21+
- Entry points defined in setup.py pointing to `bin/` scripts
22+
- Dependencies in both files (must keep in sync)
23+
- Version defined once (check both files)
24+
25+
## Key Patterns
26+
- **CLI Tool Pattern**: `bin/mas-devops-*` scripts are thin wrappers
27+
- Import main logic from `src/mas_devops/`
28+
- Handle argument parsing and error reporting
29+
- Example: `mas-devops-notify-slack` → calls slack notification module
30+
- **Dependency Management**:
31+
- Core dependencies in `setup.py` `install_requires`
32+
- Dev dependencies in `setup.py` `extras_require['dev']`
33+
- `requirements.txt` for pinned versions (reproducible installs)
34+
- Keep all three in sync
35+
- **Entry Points**: `setup.py` defines CLI commands
36+
- Format: `'mas-devops-task-name = mas_devops.module:main_function'`
37+
- Creates executable scripts in `bin/` when package installed
38+
- **Module Organization**: Import directly from package
39+
- `from mas_devops.db2_validator import validate_config`
40+
- Avoid deep nesting; keep public API clear
41+
42+
## Development Workflow
43+
```bash
44+
make install # Install package in dev mode (pip install -e .)
45+
make test # Run pytest suite
46+
make test-verbose # Pytest with verbose output
47+
make build # Build distribution (wheel/tarball)
48+
make clean # Remove build artifacts
49+
make all # Clean, test, build
50+
```
51+
52+
## Important Conventions
53+
- **Python Version**: Check `setup.py` for `python_requires` (e.g., `>=3.8`)
54+
- **Entry Points**: Adding new CLI tool requires editing `setup.py` entry_points section
55+
- **Error Handling**: CLI scripts should catch exceptions and exit with meaningful error messages
56+
- **Logging**: Use Python logging module; configure in main module
57+
- **Testing**: Test structure mirrors source; test file for `src/module.py` is `test/test_module.py`
58+
- **Documentation**: Docstrings in functions should describe parameters, return, exceptions
59+
- **Imports**: Use absolute imports from package (`from mas_devops import ...`), not relative
60+
61+
## Common CLI Tools (Reference)
62+
- `mas-devops-create-initial-users-for-saas`: User provisioning (SaaS)
63+
- `mas-devops-db2-validate-config`: Validate DB2 configuration
64+
- `mas-devops-notify-slack`: Send notifications
65+
- `mas-devops-saas-job-cleaner`: Cleanup SaaS jobs
66+
67+
## Integration Points
68+
- **ansible-devops**: Playbooks call these Python utilities for infrastructure setup
69+
- **playbook**: Runbooks document procedures; Python tools automate them
70+
- **Standalone Usage**: Scripts can be called independently or from other tools via entry points
71+
- **Distribution**: Package installed via pip; entry points register CLI commands globally
72+
73+
## When Adding New CLI Tool
74+
1. Create implementation module in `src/mas_devops/`
75+
2. Create script in `bin/mas-devops-tool-name` or update `setup.py` entry_points
76+
3. Add entry to `setup.py` entry_points section
77+
4. Add tests in `test/` matching module structure
78+
5. Update `requirements.txt` if adding dependencies
79+
6. Test with `make install` then run `mas-devops-tool-name --help`
80+
81+
## Packaging & Distribution
82+
- Build: `python -m build` or `make build`
83+
- Outputs: wheel file in `dist/` ready for pip install
84+
- Version managed in `setup.py` (check both setup.py and pyproject.toml)

src/mas/devops/data/__init__.py

Lines changed: 18 additions & 10 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, 2026 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
@@ -20,7 +20,11 @@
2020
from os import path
2121

2222

23-
def getCatalog(name: str) -> dict | None:
23+
class NoSuchCatalogError(Exception):
24+
pass
25+
26+
27+
def getCatalog(name: str) -> dict:
2428
"""
2529
Load a specific IBM Operator Catalog definition by name.
2630
@@ -32,21 +36,25 @@ def getCatalog(name: str) -> dict | None:
3236
3337
Returns:
3438
dict: The catalog definition dictionary containing operator versions and metadata.
35-
Returns None if the catalog file doesn't exist.
39+
40+
Raises:
41+
NoSuchCatalogError: If the specified catalog does not exist.
3642
"""
3743
moduleFile = path.abspath(__file__)
3844
modulePath = path.dirname(moduleFile)
3945
catalogFileName = f"{name}.yaml"
4046

4147
pathToCatalog = path.join(modulePath, "catalogs", catalogFileName)
4248
if not path.exists(pathToCatalog):
43-
return None
49+
raise NoSuchCatalogError(
50+
f"Catalog {name} is unknown: {pathToCatalog} does not exist"
51+
)
4452

4553
with open(pathToCatalog) as stream:
4654
return yaml.safe_load(stream)
4755

4856

49-
def listCatalogTags(arch="amd64") -> list:
57+
def listCatalogTags(arch="amd64") -> list[str]:
5058
"""
5159
List all available IBM Operator Catalog tags for a specific architecture.
5260
@@ -70,7 +78,7 @@ def listCatalogTags(arch="amd64") -> list:
7078
return result
7179

7280

73-
def getNewestCatalogTag(arch="amd64") -> str | None:
81+
def getNewestCatalogTag(arch="amd64") -> str:
7482
"""
7583
Get the most recent IBM Operator Catalog tag for a specific architecture.
7684
@@ -83,11 +91,13 @@ def getNewestCatalogTag(arch="amd64") -> str | None:
8391
8492
Returns:
8593
str: The newest catalog tag (e.g., "v9-241205-amd64").
86-
Returns None if no catalogs are found for the architecture.
94+
95+
Raises:
96+
NoSuchCatalogError: If no catalogs are found for the specified architecture.
8797
"""
8898
catalogs = listCatalogTags(arch)
8999
if len(catalogs) == 0:
90-
return None
100+
raise NoSuchCatalogError(f"There are no known catalogs for the {arch} platform")
91101
else:
92102
return catalogs[-1]
93103

@@ -174,7 +184,5 @@ def getCatalogEditorial(catalogTag: str) -> dict | None:
174184
or has no editorial content.
175185
"""
176186
catalog = getCatalog(catalogTag)
177-
if not catalog:
178-
return None
179187

180188
return catalog.get("editorial")

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ db2u_version: 7.3.1+20250821.161005.16793 # Operator version 110509.0.2 to fi
2121
# Maximo Application Suite
2222
# -----------------------------------------------------------------------------
2323
mas_core_version:
24-
9.2.x-feature: 9.2.0-pre.stable_6280 # Updated
24+
9.2.x-feature: 9.2.0-pre.stable_6976 # Updated
2525
9.1.x: 9.1.7 # Updated
2626
9.0.x: 9.0.18 # Updated
2727
8.10.x: "" # Not Supported

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ db2u_version: 7.3.1+20250821.161005.16793 # Operator version 110509.0.2 to fi
2121
# Maximo Application Suite
2222
# -----------------------------------------------------------------------------
2323
mas_core_version:
24-
9.2.x-feature: 9.2.0-pre.stable_6280 # Updated
24+
9.2.x-feature: 9.2.0-pre.stable_6976 # Updated
2525
9.1.x: 9.1.7 # Updated
2626
9.0.x: 9.0.18 # Updated
2727
8.10.x: "" # Not Supported

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

Lines changed: 26 additions & 2 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:8e5e1245f70ec96b4c5f81d52e1e41d8efd015eeb1e0fd1c769b1866b174f7fe
8+
catalog_digest: sha256:54bcab31205bf3a5e0e0769158127b70b514e3a965ddd8f02785afe53171f0ee
99

1010
ocp_compatibility:
1111
- 4.16
@@ -22,7 +22,7 @@ common_svcs_version_1: 4.11.0 # Additional version 4.11.0
2222
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/)
2323
ibm_zen_version: 6.2.0+20250530.152516.232 # For CPD5 ibm-zen has to be explicitily mirrored
2424

25-
db2u_version: 7.5.1+20251217.121408.18568 # Operator version 110509.0.7 to find the version 7.5.1+20251217.121408.18568, search db2u-operator digest on repo (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator)
25+
db2u_version: 7.3.1+20250821.161005.16793 # Operator version 110509.0.7 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
db2_channel_default: v110509.0 # Default Channel version for db2u-operator
2727
events_version: 5.0.1 # Operator version 5.0.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator)
2828
uds_version: 2.0.12 # Operator version 2.0.12 # sticking to 2.0.12 version # Please do Not Change
@@ -129,6 +129,10 @@ mongo_extras_version_8: 8.0.17
129129
db2u_extras_version: 1.0.6 # No Update
130130
db2u_filter: db2
131131

132+
# Extra Images for CCS used for PCD 5.2.0 Hotfix
133+
# ------------------------------------------------------------------------------
134+
ccs_extras_version: 11.0.0
135+
132136
# Extra Images for IBM Watson Discovery
133137
# ------------------------------------------------------------------------------
134138
#wd_extras_version: 1.0.4
@@ -144,3 +148,23 @@ cpd_product_version_default: 5.2.0
144148
manage_extras_913: 9.1.3
145149
minio_version: RELEASE.2025-06-13T11-33-47Z
146150

151+
editorial:
152+
whats_new:
153+
- title: '**Security updates and bug fixes**'
154+
details:
155+
- IBM Maximo Application Suite Core Platform v8.10, v8.11, v9.0 and v9.1
156+
- IBM Maximo Manage v8.6, v8.7, v9.0 and v9.1
157+
- IBM Maximo IoT v8.7, v8.8, v9.0 and v9.1
158+
- IBM Maximo Monitor v8.10, v8.11, v9.0 and v9.1
159+
- IBM Maximo Optimizer v8.4, 8.5 and v9.1
160+
- IBM Maximo Assist v9.1 and v9.0
161+
- IBM Maximo Predict v8.8, v8.9, v9.0 and v9.1
162+
- IBM Maximo Visual Inspection v8.9, v9.0 and v9.1
163+
- IBM Maximo Real Estate and Facilities v9.1
164+
- IBM Maximo AI Service v9.1
165+
- IBM Maximo Location Service for Esri v9.0 and v9.1
166+
- IBM Suite License Service v3.12
167+
- IBM Data Dictionary v1.1
168+
known_issues:
169+
- title: Customers using **Maximo Assist v8.7 or v8.8** should not update and must instead contact IBM Support for guidance regarding the removal of IBM Watson Discovery and upgrading to Maximo Assist v9.0
170+
- title: A known issue exists in the January 29, 2026 release affecting HSE and Oil & Gas (9.0.23 / 9.1.64). Customers with HSE installed should avoid upgrading to the January release. Installation of HSE or Oil & Gas on Manage 9.0.x / 9.1.x should be deferred until the February 2026 patch.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
# Case bundle configuration for IBM Maximo Operator Catalog 260129 (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:16f3e2862d2be141c2993a5d83cb287ee987b2dc1380a4739ee78f31fd57124b
9+
10+
ocp_compatibility:
11+
- 4.16
12+
- 4.17
13+
- 4.18
14+
- 4.19
15+
16+
uds_version: 2.0.12 # Operator version 2.0.12 # sticking to 2.0.12 version # Please do Not Change
17+
sls_version: 3.12.5 # Operator version 3.12.5 (https://github.ibm.com/maximoappsuite/ibm-sls/releases)
18+
tsm_version: 1.7.2 # Operator version 1.7.2 (https://github.ibm.com/maximoappsuite/ibm-truststore-mgr/releases)
19+
db2u_version: 7.3.1+20250821.161005.16793 # Operator version 110509.0.7 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)
20+
21+
# Maximo Application Suite
22+
# -----------------------------------------------------------------------------
23+
mas_core_version:
24+
9.2.x-feature: 9.2.0-pre.stable_9887 # Updated
25+
9.1.x: 9.1.8 # Updated
26+
9.0.x: 9.0.19 # Updated
27+
8.10.x: "" # Not Supported
28+
8.11.x: "" # Not Supported
29+
mas_manage_version:
30+
9.2.x-feature: 9.2.0-pre.stable_10282 # Updated
31+
9.1.x: 9.1.8 # Updated
32+
9.0.x: 9.0.21 # Updated
33+
8.10.x: "" # Not Supported
34+
8.11.x: "" # Not Supported
35+
36+
# Extra Images for UDS
37+
# ------------------------------------------------------------------------------
38+
uds_extras_version: 1.5.0
39+
40+
# Extra Images for Mongo
41+
# ------------------------------------------------------------------------------
42+
mongo_extras_version_default: 8.0.17
43+
44+
# Variables used to mirror additional mongo image versions
45+
mongo_extras_version_4: 4.4.21
46+
mongo_extras_version_5: 5.0.23
47+
mongo_extras_version_6: 6.0.12
48+
mongo_extras_version_7: 7.0.12
49+
mongo_extras_version_8: 8.0.17
50+
51+
editorial:
52+
whats_new:
53+
- title: '**Security updates and bug fixes**'
54+
details:
55+
- IBM Maximo Application Suite Core Platform v8.10, v8.11, v9.0 and v9.1
56+
- IBM Maximo Manage v8.6, v8.7, v9.0 and v9.1
57+
known_issues:
58+
- title: A known issue exists in the January 29, 2026 release affecting HSE and Oil & Gas (9.0.23 / 9.1.64). Customers with HSE installed should avoid upgrading to the January release. Installation of HSE or Oil & Gas on Manage 9.0.x / 9.1.x should be deferred until the February 2026 patch.

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

Lines changed: 6 additions & 8 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:8628069464de6761e3d58304a6ffd2eb8c815ca54563d826983469e0e36b9ce5
8+
catalog_digest: sha256:8ea3f0ab4086047fd00547ed39921703f4bf1e938e77bca368a9f799534755b8
99

1010
ocp_compatibility:
1111
- 4.16
@@ -16,7 +16,7 @@ ocp_compatibility:
1616
uds_version: 2.0.12 # Operator version 2.0.12 # sticking to 2.0.12 version # Please do Not Change
1717
sls_version: 3.12.5 # Operator version 3.12.5 (https://github.ibm.com/maximoappsuite/ibm-sls/releases)
1818
tsm_version: 1.7.2 # Operator version 1.7.2 (https://github.ibm.com/maximoappsuite/ibm-truststore-mgr/releases)
19-
db2u_version: 7.5.1+20251217.121408.18568 # Operator version 110509.0.7 to find the version 7.5.1+20251217.121408.18568, search db2u-operator digest on repo (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator)
19+
db2u_version: 7.3.1+20250821.161005.16793 # Operator version 110509.0.7 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)
2020

2121
# Maximo Application Suite
2222
# -----------------------------------------------------------------------------
@@ -50,11 +50,9 @@ mongo_extras_version_8: 8.0.17
5050

5151
editorial:
5252
whats_new:
53-
- title: '**MongoDb v8.0.17** support Running `mas update` will automatically upgrade existing MongoDbCommunity instances to MongoDb version v8.0.17 this requires MongoDb version to be on v7 or later.'
54-
details: []
5553
- title: '**Security updates and bug fixes**'
5654
details:
57-
- IBM Maximo Application Suite Core Platform v9.0 and v9.1
58-
- IBM Maximo Manage v9.0 and v9.1
59-
- IBM Suite License Service v3.12
60-
known_issues: []
55+
- IBM Maximo Application Suite Core Platform v8.10, v8.11, v9.0 and v9.1
56+
- IBM Maximo Manage v8.6, v8.7, v9.0 and v9.1
57+
known_issues:
58+
- title: A known issue exists in the January 29, 2026 release affecting HSE and Oil & Gas (9.0.23 / 9.1.64). Customers with HSE installed should avoid upgrading to the January release. Installation of HSE or Oil & Gas on Manage 9.0.x / 9.1.x should be deferred until the February 2026 patch.

0 commit comments

Comments
 (0)