From e80e7910fd8e4da91f422ca5b1a3837a4907b784 Mon Sep 17 00:00:00 2001 From: Danyang Chen Date: Thu, 26 Nov 2026 17:27:33 +0800 Subject: [PATCH 1/2] ci: fail the upstream tracking run when a check did not pass The upstream suite and the container smoke keep their continue-on-error, so the run's conclusion stayed green when either of them failed; only the pull request body carried the outcome. A last step now repeats each non-success outcome, emits ::error:: for it and exits 1, so a green run means both checks passed. An already-pinned day (steps.target.outputs.skip == 'true') still ends green: the step only runs when there was something to sync. The draft pull request behaviour is unchanged. Related #3399 --- .github/workflows/ds-bot-upstream-track.yml | 25 ++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ds-bot-upstream-track.yml b/.github/workflows/ds-bot-upstream-track.yml index 25252189d..e7272b00f 100644 --- a/.github/workflows/ds-bot-upstream-track.yml +++ b/.github/workflows/ds-bot-upstream-track.yml @@ -2,7 +2,8 @@ name: Track upstream DS Bot # Daily and on demand: if Fei2411/DS-Bot has a newer vX.Y.Z release than the pin, sync it into # runtime/ds-bot-upstream on a branch, run the same checks as ds-bot-upstream.yml, and open a # pull request that reports the results. It never merges. A failing run still opens the pull -# request, as a draft, so the breakage is visible. +# request, as a draft, so the breakage is visible; the run itself then fails in a last step that +# names which check did not pass, so a green run means both checks passed. # # Pull requests opened with the default GITHUB_TOKEN do not start other workflows, and the # repository must allow Actions to create pull requests. Set the secret DS_BOT_TRACK_TOKEN (a @@ -141,3 +142,25 @@ jobs: echo "::error::Could not open the pull request. Allow GitHub Actions to create pull requests in the repository settings, or set the DS_BOT_TRACK_TOKEN secret. The branch $TRACK_BRANCH is pushed." exit 1 fi + - name: Fail the run when either check did not pass + if: always() && steps.target.outputs.skip == 'false' + env: + SUITE: ${{ steps.suite.outcome }} + SMOKE: ${{ steps.smoke.outcome }} + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + TRACK_REF: ${{ steps.target.outputs.ref }} + run: | + set -euo pipefail + failed=0 + if [ "$SUITE" != success ]; then + echo "::error::Upstream suite did not pass on $TRACK_REF (outcome: ${SUITE:-empty}), so this run is red. Run log: $RUN_URL" + failed=1 + fi + if [ "$SMOKE" != success ]; then + echo "::error::Container startup smoke did not pass on $TRACK_REF (outcome: ${SMOKE:-empty}), so this run is red. Run log: $RUN_URL" + failed=1 + fi + if [ "$failed" -eq 0 ]; then + echo "Upstream suite and container startup smoke both passed on $TRACK_REF." + fi + exit "$failed" From 59a1eb15aed556e283732757ff3f4271a5d9487d Mon Sep 17 00:00:00 2001 From: Danyang Chen Date: Thu, 26 Nov 2026 17:33:44 +0800 Subject: [PATCH 2/2] ci: report a skipped check as already-red, not as its own failure `skipped` for the suite or the smoke step only happens when an earlier step already failed, so it now prints one plain line instead of an annotation and does not count towards the exit code; `failure`, `cancelled` and empty still annotate and fail. The success line is now guarded on both outcomes actually being success, so two skips cannot read as "both passed". The both-skipped, all-green path is unreachable: the step only runs when `skip == false`. --- .github/workflows/ds-bot-upstream-track.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ds-bot-upstream-track.yml b/.github/workflows/ds-bot-upstream-track.yml index e7272b00f..7c83447e4 100644 --- a/.github/workflows/ds-bot-upstream-track.yml +++ b/.github/workflows/ds-bot-upstream-track.yml @@ -151,16 +151,23 @@ jobs: TRACK_REF: ${{ steps.target.outputs.ref }} run: | set -euo pipefail + # skipped only happens when an earlier step already failed, so it is not a red of its own failed=0 - if [ "$SUITE" != success ]; then + if [ "$SUITE" = success ]; then : + elif [ "$SUITE" = skipped ]; then + echo "Upstream suite was skipped (an earlier step failed first; this run is already red)." + else echo "::error::Upstream suite did not pass on $TRACK_REF (outcome: ${SUITE:-empty}), so this run is red. Run log: $RUN_URL" failed=1 fi - if [ "$SMOKE" != success ]; then + if [ "$SMOKE" = success ]; then : + elif [ "$SMOKE" = skipped ]; then + echo "Container startup smoke was skipped (an earlier step failed first; this run is already red)." + else echo "::error::Container startup smoke did not pass on $TRACK_REF (outcome: ${SMOKE:-empty}), so this run is red. Run log: $RUN_URL" failed=1 fi - if [ "$failed" -eq 0 ]; then + if [ "$SUITE" = success ] && [ "$SMOKE" = success ]; then echo "Upstream suite and container startup smoke both passed on $TRACK_REF." fi exit "$failed"