ci: fix the Slack alert for failed scheduled tests - #2155
Open
vdusek wants to merge 3 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2155 +/- ##
==========================================
+ Coverage 93.51% 93.62% +0.11%
==========================================
Files 181 181
Lines 12653 12653
==========================================
+ Hits 11832 11846 +14
+ Misses 821 807 -14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vdusek
marked this pull request as ready for review
August 12, 2026 13:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The scheduled e2e tests failed on 2026-08-11 and 2026-08-12 without any Slack alert, while the
Notify Slack on failurejob reported success both times.What was wrong
Slack rejected the message with
400 invalid_blocks. Asectionblock'stextis capped at 3000 characters, and the*Failed jobs:*list blew past it once the whole matrix went red:section.text400 invalid_blocks400 invalid_blocksSo the alerting worked for partial failures and broke precisely when everything failed.
Nothing surfaced it because the send step never set
errors, taking the action's default offalse. That turns every delivery error into a debug log line and reports success, so a rejected alert is indistinguishable from a sent one. Running the v4.0.0 bundle directly confirms200 ok,404 no_serviceand a DNS failure all produce exit code 0 and no output.What this changes
90 failed, 0 succeededline. Both counts come from job conclusions, so the still-running notify job leaves itself out without matching on its own name.errors: true, so an undeliverable alert fails the job instead of passing quietly.slack_testdispatch input that skips the matrix and notifies anyway, under a distinct:white_circle:heading. The alert path was previously reachable only from a real scheduled failure, which is why this went unnoticed..jobsto be an array before accepting the API response. Splittinggh apifrom its--jqfilter means a malformed body that still exits 0 would otherwise abort the step underbash -e; now it falls back to the existing "unable to fetch job list" message.Verification
Ran the workflow's own payload script over the real job lists from all three failures and checked every block against Block Kit's limits: 2021, 2547 and 2546 characters, all under 3000, with the two full-matrix cases listing 46 jobs plus
... and 44 more. Replaying the 2026-08-12 data with the notify job still in progress yields90 failed, 0 succeeded, confirming the self-exclusion. Theslack_testand unreachable-API paths both produce valid messages.actionlint1.7.12 with shellcheck is clean.apify/apify-client-pythoncarries a copy of this notify job with the sameerrors: falseblind spot. Its payload is static so it cannot hit the size limit, but a dead webhook there would be equally invisible; worth a follow-up.✍️ Drafted by Claude Code