Skip to content

ci: missing Slack webhook failure handling + fix notification format - #131

Open
carole-lavillonniere wants to merge 3 commits into
localstackfrom
fix/weekly-release-slack-notification
Open

ci: missing Slack webhook failure handling + fix notification format#131
carole-lavillonniere wants to merge 3 commits into
localstackfrom
fix/weekly-release-slack-notification

Conversation

@carole-lavillonniere

@carole-lavillonniere carole-lavillonniere commented Aug 31, 2026

Copy link
Copy Markdown

Fix a few things related to the slack notification that's sent in case of release failure:

  • Check first if the webhook is set so we get a better error message in case it's not
  • notification should be json instead of yaml
  • it should be single-quoted instead of double-quoted

The weekly release failed on Aug 28 and the alert never reached Slack. The
notify job failed with:

    Missing input! Either a method or webhook is required to take action.

COSY_WEBHOOK_URL resolves to an empty string, so GitHub omits the `webhook`
input entirely and the action rejects the call. The secret exists but was
created 2026-08-12 and never updated -- one day before the weekly release
workflow landed in #108 -- and the notify path was not exercised until the
Aug 28 failure, so this alert has never worked.

Check the webhook in a preflight step that names the missing secret, and set
errors: true so Slack-side delivery failures fail the step instead of
reporting green.

Neither change can populate the secret; that still needs setting in repo
settings. They make the next failure say so in one line.
slack-github-action v4 ships js-yaml v5, which enforces stricter multiline
indentation. MESSAGE was a double-quoted YAML scalar, so its \n\n became real
newlines that were interpolated into the YAML payload at column 0 and broke
the document:

    Invalid input! Failed to parse contents of the provided payload
    SyntaxError: Expected property name or '}' in JSON at position 1

Single-quote MESSAGE so \n stays a two-character escape, and send the payload
as JSON, where an interpolated message cannot break the structure and \n is
exactly the newline Slack mrkdwn renders.

Verified end to end on a throwaway branch: the notify job was forced to run
under dryRun and delivered to Slack with errors: true, so a rejected delivery
would have failed the step.
@carole-lavillonniere carole-lavillonniere changed the title ci: make a missing Slack webhook a clear failure, not a cryptic one ci: makemissing Slack webhook clear failure + fix notification format Aug 31, 2026
@carole-lavillonniere carole-lavillonniere changed the title ci: makemissing Slack webhook clear failure + fix notification format ci: make missing Slack webhook clear failure + fix notification format Aug 31, 2026
@carole-lavillonniere carole-lavillonniere changed the title ci: make missing Slack webhook clear failure + fix notification format ci: missing Slack webhook failure handling + fix notification format Aug 31, 2026
@carole-lavillonniere
carole-lavillonniere requested review from a team and dominikschubert and removed request for dominikschubert August 31, 2026 12:18
@carole-lavillonniere
carole-lavillonniere marked this pull request as ready for review August 31, 2026 12:18
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