Draft
Conversation
…atalog metadata (#171)
Update catalog_digest entries for amd64, ppc64le, and s390x catalog files and increment MAS manage package versions. Changes: bump catalog_digest in v9-260226-amd64/ppc64le/s390x.yaml; update mas_manage_version 9.1.x -> 9.1.11 and 9.0.x -> 9.0.23 for all platforms, and additionally on amd64 bump 8.10.x 8.6.35 -> 8.6.36 and 8.11.x 8.7.29 -> 8.7.30. These reflect rebuilt catalogs and minor/patch component updates.
This reverts commit d94bc03.
This reverts commit 93397fe.
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Comprehensive Slack Notification Support for All MAS Pipelines
🎯 Overview
This PR adds complete Slack notification support for all MAS DevOps pipelines, enabling real-time notifications for pipeline execution status. This is a brand new feature that provides:
CLI PR: ibm-mas/cli#2195
TDD: https://github.ibm.com/maximoappsuite/tdd/blob/master/docs/2025/6640-cli-slack-integration.md
Users can now receive Slack notifications at every stage of pipeline execution, including pipeline start, Ansible task progress, and pipeline completion with success/failure status.
🔄 Flow of Changes
High-Level Flow (All Pipelines)
Example Commands
Install Pipeline:
mas install --instance-id dev1 --slack-token xoxb-xxx --slack-channel "#mas-notifications"Upgrade Pipeline:
mas upgrade --instance-id dev1 --slack-token xoxb-xxx --slack-channel "#mas-notifications"Update Pipeline:
mas update --slack-token xoxb-xxx --slack-channel "#mas-notifications"Uninstall Pipeline:
mas uninstall --instance-id dev1 --slack-token xoxb-xxx --slack-channel "#mas-notifications"Detailed Notification Flow
mas-pipelinesnamespace📋 Behavior in Different Conditions
Condition 1: Instance-Specific Pipelines (Install/Upgrade/Uninstall)
When: Pipeline has an instance ID (e.g.,
mas install --instance-id dev1)Behavior:
mas-{instanceId}-pipelines(e.g.,mas-dev1-pipelines)mas-devops-slackcreated in instance namespaceslack-thread-{instanceId}-{pipelineName}(e.g.,slack-thread-dev1-Install)MAS_INSTANCE_ID,SLACK_TOKEN,SLACK_CHANNELExample:
mas install --instance-id dev1 --slack-token xoxb-xxx --slack-channel "#mas-notifications"Condition 2: Update Pipeline (Cluster-Wide)
When: Pipeline has NO instance ID (e.g.,
mas update)Behavior:
mas-pipelines(cluster-wide namespace)mas-devops-slackcreated in cluster namespaceslack-thread-update-{pipelineName}(e.g.,slack-thread-update-Update)SLACK_TOKEN,SLACK_CHANNEL(no instance ID)Example:
mas update --slack-token xoxb-xxx --slack-channel "#mas-notifications"Condition 3: No Slack Credentials Provided
When: User doesn't provide
--slack-tokenor--slack-channelBehavior:
Condition 4: Empty Channel List
When: Notification function called with empty channels list
Behavior:
Condition 5: Namespace Doesn't Exist
When: Target namespace (
mas-pipelinesormas-{instanceId}-pipelines) doesn't existBehavior:
📝 Changes Made
Common Changes
Core Functionality:
Error Handling:
Modified Files
1.
src/mas/devops/tekton.pyChanges:
prepareUpdateSlackSecrets()(lines 618-680)mas-pipelinesnamespace existsmas-devops-slacksecret with SLACK_TOKEN and SLACK_CHANNELKey Code:
2.
/Users/anilprajapati/ibm/mas/cli/python/src/mas/cli/update/app.pyChanges:
prepareUpdateSlackSecrets(line 26)Key Code:
3.
bin/mas-devops-notify-slackChanges:
Updated
notifyPipelineStart()(lines 100-157)mas-pipelinesnamespace for update pipelineUpdated
notifyAnsibleStart()(lines 160-217)Updated
notifyAnsibleComplete()(lines 219-306)Updated
notifyPipelineComplete()(lines 309-387)Key Pattern:
4.
src/mas/devops/slack.pyChanges:
Updated
createThreadConfigMap()(lines 274-303)Updated
getThreadConfigMap()(lines 306-337)Updated
updateThreadConfigMap()(lines 340-375)Updated
deleteThreadConfigMap()(lines 378-414)Key Pattern:
5.
test/src/test_slack.pyChanges:
test_notifyPipelineStart_update_pipeline_no_instance_idtest_notifyAnsibleStart_update_pipeline_no_instance_idtest_notifyAnsibleComplete_update_pipeline_no_instance_idtest_notifyPipelineComplete_update_pipeline_no_instance_idtest_notifyPipelineComplete_update_pipeline_empty_instance_idtest_notifyPipelineStart_update_pipeline_multiple_channelsTest Coverage: 42 tests total, all passing
🧪 Manual Testing
Test Scenarios
Please add screenshots for each scenario in the PR:
1. ✅ Install Pipeline with Slack Notifications
Expected:
mas-instance_id-pipelinesnamespaceslack-thread-instance_id-InstallScreenshot:

2. ✅ Update Pipeline with Slack Notifications
Expected:
mas-pipelinesnamespaceslack-thread-update-UpdateScreenshot:
3. ✅ Upgrade Pipeline with Slack Notifications
Expected:
mas-instance_id-pipelinesnamespaceslack-thread-instance_id-UpgradeScreenshot:

4. ✅ Uninstall Pipeline with Slack Notifications
Expected:
mas-instance_id-pipelinesnamespaceslack-thread-instance_id-UninstallScreenshot:

5. ✅ Update Pipeline WITHOUT Slack Credentials
Expected:
6. ✅ Multiple Channels Support
Expected:
Verification Steps
For each test scenario, verify:
🤖 Automated Test Cases
Test Suite Summary
test/src/test_slack.pyTest Categories
1. Basic Slack Messaging (2 tests)
testSendMessage()- Single channel message postingtestBroadcast()- Multi-channel message broadcasting2. Helper Functions (7 tests)
test_getClusterName_success()- Cluster name retrievaltest_getClusterName_missing()- Missing cluster name errortest_getClusterName_empty()- Empty cluster name errortest_getToolchainLink_both_set()- Toolchain link formattingtest_getToolchainLink_url_only()- Partial toolchain infotest_getToolchainLink_trigger_only()- Partial toolchain infotest_getToolchainLink_none_set()- No toolchain info3. Provisioning Notifications (9 tests)
test_notifyProvisionFyre_success()- Fyre success notificationtest_notifyProvisionFyre_success_with_additional_msg()- With extra messagetest_notifyProvisionFyre_failure()- Fyre failure notificationtest_notifyProvisionFyre_multiple_channels()- Multi-channel supporttest_notifyProvisionFyre_missing_env_vars()- Error handlingtest_notifyProvisionRoks_success()- ROKS success notificationtest_notifyProvisionRoks_success_with_additional_msg()- With extra messagetest_notifyProvisionRoks_failure()- ROKS failure notificationtest_notifyProvisionRoks_missing_url()- Error handling4. Pipeline Start Notifications (4 tests)
test_notifyPipelineStart_new_thread()- New thread creationtest_notifyPipelineStart_existing_thread()- Thread reusetest_notifyPipelineStart_multiple_channels()- Multi-channel supporttest_notifyPipelineStart_update_pipeline_no_instance_id()- NEW: Update pipeline5. Ansible Task Start Notifications (3 tests)
test_notifyAnsibleStart_success()- Task start with existing threadtest_notifyAnsibleStart_creates_thread_if_missing()- Auto-create threadtest_notifyAnsibleStart_no_channels()- Error handling6. Ansible Task Complete Notifications (4 tests)
test_notifyAnsibleComplete_success()- Successful task completiontest_notifyAnsibleComplete_failure()- Failed task completiontest_notifyAnsibleComplete_no_start_message()- Missing start messagetest_notifyAnsibleComplete_creates_thread_if_missing()- Auto-create thread7. Pipeline Complete Notifications (6 tests)
test_notifyPipelineComplete_success()- Successful completiontest_notifyPipelineComplete_failure()- Failed completiontest_notifyPipelineComplete_no_thread_info()- Error handlingtest_notifyPipelineComplete_no_channels()- Error handlingtest_notifyPipelineComplete_multiple_channels()- Multi-channel supporttest_notifyPipelineComplete_with_duration()- Duration calculation8. Update Pipeline Tests (7 tests) - NEW
test_notifyPipelineStart_update_pipeline_no_instance_id()- Pipeline start without instance IDtest_notifyAnsibleStart_update_pipeline_no_instance_id()- Task start without instance IDtest_notifyAnsibleComplete_update_pipeline_no_instance_id()- Task complete without instance IDtest_notifyPipelineComplete_update_pipeline_no_instance_id()- Pipeline complete without instance IDtest_notifyPipelineComplete_update_pipeline_empty_instance_id()- Empty string instance IDtest_notifyPipelineStart_update_pipeline_multiple_channels()- Multi-channel update pipelinemas-pipelinesvsmas-{instanceId}-pipelines)Test Coverage Areas
🔍 Key Technical Details
ConfigMap Naming Convention
slack-thread-{instanceId}-{pipelineName}slack-thread-dev1-Installslack-thread-update-{pipelineName}slack-thread-update-UpdateNamespace Selection Logic
Secret Structure
Instance-Specific Pipeline:
Update Pipeline:
📊 Impact Analysis
Backward Compatibility
Performance Impact
Security Considerations
✅ Checklist