Add Slack notifications for analytics deployment workflows (dbt + Terraform)#79
Open
SonaliBedge wants to merge 1 commit into
Open
Add Slack notifications for analytics deployment workflows (dbt + Terraform)#79SonaliBedge wants to merge 1 commit into
SonaliBedge wants to merge 1 commit into
Conversation
andreaHG
reviewed
Jun 1, 2026
andreaHG
left a comment
Collaborator
There was a problem hiding this comment.
Nice work here! I'm assuming we'll probably want to remove staging references here since that's not active.
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.
Context & Motivation
Analytics deployment workflows (
dbt-on-mergeandterraform-apply) had no visibility into success or failure after a PR merged. Without notifications, a failed dbt build or Terraform apply would go unnoticed until someone manually checked the Actions tab. This adds Slack notifications to the#mfb-releaseschannel matching the pattern already in place forbenefits-apiandbenefits-calculator.Changes Made
.github/actions/analytics-slack-notify/action.yml— a reusablecomposite action that sends a Slack Block Kit message with environment,
status (success/failure), a direct link to the workflow run, and commit
info (SHA, author, message)
dbt-on-merge.yml— addedGet commit infoandNotify Slack (success/failure)steps; fires on staging only since this workflow nevertargets production
terraform-apply.yml— added same steps; environment label(
stagingorproduction) is derived dynamically fromgithub.event.inputs.environmentto match the job's own environmentexpression
Testing
dbt Build on MergeorTerraform Applymanually via
workflow_dispatchand confirm a Slack message appearsin
#mfb-releaseswith correct status, environment label, commitinfo, and working "View Logs" link
the ❌ message fires
Deployment
Add
SLACK_WEBHOOK_URLas a repository-level secret beforemerging (Settings → Secrets and variables → Actions → Repository
secrets). It must be repository-level, not environment-scoped,
because the
notifysteps run outside the environment contextNotes for Reviewers
The composite action lives at
.github/actions/analytics-slack-notify/following the same local action pattern used in
benefits-apiTwo separate notifications fire when a PR touches both
dbt/anddashboards/— this is intentional (each links to its own workflow run)rather than a combined notification via
workflow_run, which issignificantly more complex and unreliable
Get commit infousesif: always()so it captures the SHA/author/messageeven when an earlier step failed, ensuring the failure notification
includes full commit context
Known limitations: production notifications currently include commit info
rather than a release tag/URL — a release-based production deployment
trigger can be added in a follow-up if needed
Future considerations: could add a
#mfb-data-alertschannel for nightlydbt cron failures separately from merge-triggered deployment notifications