Skip to content

ci: forward CUOPT_SLACK_MENTION_ID secret to nightly-summary#1182

Merged
rgsl888prabhu merged 1 commit intoNVIDIA:mainfrom
rgsl888prabhu:ci/nightly-summary-slack-mention-id
May 6, 2026
Merged

ci: forward CUOPT_SLACK_MENTION_ID secret to nightly-summary#1182
rgsl888prabhu merged 1 commit intoNVIDIA:mainfrom
rgsl888prabhu:ci/nightly-summary-slack-mention-id

Conversation

@rgsl888prabhu
Copy link
Copy Markdown
Collaborator

Summary

  • Declare CUOPT_SLACK_MENTION_ID as an optional workflow_call secret on the reusable nightly-summary workflow and forward it to the run-step env.
  • Pass it from test.yaml to the nightly-summary job alongside the other Slack secrets.

Why

ci/nightly_summary.sh already forwards CUOPT_SLACK_MENTION_ID to ci/utils/generate_slack_payloads.py, which uses it to prefix <@id> mentions on new failures and new flaky tests. Until now the env var was never populated in CI, so the mention was always empty. With this change, setting the CUOPT_SLACK_MENTION_ID repo secret (Slack user ID like U01ABCDEF or group handle like S01ABCDEF) will ping the configured handle. Leaving it unset preserves the no-mention default.

Test plan

  • Add CUOPT_SLACK_MENTION_ID repo secret.
  • Trigger a nightly run (or workflow_dispatch on nightly-summary) and confirm the Slack message includes the <@id> mention on new failures.
  • Verify behavior is unchanged when the secret is unset (no mention).

The nightly_summary.sh script reads CUOPT_SLACK_MENTION_ID to mention a
Slack user/group on new failures and new flaky tests, but the secret was
never plumbed through the workflow. Declare it as an optional secret on
the reusable nightly-summary workflow and forward it from the test
workflow caller. Empty value preserves the no-mention default.
@rgsl888prabhu rgsl888prabhu requested a review from a team as a code owner May 6, 2026 16:16
@rgsl888prabhu rgsl888prabhu requested a review from AyodeAwe May 6, 2026 16:16
@rgsl888prabhu rgsl888prabhu self-assigned this May 6, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 08f9ef76-184a-4816-a328-b0deec71530e

📥 Commits

Reviewing files that changed from the base of the PR and between 733a459 and 26d3221.

📒 Files selected for processing (2)
  • .github/workflows/nightly-summary.yaml
  • .github/workflows/test.yaml

📝 Walkthrough

Walkthrough

Two GitHub Actions workflow files are updated to introduce a new optional secret CUOPT_SLACK_MENTION_ID, making it available to the nightly summary job and environment.

Changes

Slack Mention Secret Integration

Layer / File(s) Summary
Secret Definition & Environment Setup
.github/workflows/nightly-summary.yaml
New optional secret CUOPT_SLACK_MENTION_ID is declared and exported to the Run nightly summary step environment.
Job Secret Wiring
.github/workflows/test.yaml
Secret mapping for CUOPT_SLACK_MENTION_ID is added to the nightly_summary job.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: forwarding the CUOPT_SLACK_MENTION_ID secret to the nightly-summary workflow, which directly reflects the modifications across both workflow files.
Description check ✅ Passed The description comprehensively explains the changes, including the what, why, and how the CUOPT_SLACK_MENTION_ID secret is being integrated into the CI workflows, with a clear test plan.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@rgsl888prabhu rgsl888prabhu added the non-breaking Introduces a non-breaking change label May 6, 2026
@rgsl888prabhu rgsl888prabhu added the improvement Improves an existing functionality label May 6, 2026
@rgsl888prabhu rgsl888prabhu merged commit 285990b into NVIDIA:main May 6, 2026
35 checks passed
rgsl888prabhu added a commit that referenced this pull request May 7, 2026
…1187)

## Summary
- Detect user-group (subteam) IDs by their `S` prefix and emit
`<!subteam^S...>` syntax.
- User IDs (prefix `U`/`W`) continue to use `<@U...>`.
- Update the contract comment to spell out both forms and warn that
handle names alone will not ping.

## Why
Today's nightly Slack post (2026-05-07) showed `@cuopt-ci-team` rendered
as plain text — the message arrived but produced no notification. Root
cause: `ci/utils/generate_slack_payloads.py` always wrapped
`CUOPT_SLACK_MENTION_ID` as `<@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 its `S...` ID with the old
formatter both fail silently.

## Test plan
- [ ] `CUOPT_SLACK_MENTION_ID=SXXXXXXXX` → next nightly with new
failures pings the `cuopt-ci-team` group.
- [ ] Sanity-check that a user ID (`U...`) still renders as `<@U...>`
(no behavior change for that path).
- [ ] Empty/unset `CUOPT_SLACK_MENTION_ID` produces no mention (existing
behavior preserved).

## Notes
Builds on #1182, which plumbs the `CUOPT_SLACK_MENTION_ID` secret
through the workflow. Either order of merge works; this PR only touches
the formatter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants