DEVOPS

Record Flaky-Test Events to Postgres and Alert Discord on Spikes

Accepts flaky-test events posted by your CI via webhook, appends each occurrence to a Postgres ledger.

CategoryDevOps
Enginesim
Difficultybeginner
Triggerwebhook
Steps5
Setup~5 min

How it runs

The automated pipeline, trigger to output.

  • TriggerCI posts flaky-test event via webhookHTTP webhook
  • ActionInsert occurrence into Postgres ledgerPostgreSQLPostgres
  • ActionQuery today's count for this testPostgreSQLPostgres
  • LogicSpike threshold crossed and not yet alerted?
  • OutputPost spike alert to DiscordDiscordDiscord

What it does

This workflow gives you a durable, queryable history of flaky-test occurrences independent of any CI vendor. Your pipeline posts a small JSON payload whenever a test is detected as flaky; the flow stores it and watches for tests that suddenly spike, alerting the team before a single flaky test tanks the day's builds.

When to use it

Use this when you want to own your flaky-test data in your own database — for custom dashboards or SLAs — and want a fast heads-up when a previously quiet test starts failing repeatedly in a short window.

How it works

  1. 1An HTTP webhook trigger receives a flaky-test event from CI (test name, SHA, branch, timestamp).
  2. 2The flow inserts the occurrence as a row into a Postgres flaky-events table.
  3. 3It queries today's occurrence count for that test.
  4. 4A logic step checks whether the count crossed the spike threshold and hasn't already alerted today.
  5. 5If so, it posts a spike alert to the Discord engineering channel with the test name and recent count.
  6. 6An acknowledgement is returned to the caller.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect HTTP webhookTrigger any URL on agent actions.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  3. 3
    Connect DiscordCommunity channels + voice + bots.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.