Unverified Commit a1f230e9 authored by Dmitry Tokarev's avatar Dmitry Tokarev Committed by GitHub
Browse files

fix: disable Allure reporting to stop gh-pages bloat (#7982)


Signed-off-by: default avatarDmitry Tokarev <dtokarev@nvidia.com>
Co-authored-by: default avatarClaude Opus 4.6 (1M context) <noreply@anthropic.com>
parent 99199f49
...@@ -26,9 +26,11 @@ on: ...@@ -26,9 +26,11 @@ on:
jobs: jobs:
resolve-params: resolve-params:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: >- # Disabled: gh-pages branch bloated to ~1GB after 72 commits of Allure reports
github.event_name == 'workflow_dispatch' || if: false
github.event.workflow_run.conclusion != 'skipped' # if: >-
# github.event_name == 'workflow_dispatch' ||
# github.event.workflow_run.conclusion != 'skipped'
outputs: outputs:
run_id: ${{ steps.params.outputs.run_id }} run_id: ${{ steps.params.outputs.run_id }}
subdir: ${{ steps.params.outputs.subdir }} subdir: ${{ steps.params.outputs.subdir }}
......
...@@ -53,26 +53,31 @@ jobs: ...@@ -53,26 +53,31 @@ jobs:
echo "No allure results found. Skipping report generation." echo "No allure results found. Skipping report generation."
fi fi
- name: Inject workflow label into allure results - name: Inject workflow label and CI link into allure results
if: steps.check-results.outputs.has_results == 'true' if: steps.check-results.outputs.has_results == 'true'
env: env:
WORKFLOW_LABEL: ${{ inputs.workflow_label }} WORKFLOW_LABEL: ${{ inputs.workflow_label }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ inputs.run_id }}
run: | run: |
# The conftest.py hook doesn't fire for all tests, so inject # Inject dynamo_workflow label (for dashboard filtering) and CI run link
# dynamo_workflow label into all result files to ensure workflow # (for tracing test failures to the originating workflow run) into all
# tiles in the unified dashboard capture every test. # result files. Uses the triggering run_id, not the generating run,
# so imported results in the unified dashboard link to the correct run.
python3 -c " python3 -c "
import json, glob, sys import json, glob, sys
wf = sys.argv[1] wf, run_url = sys.argv[1], sys.argv[2]
for f in glob.glob('allure-results/*-result.json'): for f in glob.glob('allure-results/*-result.json'):
with open(f, 'r') as fh: with open(f, 'r') as fh:
data = json.load(fh) data = json.load(fh)
labels = data.setdefault('labels', []) labels = data.setdefault('labels', [])
if not any(l.get('name') == 'dynamo_workflow' for l in labels): if not any(l.get('name') == 'dynamo_workflow' for l in labels):
labels.append({'name': 'dynamo_workflow', 'value': wf}) labels.append({'name': 'dynamo_workflow', 'value': wf})
links = data.setdefault('links', [])
if not any(l.get('name') == 'CI Run' for l in links):
links.append({'name': 'CI Run', 'url': run_url, 'type': 'custom'})
with open(f, 'w') as fh: with open(f, 'w') as fh:
json.dump(data, fh) json.dump(data, fh)
" "$WORKFLOW_LABEL" " "$WORKFLOW_LABEL" "$RUN_URL"
- name: Install Allure 2 CLI - name: Install Allure 2 CLI
if: steps.check-results.outputs.has_results == 'true' if: steps.check-results.outputs.has_results == 'true'
...@@ -92,7 +97,7 @@ jobs: ...@@ -92,7 +97,7 @@ jobs:
env: env:
SUBDIR: ${{ inputs.subdir }} SUBDIR: ${{ inputs.subdir }}
run: | run: |
git fetch origin gh-pages:gh-pages 2>/dev/null || echo "No gh-pages branch yet" git fetch --depth=1 origin gh-pages:gh-pages 2>/dev/null || echo "No gh-pages branch yet"
# Restore history for Allure 2 report (at allure/v2/${SUBDIR}/) # Restore history for Allure 2 report (at allure/v2/${SUBDIR}/)
if git show "gh-pages:allure/v2/${SUBDIR}/history" 2>/dev/null; then if git show "gh-pages:allure/v2/${SUBDIR}/history" 2>/dev/null; then
...@@ -121,8 +126,8 @@ jobs: ...@@ -121,8 +126,8 @@ jobs:
# Copy this workflow's results (exclude Allure 2 history dir) # Copy this workflow's results (exclude Allure 2 history dir)
rsync -a --exclude='history' allure-results/ unified-workspace/allure-results/ rsync -a --exclude='history' allure-results/ unified-workspace/allure-results/
# Fetch stored results from other workflows on gh-pages # Fetch stored results from other workflows on gh-pages (redundant if already fetched above, harmless)
git fetch origin gh-pages:gh-pages 2>/dev/null || true git fetch --depth=1 origin gh-pages:gh-pages 2>/dev/null || true
for dir in pr post-merge nightly release; do for dir in pr post-merge nightly release; do
if [ "$dir" = "$SUBDIR" ]; then continue; fi if [ "$dir" = "$SUBDIR" ]; then continue; fi
if git show "gh-pages:dashboard-results/${dir}" 2>/dev/null; then if git show "gh-pages:dashboard-results/${dir}" 2>/dev/null; then
...@@ -155,52 +160,65 @@ jobs: ...@@ -155,52 +160,65 @@ jobs:
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
git config user.name "github-actions[bot]" git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com" git config user.email "github-actions[bot]@users.noreply.github.com"
# Reuse the checkout token for push access
git config http.https://github.com/.extraheader "AUTHORIZATION: basic $(echo -n "x-access-token:${{ github.token }}" | base64)" git config http.https://github.com/.extraheader "AUTHORIZATION: basic $(echo -n "x-access-token:${{ github.token }}" | base64)"
# Pull existing gh-pages content or start fresh # Apply all report files on top of the latest gh-pages state.
if git ls-remote --exit-code origin gh-pages &>/dev/null; then # Extracted as a function so it can be re-run on push conflict.
git fetch origin gh-pages apply_changes() {
git checkout gh-pages if git ls-remote --exit-code origin gh-pages &>/dev/null; then
else git fetch --depth=1 origin gh-pages
git checkout --orphan gh-pages git checkout -B gh-pages FETCH_HEAD
fi else
git checkout --orphan gh-pages
git rm -rf . 2>/dev/null || true
fi
# Deploy Allure 2 report # Deploy Allure 2 report
mkdir -p "allure/v2/${SUBDIR}" mkdir -p "allure/v2/${SUBDIR}"
rm -rf "allure/v2/${SUBDIR}/"* rm -rf "allure/v2/${SUBDIR}/"*
cp -r "${GITHUB_WORKSPACE}/allure-report/"* "allure/v2/${SUBDIR}/" cp -r "${GITHUB_WORKSPACE}/allure-report/"* "allure/v2/${SUBDIR}/"
# Store raw results for unified dashboard aggregation (exclude Allure 2 history) # Store raw results for unified dashboard aggregation (exclude Allure 2 history)
mkdir -p "dashboard-results/${SUBDIR}" mkdir -p "dashboard-results/${SUBDIR}"
rm -rf "dashboard-results/${SUBDIR}/"* rm -rf "dashboard-results/${SUBDIR}/"*
rsync -a --exclude='history' "${GITHUB_WORKSPACE}/allure-results/" "dashboard-results/${SUBDIR}/" rsync -a --exclude='history' "${GITHUB_WORKSPACE}/allure-results/" "dashboard-results/${SUBDIR}/"
# Deploy unified dashboard (per-workflow tabs generated by allurerc.mjs plugins) # Deploy unified dashboard (per-workflow tabs generated by allurerc.mjs plugins)
mkdir -p allure # Clean plugin tabs first — each run generates fresh files with unique UUIDs,
cp -r "${GITHUB_WORKSPACE}/allure-all-report/"* allure/ # and cp -r merges rather than replaces, causing unbounded file accumulation.
# Persist history.jsonl for trend charts (written by Allure 3 at process.cwd()) rm -rf allure/pr allure/postMerge allure/nightly allure/release \
if [ -f "${GITHUB_WORKSPACE}/history.jsonl" ]; then allure/vllm allure/sglang allure/trtllm \
cp "${GITHUB_WORKSPACE}/history.jsonl" allure/history.jsonl allure/post-merge
fi mkdir -p allure
cp -r "${GITHUB_WORKSPACE}/allure-all-report/"* allure/
# Persist history.jsonl for trend charts (written by Allure 3 at process.cwd())
if [ -f "${GITHUB_WORKSPACE}/history.jsonl" ]; then
cp "${GITHUB_WORKSPACE}/history.jsonl" allure/history.jsonl
fi
# Commit and push # Stage and commit
git add -A git add -A
if git diff --cached --quiet; then if git diff --cached --quiet; then
echo "No changes to deploy" echo "No changes to deploy"
else return 1
fi
git commit -m "Deploy Allure reports for ${SUBDIR} (run ${{ github.run_id }})" git commit -m "Deploy Allure reports for ${SUBDIR} (run ${{ github.run_id }})"
# Retry push with rebase to handle concurrent gh-pages updates }
for i in 1 2 3; do
if git push origin gh-pages; then # Apply changes and push with retry on conflict.
break # Concurrent deploys can cause push rejection — retry by fetching
fi # the latest gh-pages and re-applying all changes on top.
echo "Push failed, retrying with rebase (attempt $i/3)..." for attempt in 1 2 3; do
git fetch origin gh-pages apply_changes || exit 0 # exit 0 if no changes
git rebase origin/gh-pages if git push origin gh-pages; then
done echo "Deploy successful (attempt $attempt)"
fi exit 0
fi
echo "Push failed (attempt $attempt/3), waiting 5s before retrying..."
sleep 5
done
echo "::error::Deploy failed after 3 attempts"
exit 1
- name: Print report URLs - name: Print report URLs
if: steps.check-results.outputs.has_results == 'true' if: steps.check-results.outputs.has_results == 'true'
......
...@@ -430,7 +430,9 @@ jobs: ...@@ -430,7 +430,9 @@ jobs:
allure-report: allure-report:
needs: [vllm-pipeline, sglang-pipeline, trtllm-pipeline, deploy-test-vllm, deploy-test-sglang, deploy-test-trtllm] needs: [vllm-pipeline, sglang-pipeline, trtllm-pipeline, deploy-test-vllm, deploy-test-sglang, deploy-test-trtllm]
if: ${{ !cancelled() }} # Disabled: gh-pages branch bloated to ~1GB after 72 commits of Allure reports
if: false
# if: ${{ !cancelled() }}
uses: ./.github/workflows/generate-allure-report.yml uses: ./.github/workflows/generate-allure-report.yml
with: with:
run_id: ${{ github.run_id }} run_id: ${{ github.run_id }}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment