Skip to content

fix(ci): repair reusable notify-slack workflow to fix post-merge startup_failure - #11452

Closed
nv-tusharma wants to merge 2 commits into
mainfrom
ci/fix-post-merge-startup-failure
Closed

fix(ci): repair reusable notify-slack workflow to fix post-merge startup_failure#11452
nv-tusharma wants to merge 2 commits into
mainfrom
ci/fix-post-merge-startup-failure

Conversation

@nv-tusharma

@nv-tusharma nv-tusharma commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Problem

The Post-Merge CI Pipeline is currently down — it fails to start (startup_failure, 0 jobs, ~1s) on every commit that includes #11365 ("ci: extract shared Slack notifier into a reusable workflow").

Confirmed by recurrence:

Root cause

When #11365 moved the Slack notifier into the reusable .github/workflows/notify-slack.yml, it declared the webhook secret as required: true:

    secrets:
      SLACK_NOTIFY_NIGHTLY_WEBHOOK_URL:
        required: true

A reusable workflow that marks a secret required: true makes GitHub gate the caller's startup on that secret being present — even when the caller passes secrets: inherit. If the secret isn't available in the calling context, GitHub aborts the entire calling run at compile time with startup_failure and 0 jobs. This is invisible to YAML parsing and to actionlint (both lint clean).

The pre-#11365 inline notifier referenced the same webhook lazily inside a step, where a missing secret simply resolves to empty at runtime — no startup gate. That single lazy→required: true change is the whole regression.

This also affects nightly-ci.yml, which uses the same reusable workflow with secrets: inherit and will hit the same startup gate on its next scheduled run.

Fix

Declare the secret required: false. secrets: inherit still passes it through when present; when absent it resolves empty at runtime — matching the pre-#11365 inline behavior. This removes the startup gate and fixes both callers (post-merge and nightly).

Validation

  • YAML parses cleanly.
  • actionlint on notify-slack.yml + post-merge-ci.yml: exit 0, clean.

🤖 Generated with Claude Code


Open in Devin Review

Summary by CodeRabbit

  • Bug Fixes
    • Made the nightly Slack webhook optional, so workflows no longer fail at startup when the secret isn’t provided.
    • Slack notifications will now proceed without error when the webhook value is unavailable.

@nv-tusharma
nv-tusharma requested a review from a team as a code owner July 9, 2026 00:37

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Slack notification step fails when the webhook secret is absent, despite being declared optional

The notification step runs with an empty webhook URL (webhook: ${{ secrets.SLACK_NOTIFY_NIGHTLY_WEBHOOK_URL }} at .github/workflows/notify-slack.yml:98) when the secret is missing, so the Slack action errors out instead of being silently skipped.

Impact: In contexts where the webhook secret is not configured, any run with failures will crash the notifier job, turning a graceful skip into a visible CI failure.

The if-condition on the Notify Slack step doesn't guard against an absent secret

The PR changes the secret declaration to required: false (line 37) and the comment on lines 28-35 explicitly promises to "tolerate absence at runtime in the Notify Slack step below." However, the step's if condition (line 95) only checks steps.failed-jobs.outputs.has_failures == 'true' — it does not verify the webhook secret is non-empty.

When secrets.SLACK_NOTIFY_NIGHTLY_WEBHOOK_URL is absent, it resolves to an empty string. The slackapi/slack-github-action v2.x requires a valid webhook URL and will error when given an empty one. The step needs an additional guard:

if: steps.failed-jobs.outputs.has_failures == 'true' && secrets.SLACK_NOTIFY_NIGHTLY_WEBHOOK_URL != ''

(Refers to line 95)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved in a6ef73f. Guarded the step so it skips (not fails) when the webhook is absent. Note the suggested secrets.SLACK_NOTIFY_NIGHTLY_WEBHOOK_URL != '' in the step if isn't valid — the secrets context isn't available in step if conditions — so I bound the secret to a job-level env var and guarded on env.SLACK_WEBHOOK_URL != ''.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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: a0fe3b1f-3ec6-4392-a3db-810768c015c5

