ROSAENG-66395 | feat: add notification-contacts flag to CLI #3500
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3500"
general
weight: 0.35
michaelryanmcneill
PR Summary
Add
--notification-contactsflag torosa create clusterandrosa edit cluster, and display notification contacts inrosa describe clusteroutput (both text and JSON).Detailed Description of the Issue
ROSA cluster owners need the ability to configure additional OCM account usernames or email addresses to receive cluster notification emails directly from the CLI. Notification contacts are stored on the cluster's subscription (OCM Accounts Management API), not the cluster object itself.
This PR adds end-to-end CLI support for managing notification contacts:
additionalAllowedPrincipalspattern with''to clear)The implementation uses the OCM SDK's
SubscriptionBuilder.NotificationContacts()PATCH endpoint, which replaces the entire contact list atomically. Both OCM usernames and email addresses are accepted — the API resolves emails to usernames internally. Since the CLI has no state between runs (unlike the Terraform provider), there is no drift risk from accepting emails.Related Issues and PRs
Type of Change
Previous Behavior
The
rosaCLI had no support for managing notification contacts. Cluster owners had to use the OCM API directly or the web console to configure additional notification email recipients.Behavior After This Change
rosa create clusterNew
--notification-contactsflag accepts a comma-separated list of OCM usernames or email addresses. Contacts are set via the Accounts Management API immediately after cluster creation (before returning).Interactive mode prompts for notification contacts only if deploying with a service account.
rosa edit clusterNew
--notification-contactsflag to add, modify, or clear contacts:Interactive mode asks whether to update contacts, shows current contacts as the default, and allows comma-separated input.
rosa describe clusterNotification contacts are displayed in both text and JSON output when contacts exist:
Text output:
JSON output:
When no contacts are set, the field is omitted from both outputs.
How to Test (Step-by-Step)
Preconditions
rosaCLI built from this branch (make rosa)rosa login)Test Steps
1. Build the CLI:
2. Set notification contacts on an existing cluster:
3. Verify contacts appear in describe (text):
Look for
Notification Contacts:line.4. Verify contacts appear in describe (JSON):
5. Clear contacts:
6. Verify contacts are cleared:
Should return
null.7. Run unit tests:
8. Run structure tests:
Expected Results
rosa edit cluster --notification-contactssets, modifies, or clears contactsrosa describe clusterdisplays contacts in both text and JSON outputrosa create cluster --notification-contactssets contacts at creation timeProof of the Fix
make test), structure tests passing, lint clean (make lint), build succeeds (make rosa)Breaking Changes
Breaking Change Details / Migration Plan
N/A
Developer Verification Checklist
[JIRA-TICKET] | [TYPE]: <MESSAGE>.make install-hookshas been run in this clone.make testpasses.make lintpasses.make rosapasses.[ROSAENG-66395]: https://redhat.atlassian.net/browse/ROSAENG-66395?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
- Configure cluster notification contacts during creation or editing using comma-separated usernames or email addresses.
- Set, replace, or clear contacts through interactive prompts or command-line options.
- Generated cluster recreation commands preserve configured contacts.
- View notification contacts in structured and human-readable cluster descriptions.
- Contacts are deduplicated and displayed in sorted order.
- Clear errors are reported when contact updates cannot be completed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->