Repository navigation
fix(notifications): include job name, exit code, and logs in job run alerts - #868
Merged
Hydralerne merged 1 commit intoSep 15, 2026
Conversation
Member
|
Incorporated this PR into Job alerts include the real exit status, name, duration, sanitized log tail, and failure reason. GitHub now records this contributor PR as merged into the integration branch. The integrated changes are tested and awaiting merge to main. Validation:
|
Hydralerne
changed the base branch from
main
to
feat/bugfix-integration-2026-09-15
September 15, 2026 18:25
Hydralerne
merged commit Sep 15, 2026
505b91e
into
oblien:feat/bugfix-integration-2026-09-15
3 checks passed
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.
Fixes #867
Context
When a scheduled or manual command job fails (e.g.
custom:BlS_iYp2_kUnHTbj), the notification category description (apps/api/src/lib/notification-categories.ts:160) promises:However, in practice the alert message only contained:
The human-readable job name/label was never printed, the exit code was omitted, and error output logs were completely absent.
Changes
job-command.ts:runLoopto passdurationMs,exitCode,error, andoutputtoemitJobRun.emitJobRunto includejobName: row.label,exitCode,errorMessage, and a boundedlogExcerpt(last 20 lines, max 2000 chars) in the notification payload.notification-workers.ts(renderMessage):Job: ${payload.jobName ?? payload.label}.Exit Code: ${payload.exitCode}.Logs:\n${payload.logExcerpt}.apps/api/test/lib/notification-headline.test.tsverifying that job failure and success alerts renderJob:,Exit Code:,Error:,Duration:, andLogs:.apps/api/test/modules/jobs/job-command.test.tsverifying that failing command runs emit notifications containingjobName,exitCode,errorMessage, andlogExcerpt.Verification
apps/api/test/modules/jobs/job-command.test.tsandapps/api/test/lib/notification-headline.test.ts), all 19 tests passing.bun run --cwd apps/api build), succeeded without errors.