📥 Commits

Reviewing files that changed from the base of the PR and between 88ddd8a and 13d9e92.

📒 Files selected for processing (1)
  • .github/workflows/notify-slack.yml

Walkthrough

The pull request modifies the reusable Slack notification GitHub Actions workflow, changing the SLACK_NOTIFY_NIGHTLY_WEBHOOK_URL secret declaration from required to optional, with added comments clarifying runtime handling when the secret is absent.

Changes

Slack Notify Workflow Update

Layer / File(s) Summary
Make Slack webhook secret optional
.github/workflows/notify-slack.yml
Changes SLACK_NOTIFY_NIGHTLY_WEBHOOK_URL under on.workflow_call.secrets from required: true to required: false, adding comments noting the caller should not fail at startup if the secret is missing, and the notify step should tolerate its absence at runtime.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR includes problem, root cause, fix, and validation, but it misses the required Related Issues section and reviewer-start guidance from the template. Add the template sections for Where should the reviewer start? and Related Issues, and include the issue link or confirmed no-issue checkbox.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the reusable Slack notifier workflow fix.
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.

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

…tup_failure

The Post-Merge CI pipeline began failing at startup (startup_failure, 0 jobs,
~1s) on every push after PR #11365 extracted the Slack notifier into the
reusable workflow .github/workflows/notify-slack.yml. Confirmed on run
28982827972 (commit f1de717, PR #11365 itself) and run 28985152222 (commit
88ddd8a, a descendant merged after #11365) -- every post-merge run started
before #11365 created jobs normally, so the reusable refactor is the cause.

The reusable workflow declared its Slack webhook secret as `required: true`
under `on.workflow_call.secrets`. GitHub gates the CALLER's startup on a
`required: true` secret existing even when the caller passes `secrets: inherit`;
when the secret is absent in a given context the whole calling run fails at
startup with 0 jobs. This server-side validation is invisible to YAML parsing
and to actionlint (both are clean on the committed files). The pre-#11365 inline
notifier referenced the same webhook lazily, so a missing secret simply resolved
to empty at runtime instead of blocking startup.

Mark the secret `required: false` to remove the startup gate while still
inheriting it when present -- restoring the pre-refactor behavior for both the
Post-merge and Nightly callers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nv-tusharma
nv-tusharma force-pushed the ci/fix-post-merge-startup-failure branch from 13d9e92 to 0bbc615 Compare July 9, 2026 00:40
@pull-request-size pull-request-size Bot added size/XS and removed size/S labels Jul 9, 2026
@datadog-official

datadog-official Bot commented Jul 9, 2026

Copy link
Copy Markdown

Pipelines

⚠️ Warnings

🚦 2 Pipeline jobs failed

PR | backend-status-check   View in Datadog   GitHub Actions

PR | trtllm-runtime / Test cuda13.1, amd64   View in Datadog   GitHub Actions

ℹ️ Info

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 41.48%

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: a6ef73f | Docs | Give us feedback!

The reusable notifier fired on failures with an empty webhook when the
now-optional SLACK_NOTIFY_NIGHTLY_WEBHOOK_URL secret is missing, and the
Slack action rejects an empty URL — turning a graceful skip into a job
failure. Bind the secret to a job-level env var (the secrets context is
unavailable in step if conditions) and guard the step on it being
non-empty, matching the PR's stated intent to tolerate absence at runtime.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pull-request-size pull-request-size Bot added size/S and removed size/XS labels Jul 9, 2026
@nv-tusharma
nv-tusharma enabled auto-merge (squash) July 9, 2026 00:58
@nv-tusharma
nv-tusharma disabled auto-merge July 9, 2026 01:03
@nv-tusharma nv-tusharma closed this Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants