From 98285f4d9c255ababe64533086503e195bdfe34f Mon Sep 17 00:00:00 2001 From: kevin Heifner Date: Mon, 7 Sep 2026 13:18:57 -0500 Subject: [PATCH] ci: report real job results in the build notification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `all-passing` job passed `job-results` as a comma-separated list. Wire-Network/notification-action word-splits that input on whitespace and matches each word against `^([^:]+):([^:]+)$`, so a comma-separated list arrives as a single multi-colon word, matches nothing, and parses to `{}`. Every status probe against `{}` is false, so the action fell through to its `else` branch and posted `✅ SUCCESS` to Mattermost regardless of what the jobs did. Run 34144933071 failed the gcc build leg and still reported success. Switch to the space-separated form the action actually parses. JSON is not a usable alternative here: the action interpolates the input unquoted into a double-quoted shell assignment, which strips the inner quotes and yields invalid JSON that fails the same way. Also report `platform-cache` and `v`, and gate on them. Both feed `build-test-package`, so a failure in either leaves the build `skipped` and the notification naming a job that never ran. Neither can report `skipped` itself — `platform-cache`'s `Discover Platforms` and `v` are unconditional — so gating on them adds no false reds. The merge gate was never affected; the trailing `run: false` step failed the job correctly and the run showed red on GitHub. Only the chat message was wrong. --- .github/workflows/linux_amd64_build.yaml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux_amd64_build.yaml b/.github/workflows/linux_amd64_build.yaml index 98e4eb0c2e..758a0b3d3e 100644 --- a/.github/workflows/linux_amd64_build.yaml +++ b/.github/workflows/linux_amd64_build.yaml @@ -649,7 +649,9 @@ jobs: all-passing: name: All Required Tests Passed - needs: [ build-test-package, root-node-tooling, verify-packages ] + # platform-cache and v gate build-test-package: when either fails the build is + # skipped, so both must be named here or the report blames a job that never ran. + needs: [ platform-cache, v, build-test-package, root-node-tooling, verify-packages ] if: always() runs-on: ubuntu-latest steps: @@ -660,8 +662,22 @@ jobs: webhook-url: ${{ secrets.WEBHOOK_URL }} notification-type: 1 workflow-name: "Build & Test Workflow" - job-results: "build-test-package:${{ needs.build-test-package.result }},root-node-tooling:${{ needs.root-node-tooling.result }},verify-packages:${{ needs.verify-packages.result }}" + # SPACE-separated `job:status` pairs. The action word-splits this input; a + # comma-separated list arrives as one multi-colon word, parses to {}, and + # is reported as SUCCESS whatever the jobs actually did. + job-results: >- + platform-cache:${{ needs.platform-cache.result }} + discover-versions:${{ needs.v.result }} + build-test-package:${{ needs.build-test-package.result }} + root-node-tooling:${{ needs.root-node-tooling.result }} + verify-packages:${{ needs.verify-packages.result }} github-context: ${{ toJSON(github) }} - - if: needs.build-test-package.result != 'success' || needs.root-node-tooling.result != 'success' || needs.verify-packages.result != 'success' + - name: Fail when any required job did not succeed + if: >- + needs.platform-cache.result != 'success' + || needs.v.result != 'success' + || needs.build-test-package.result != 'success' + || needs.root-node-tooling.result != 'success' + || needs.verify-packages.result != 'success' run: false