Every 5 minutes
Tell the team in Slack when a Heroku release fails
A failed release is posted to your team channel, so it isn't only the person who pushed who knows.
- Runs
- Every 5 minutes
- Apps
- Heroku
- AI
- Not needed
- Access
- read
Send this to your assistant
Create a ClickRuntime automation: every 5 minutes check releases for my Heroku app 'shop-api-prod' and post to #deploys in Slack whenever one fails, with the version and who released it.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
On Heroku, a deploy can fail in ways that only the person who pushed notices. A release phase command errors out, a migration times out, a buildpack fails, and the app keeps running the previous version. Everyone assumes the new feature is live. The developer who pushed it is in a meeting, the product manager tells a customer it shipped, and the discrepancy surfaces hours later when someone asks why the change is not there.
Every 5 minutes, recent releases for your apps are listed, those with a failed status are kept, and a message tells the team, with the app name and the release version. Because it goes to a shared channel, not only to whoever ran git push, the problem has several pairs of eyes quickly.
It suits teams where several people deploy, or where deploys are triggered from CI or Git integrations.
What you get out of it
Failed deploys are fixed quickly
A shared alert gets someone on it within minutes, so the app does not sit on an old version while the team believes the new one is live. That shortens the time between a broken deploy and a working one.
Nobody promises a feature that did not ship
Product and support teams learn when a release failed, which stops them from telling customers a fix is out when it is not. A wrong promise to a customer is far harder to repair than a short delay.
Pushes from CI are covered too
A deploy triggered by GitHub or a pipeline does not always notify a person. A shared message makes sure someone sees every failure, whoever started it. This matters on teams where auto-deploy from the main branch means nobody is watching the push.
Failed migrations are caught early
Release phase failures, such as a migration that times out, can leave a database half-changed. Seeing them promptly limits the damage. Fixing a half-applied change within minutes is much safer than finding out next morning.
The whole team shares context
With a channel record of failed releases, patterns become visible, such as a flaky release command that fails every few days. Fixing such flaky steps permanently saves hours of wasted deploys over a quarter.
How it works
What happens, step by step
Every five minutes ClickRuntime checks the recent releases of your Heroku app.
It keeps only the ones that failed and skips any it has already posted.
Your team's Slack channel gets the release number, app, who released it and its description.
Before it runs live
- Connect Heroku
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Heroku steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_trigger, credentials, http, notify, state, report_fetched
HEROKU = "https://api.heroku.com"
def heroku(path, **headers):
resp = http.get(f"{HEROKU}{path}", headers={"Accept": "application/vnd.heroku+json; version=3",
"Authorization": f"Bearer {credentials.secret('HEROKU_API_KEY')}", **headers})
resp.raise_for_status()
return resp.json()
@on_trigger
def run(event):
releases = heroku("/apps/shop-api-prod/releases", Range="version ..; order=desc,max=20")
last = state.get("last_version") or 0
new = [r for r in releases if r["version"] > last]
report_fetched(len(new))
if not new:
return {"new": 0}
for r in new:
if r["status"] == "failed":
notify.slack(f"Release v{r['version']} of shop-api-prod failed, released by {r['user']['email']}: {r['description']}", channel="#deploys")
state.set("last_version", max(r["version"] for r in new))
return {"new": len(new)}FAQ
Common questions
Does it alert on successful releases?
How fast will I hear about a failed release?
Which apps are watched?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Get alerted when a Heroku dyno crashes
When any dyno of your app enters a crashed state, you get one email about it.
See how it worksGet a weekly list of your Heroku apps and dynos
Each Monday you see every app with its dyno types and counts, which makes forgotten apps easy to spot.
See how it worksGet a monthly report of Heroku add-on costs
On the 1st you receive every add-on across your apps with its plan and monthly price, with new ones highlighted.
See how it worksKeep exploring
Set up “Tell the team in Slack when a Heroku release fails” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.