Skip to content

ci: send smoke Telegram alerts only when status changes - #77

Open
Kzoeps wants to merge 5 commits into
mainfrom
ci/smoke-alert-on-change
Open

Kzoeps wants to merge 5 commits into
mainfrom
ci/smoke-alert-on-change

Conversation

@Kzoeps

@Kzoeps Kzoeps commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Problem
Scheduled smoke runs every 30 min and alerts on every failing run, so one broken check pings repeatedly.

Fix
Compare with the previous run of the same workflow and environment. Alert once on pass->fail and once on fail->pass; stay silent otherwise. Deploy failures still alert as before. CONTRIBUTING updated.

smoke.yml and the post-deploy smoke in deploy.yml now alert once when the
smoke test starts failing and once when it recovers, and stay silent while the
status is unchanged. The previous result comes from the GitHub API (previous
completed run of the same workflow and target), using the job's GITHUB_TOKEN
with actions: read; no new secrets or state store.

- telegram-alert: new status-change.mjs decides failed/recovered/none; an
  unknown previous result alerts on failure and stays silent on a pass.
- smoke.yml: run-name carries the environment so runs can be matched.
- deploy.yml: smoke compared per branch using the smoke step's conclusion;
  deploy failures still alert every time. A rollback to a commit without
  smoke.js now skips the step instead of reporting a pass.
- e2e-nightly.yml is unchanged and keeps alerting on every failure.
The change check compared whole-run conclusions, so a lost Telegram send, an
install flake, or a run that never finished the smoke test counted as "already
alerted" and silenced the next real failure. Give the smoke step an id and
compare its outcome and the previous run's step of the same name, as deploy.yml
does. Failures before the smoke test finished alert every time in a separate
step.
The checkout now runs after successful deploys too, so a GitHub fetch error
would turn a good deploy red and then run an alert step with a missing action.
Make it continue-on-error and run the alert steps only when it succeeded.
curl --retry 2 shrinks the chance that a transient Telegram error loses an
alert. If status-change.mjs exits 0 without writing send= (for example when the
entry-point guard is false), alert on failure like any other script error. A
spawn test covers the script run as a program, and the test that asserted the
impossible "current run is in the completed list" case is trimmed.
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
api-endpoints Ready Ready Preview Nov 16, 2026 9:18am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 32 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2b6b5fb5-c809-4011-b5a9-8d6a5b5725e9
Commits

Reviewing files that changed from the base of the PR and between 4e7caa5 and 9df026a.

Files selected for processing: 6

  • .github/actions/telegram-alert/action.yml
  • .github/actions/telegram-alert/status-change.mjs
  • .github/workflows/deploy.yml
  • .github/workflows/smoke.yml
  • CONTRIBUTING.md
  • happyview-modules/tests/unit/tooling/status-change.test.js
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@changeset-bot

changeset-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9df026a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@sonarqubecloud

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

This branch was successfully deployed

1 active deployment
Preview — 9df026a8 Deployed Nov 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant