From e9f8beb69e3aeeaaaca345a4ec080830607f8214 Mon Sep 17 00:00:00 2001 From: hector <42570491+majinghe@users.noreply.github.com> Date: Wed, 16 Sep 2026 22:42:44 +0800 Subject: [PATCH] ci(ft): upload the fault-tolerance report to the dashboard (#7939) The fault-tolerance suite was the only one without a dashboard upload step - its reports never reached functional-reports/fault-tolerance/ without manual uploads. Add the standard upload step (continue-on-error, same shape as the other ten suites), placed before the artifact upload. Co-authored-by: Hauser --- .../workflows/rustfs-fault-tolerance-test.yml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/rustfs-fault-tolerance-test.yml b/.github/workflows/rustfs-fault-tolerance-test.yml index 8785a3ee0..c8da6a6b5 100644 --- a/.github/workflows/rustfs-fault-tolerance-test.yml +++ b/.github/workflows/rustfs-fault-tolerance-test.yml @@ -234,6 +234,35 @@ jobs: --package-source "${PACKAGE_SOURCE}" \ --date "$(date -u +%Y-%m-%d)" + - name: Upload functional report to dashboard + if: ${{ always() && steps.evidence.outcome == 'success' }} + continue-on-error: true + env: + GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }} + REPORT_FILE: ${{ env.REPORT_FILE }} + SUITE: fault-tolerance + run: | + set -euo pipefail + if [ -z "${GH_TOKEN:-}" ]; then + echo "PF_TESTING_GH_TOKEN is not configured; skipping dashboard upload" + exit 0 + fi + DATE="$(date -u +%Y-%m-%d)" + REPORT_PATH="functional-reports/${SUITE}/${DATE}.md" + B64_FILE="$(mktemp)" + python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}" > "${B64_FILE}" + SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)" + if [ -n "${SHA}" ]; then + jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" --arg sha "${SHA}" \ + '{message:$msg, content:($content|rtrimstr("\n")), sha:$sha}' \ + | gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null + else + jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" \ + '{message:$msg, content:($content|rtrimstr("\n"))}' \ + | gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null + fi + echo "dashboard updated: ${REPORT_PATH}" + - name: Upload test logs & evidence timeout-minutes: 2 if: ${{ always() && steps.evidence.outcome == 'success' }}