Skip to content

ci(frontend-deploy): report every deploy outcome in one Slack message - #8371

Merged
talissoncosta merged 1 commit into
mainfrom
fix/frontend-deploy-slack-noise
Aug 27, 2026
Merged

ci(frontend-deploy): report every deploy outcome in one Slack message#8371
talissoncosta merged 1 commit into
mainfrom
fix/frontend-deploy-slack-noise

Conversation

@talissoncosta

@talissoncosta talissoncosta commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

#frontend-deploy gets three messages per deploy: a start card and a terminal card from the GitHub Slack app, plus our own notification. The app's ✅ succeeded card duplicates ours with less detail, no commit, no actor, no link to production. On 25 Aug that was ~18 messages for 6 runs.

Our notification only fired on success, so unsubscribing the app would have lost the failed and cancelled cases. This moves them here.

  • The job now runs on always() and takes its outcome from needs.deploy-production.result, not the run's own conclusion. deploy-demo and deploy-demo2 run alongside production, so one failed demo would otherwise report production as failed while it was serving the new release.
  • Three outcomes: deployed, failed, stopped. Only a deploy gets the Open Production button and the smoke test ask.
  • The card carries the run start time and duration, replacing the app's start ping.
  • Cancelled gets its own wording. Job level concurrency on run-tests stops a run whenever the next commit lands on main, so most cancellations mean superseded, and the app rendered those with a red cross. The copy does not assert what production is serving, since a hand cancellation can land mid-deploy.
  • The Block Kit payload moves to payload.jq, so it can be read and run on its own.

18 messages down to 6, one per run.

Deployed

image

Failed

image

Stopped (superseded)

image

Follow-up, not in this PR

Once a superseded run has been reported by the new card, the app subscription needs removing from the channel by hand, otherwise the duplicates continue. Waiting for that specific case is deliberate: it is the one path that depends on always() scheduling a job after a cancellation, which cannot be verified before merge.

/github unsubscribe Flagsmith/flagsmith workflows:{name:"Frontend Deploy to Production" event:"push" branch:"main"}

How did you test this code?

Rendered all three cards through Slack's Block Kit Builder using the action's real payload.jq (screenshots above). Ran payload.jq directly for every conclusion: success and cancelled get their own copy, failure, timed_out and skipped all read as failed, and with no timings supplied the Started and Duration fields drop out. Checked the timing logic in an ubuntu:24.04 container since it needs GNU date -d, covering both timestamps, start only, neither, end before start, and unparseable input.

Checked the outcome mapping across the seven needs.*.result combinations that can occur, including production succeeding while a demo fails, which reports success.

Not exercised end to end, and it cannot be: this workflow only runs on push to main. The Slack step is continue-on-error: true and the job is downstream of the deploy, so nothing here can affect a deploy. The one behaviour that needs a live run is whether always() schedules the job after a concurrency cancellation, which is why the unsubscribe waits on seeing a supersede reported.

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

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

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Aug 27, 2026 1:01pm
flagsmith-frontend-preview Ignored Ignored Preview Aug 27, 2026 1:01pm
flagsmith-frontend-staging Ignored Ignored Preview Aug 27, 2026 1:01pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a7e89e81-fd39-4ce2-ae09-4a40a782d4ef

📥 Commits

Reviewing files that changed from the base of the PR and between ac4de12 and 769f96c.

📒 Files selected for processing (1)
  • .github/workflows/frontend-deploy-production.yml

Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The deploy Slack action now accepts deployment outcome and run metadata. It calculates optional start and duration fields, then renders an external payload.jq template. The template creates success, cancellation, and failure messages with conditional links. The production workflow now always reports the combined result of tests and deployment jobs, retrieves the run start time, and invokes the action with failure-tolerant execution.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: 🔵 Low · up to 769f9

The workflow now reports deployed, failed, and stopped outcomes in a single Slack notification. A stopped notification may still communicate an incorrect production state if cancellation occurs after deployment begins, so merge is appropriate with explicit owner awareness or follow-up to make that wording fully state-agnostic.


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

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

@github-actions github-actions Bot added the ci-cd Build, test and deployment related label Aug 25, 2026
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.81%. Comparing base (b9b32ba) to head (769f96c).
⚠️ Report is 22 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8371      +/-   ##
==========================================
+ Coverage   98.79%   98.81%   +0.01%     
==========================================
  Files        1616     1620       +4     
  Lines       65283    65908     +625     
==========================================
+ Hits        64499    65124     +625     
  Misses        784      784              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@talissoncosta
talissoncosta force-pushed the fix/frontend-deploy-slack-noise branch from ccd5061 to 30cb8f9 Compare August 27, 2026 11:33
@github-actions github-actions Bot added ci-cd Build, test and deployment related and removed ci-cd Build, test and deployment related labels Aug 27, 2026
@talissoncosta
talissoncosta force-pushed the fix/frontend-deploy-slack-noise branch from 30cb8f9 to e3ac0f0 Compare August 27, 2026 11:46
@github-actions github-actions Bot added ci-cd Build, test and deployment related and removed ci-cd Build, test and deployment related labels Aug 27, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d8a98cd8-4121-420e-8cf2-be16a4beaa65

📥 Commits

Reviewing files that changed from the base of the PR and between 17243dc and e3ac0f0.

