Skip to content

feat(slack-deploy-notification): include version + diff since last prod release#143

Merged
pdodgen-revparts merged 1 commit into
mainfrom
DEVEX-slack-deploy-diff-link
Jul 8, 2026
Merged

feat(slack-deploy-notification): include version + diff since last prod release#143
pdodgen-revparts merged 1 commit into
mainfrom
DEVEX-slack-deploy-diff-link

Conversation

@pdodgen-revparts

Copy link
Copy Markdown
Contributor

Summary

Enriches the shared prod-deploy Slack message with two things:

  1. Deployed image tag on its own line in the message body (previously only surfaced via the accessory button, easy to miss on a quick scan)
  2. View changes since <prev> link that opens a GitHub compare view between the previous prod release and the current one

Rendered example (mrkdwn)

Before:

internal_api deployed by patrickdodgen
View the Deployment
View the Service APM

After:

internal_api deployed by patrickdodgen
Version: `v4.7.6`
View the Deployment
View the Service APM
View changes since v4.7.5

Design

  • Scope: prod only. Every consumer already calls this shared workflow with `if: inputs.environment == 'prod'`, so no new input is required. Verified via `gh search code` across encodium/*.
  • Previous release detection: `gh release list --exclude-drafts --exclude-pre-releases` → filter out the current tag → sort by `publishedAt` desc → pick top. Matches the RT v2 promotion semantic (`prerelease=false` = shipped to prod).
  • Compare URL: `${{ github.server_url }}/${{ github.repository }}/compare/${PREV}...${CURRENT}`
  • Edge cases:
    • First-ever prod release: diff line omitted gracefully (no compare against nothing)
    • Same tag redeployed (rollback or manual redeploy): filters self out, uses the next most recent
    • No releases API access: fails the notify step, but the deploy itself already succeeded — cosmetic-only impact

Blast radius

Every consumer of `slack-deploy-notification.yaml` picks up the change on next prod deploy. Callers observed via cross-repo search: 20+ repos including internal_api, radmin, prices-api, laravel-api-template, reporting-app, suppliers-api, payment_api, pub_buyer_api, etc.

Verification

Once merged, the next prod deploy for any consumer will emit an enriched message. The compute step also `echo`s the previous tag + compare URL to the workflow run log for debugging.

Follow-ups

  • Jellyfish deploy notification (`jellyfish-deploy-notification.yaml`) untouched — team plans to remove that path entirely per today's conversation.

Related

  • DEVEX-1653 (RT v2)

…od release

Adds two things to the prod deploy Slack message:
  1. The deployed image tag on its own line (previously only in the accessory button)
  2. A 'View changes since <prev>' link that opens a GitHub compare view
     between the previous prod release and the current one

The shared workflow is always called with `if: inputs.environment == 'prod'`
by every consumer, so no new input is needed. The previous prod release is
computed by walking the GH Releases API and picking the most recent
non-current, non-draft, non-prerelease entry.

Edge cases:
  - First-ever prod release for a repo → the diff line is omitted gracefully
  - Same tag deployed twice (rollback / redeploy) → filters self out,
    picks the next most recent

Refs DEVEX-1653.
@cursor

cursor Bot commented Jul 8, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
CI notification-only change; deploys are unaffected if release lookup fails, aside from a failed notify step.

Overview
Prod deploy Slack notifications from the shared slack-deploy-notification workflow now show the deployed image_tag on its own line in the message body, not only on the accessory button.

A new step resolves the prior production release via gh release list (non-draft, non-prerelease, excluding the current tag) and appends a View changes since <prev> link to a GitHub compare URL. If there is no earlier prod release, that line is omitted.

Reviewed by Cursor Bugbot for commit c2ec023. Bugbot is set up for automated code reviews on this repo. Configure here.

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c2ec023. Configure here.

printf '%s' "$DIFF_LINE"
echo
echo "EOF"
} >> "$GITHUB_OUTPUT"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Multiline output breaks Slack JSON

High Severity

The diff_line step output is written with a multiline GITHUB_OUTPUT block that includes an extra echo after printf, so the stored value ends with a real newline. That output is pasted raw into the Slack payload JSON text field, which produces invalid JSON and can cause the notification step to fail on prod deploys.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c2ec023. Configure here.

@pdodgen-revparts
pdodgen-revparts marked this pull request as ready for review July 8, 2026 20:14
@pdodgen-revparts
pdodgen-revparts requested a review from a team as a code owner July 8, 2026 20:14
@pdodgen-revparts
pdodgen-revparts merged commit 5e8aeba into main Jul 8, 2026
2 checks passed
@pdodgen-revparts
pdodgen-revparts deleted the DEVEX-slack-deploy-diff-link branch July 8, 2026 20:14
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