ci: format CUOPT_SLACK_MENTION_ID as subteam when ID starts with S#1187
Merged
rgsl888prabhu merged 1 commit intoNVIDIA:mainfrom May 7, 2026
Merged
Conversation
Slack user and user-group mentions use different syntax: <@U...> for users, <!subteam^S...> for user groups. The previous code always wrapped the ID as <@...>, so passing a user-group ID rendered as plain text and produced no notification. Detect user-group IDs by their S prefix and emit the subteam syntax, keeping the user-mention path unchanged. Update the contract comment to spell out both forms and warn that handle names will not ping.
tmckayus
approved these changes
May 7, 2026
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.
Summary
Sprefix and emit<!subteam^S...>syntax.U/W) continue to use<@U...>.Why
Today's nightly Slack post (2026-05-07) showed
@cuopt-ci-teamrendered as plain text — the message arrived but produced no notification. Root cause:ci/utils/generate_slack_payloads.pyalways wrappedCUOPT_SLACK_MENTION_IDas<@id>, which is user-only syntax. Slack requires<!subteam^SXXXXXXXX>to ping a user group. Passing the group's handle name (cuopt-ci-team) or itsS...ID with the old formatter both fail silently.Test plan
CUOPT_SLACK_MENTION_ID=SXXXXXXXX→ next nightly with new failures pings thecuopt-ci-teamgroup.U...) still renders as<@U...>(no behavior change for that path).CUOPT_SLACK_MENTION_IDproduces no mention (existing behavior preserved).Notes
Builds on #1182, which plumbs the
CUOPT_SLACK_MENTION_IDsecret through the workflow. Either order of merge works; this PR only touches the formatter.