📒 Files selected for processing (4)
  • .github/actions/notify-slack-deploy/action.yml
  • .github/actions/notify-slack-deploy/payload.jq
  • .github/workflows/frontend-deploy-notify.yml
  • .github/workflows/frontend-deploy-production.yml
💤 Files with no reviewable changes (1)
  • .github/workflows/frontend-deploy-production.yml

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Comment thread .github/actions/notify-slack-deploy/payload.jq
@talissoncosta
talissoncosta force-pushed the fix/frontend-deploy-slack-noise branch from e3ac0f0 to ac4de12 Compare August 27, 2026 12:48
@github-actions github-actions Bot added ci-cd Build, test and deployment related and removed ci-cd Build, test and deployment related labels Aug 27, 2026
@talissoncosta
talissoncosta marked this pull request as ready for review August 27, 2026 12:50
@talissoncosta
talissoncosta requested a review from a team as a code owner August 27, 2026 12:50
@talissoncosta
talissoncosta requested review from Zaimwa9 and emyller and removed request for a team August 27, 2026 12:50
@github-actions github-actions Bot added ci-cd Build, test and deployment related and removed ci-cd Build, test and deployment related labels Aug 27, 2026
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-8371 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-8371 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-8371 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api:pr-8371 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-8371 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-8371 Finished ✅ Results

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b8e569de-107b-4b51-a907-48a31de08e8c

📥 Commits

Reviewing files that changed from the base of the PR and between e3ac0f0 and ac4de12.

📒 Files selected for processing (1)
  • .github/actions/notify-slack-deploy/payload.jq

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.

Comment thread .github/actions/notify-slack-deploy/payload.jq
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor
✅ private-cloud · depot-ubuntu-latest-16 — run #19883 (attempt 2)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  37.5 seconds
commit  769f96c
info  🔄 Run: #19883 (attempt 2)

🗂️ Previous results
❌ private-cloud · depot-ubuntu-latest-16 — run #19883 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

failed  2 failed

Details

stats  2 tests across 2 suites
duration  58.1 seconds
commit  769f96c
info  📦 Artifacts: View test results and HTML report
🔄 Run: #19883 (attempt 1)

Failed tests

firefox › tests/environment-permission-test.pw.ts › Environment Permission Tests › Environment-level permissions control access to features, identities, and segments @enterprise
firefox › tests/project-permission-test.pw.ts › Project Permission Tests › Project-level permissions control access to features, environments, audit logs, and segments @enterprise

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19883 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  3 passed

Details

stats  3 tests across 2 suites
duration  38.7 seconds
commit  769f96c
info  🔄 Run: #19883 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #19883 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  45.2 seconds
commit  769f96c
info  🔄 Run: #19883 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #19883 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  34.6 seconds
commit  769f96c
info  🔄 Run: #19883 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #19882 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  32.6 seconds
commit  ac4de12
info  🔄 Run: #19882 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19882 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  23 passed
skipped  1 skipped

Details

stats  24 tests across 18 suites
duration  1 minute, 22 seconds
commit  ac4de12
info  🔄 Run: #19882 (attempt 1)

Skipped tests

firefox › tests/onboarding-tests.pw.ts › Onboarding › New user connects via the single-page onboarding flow @oss

❌ oss · depot-ubuntu-latest-16 — run #19882 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

failed  1 failed

Details

stats  1 test across 1 suite
duration  21.6 seconds
commit  ac4de12
info  📦 Artifacts: View test results and HTML report
🔄 Run: #19882 (attempt 1)

Failed tests

firefox › tests/segment-test.pw.ts › Segment test 4 - Create ANY rule type segment and verify match changes when rule is updated @oss

The deploy channel carried three messages per deploy: a run started card and
a succeeded card from the GitHub Slack app, plus our own notification. The
succeeded card said nothing ours did not already say, with less detail. On 25
August that was roughly 18 messages for 6 runs.

Unsubscribing the app would have lost the two states our notification never
covered, so cover them here. The job now runs on always() and reports
deployed, failed or stopped, and carries the run start time and duration so a
separate start notification is not needed either.

The outcome comes from needs.deploy-production.result rather than the run's
own conclusion. deploy-demo and deploy-demo2 run alongside production, so one
failed demo would otherwise report production as failed while it was serving
the new release.

Cancellation gets its own wording rather than the red cross the app used for
it. Job level concurrency stops a run in progress whenever the next commit
lands on main, so most cancellations are a supersede. It does not assert what
the environment is serving, since a hand cancellation can land mid-deploy.

The Block Kit payload moves to payload.jq. Inline in the action it could not
contain an apostrophe, since the whole program sat inside bash single quotes,
and nothing could run it directly to see what it rendered.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@talissoncosta
talissoncosta force-pushed the fix/frontend-deploy-slack-noise branch from ac4de12 to 769f96c Compare August 27, 2026 13:00
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Visual Regression

19 screenshots compared. See report for details.
View full report

@github-actions github-actions Bot added ci-cd Build, test and deployment related and removed ci-cd Build, test and deployment related labels Aug 27, 2026

@Zaimwa9 Zaimwa9 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.

All good to me 👍

@talissoncosta
talissoncosta merged commit cb66498 into main Aug 27, 2026
49 of 50 checks passed
@talissoncosta
talissoncosta deleted the fix/frontend-deploy-slack-noise branch August 27, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd Build, test and deployment related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants