Skip to content

WRONG DIAGNOSIS — do not merge (discord-notify exit 127) - #8

Closed
bjornars wants to merge 1 commit into
mainfrom
bsn/discord-notify-invoke-with-bash
Closed

bjornars wants to merge 1 commit into
mainfrom
bsn/discord-notify-invoke-with-bash

Conversation

@bjornars

@bjornars bjornars commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

This PR is based on a wrong diagnosis. Do not merge it. The comment it adds to action.yml asserts something false — bash IS on these runners' PATH, via pkgs.bash in extraPackages.

The real cause, from the step's actual stderr rather than my theorising:

discord-notify.sh: line 40: jq: command not found

The interpreter resolved and the script ran. It died calling jq, which is not installed on the self-hosted runners — sisyphus/guest.nix lists bash, coreutils, gnumake, glibc.bin, python3, gnupg, docker, git, nix and openssh, and no jq.

That puts jq squarely in the category guest.nix already documents for gnumake and python3: something a hosted ubuntu image ships and this VM does not. So the fix is one line there, not here.

The alternative — dropping the jq dependency and encoding JSON in bash — is worse. content exists precisely so the action does the encoding centrally and a PR title containing a quote cannot produce invalid JSON. Hand-rolling that escaping reintroduces the class of bug the input was added to remove.

Left open only so the wrong reasoning is visible next to the right one. Close it once the runner change lands.

Every notification since the action landed has failed with exit 127 in
about 16ms, so the alert never reached Discord — including the smoke-test
failures the schedule fires on main.

The action executed the script directly and relied on
`#!/usr/bin/env bash`. The self-hosted runners are NixOS: the step's own
shell is an absolute /nix/store path and bash is not on PATH, so env
cannot resolve an interpreter and exec fails 127.

gaia had this right before the move. It called
`bash .github/scripts/discord-notify.sh`, which never consulted the
shebang; turning that into a direct execution is what introduced this.

The callers set fail-on-undeliverable: false, so the lost alert did not
fail their jobs — a notification that silently does not arrive, which is
the failure this action exists to prevent, in a new place.
@bjornars
bjornars marked this pull request as draft August 28, 2026 12:40
@bjornars bjornars changed the title discord-notify: run the script through bash, not its shebang WRONG DIAGNOSIS — do not merge (discord-notify exit 127) Aug 28, 2026
@bjornars

Copy link
Copy Markdown
Contributor Author

Closing as invalid — the diagnosis was wrong.

The step's stderr says discord-notify.sh: line 40: jq: command not found. The interpreter resolved and the script ran; it died calling jq, which is absent from the self-hosted runners. bash is on their PATH via pkgs.bash in extraPackages, so the premise of this change was false and the comment it added to action.yml asserted the opposite of the truth.

The action is fine. The fix belongs in the runner config, alongside the gnumake and python3 entries that exist for the same reason — a hosted ubuntu image ships jq and these VMs do not.

@bjornars bjornars closed this Aug 28, 2026
@bjornars
bjornars deleted the bsn/discord-notify-invoke-with-bash branch August 28, 2026 12:43
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