[AMD] Fix AMD CI monitor GitHub API rate limit exhaustion (#21527)
This commit is contained in:
@@ -20,10 +20,8 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Single job filter mode
|
fetch-actions-data:
|
||||||
custom-report:
|
name: Fetch Actions Snapshot
|
||||||
name: Custom Job Report
|
|
||||||
if: ${{ inputs.job_filter }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -39,6 +37,55 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip install tabulate
|
run: pip install tabulate
|
||||||
|
|
||||||
|
- name: Select workflows for snapshot
|
||||||
|
id: select-workflows
|
||||||
|
run: |
|
||||||
|
if [[ -n "${{ inputs.job_filter }}" ]]; then
|
||||||
|
echo "workflows=pr-test-amd.yml" >> "$GITHUB_OUTPUT"
|
||||||
|
else
|
||||||
|
echo "workflows=pr-test-amd.yml,nightly-test-amd.yml,pr-test-amd-rocm720.yml,nightly-test-amd-rocm720.yml" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Fetch Actions data snapshot
|
||||||
|
timeout-minutes: 30
|
||||||
|
run: |
|
||||||
|
python scripts/ci/utils/query_job_status.py \
|
||||||
|
--repo ${{ github.repository }} \
|
||||||
|
--workflow "${{ steps.select-workflows.outputs.workflows }}" \
|
||||||
|
--hours ${{ inputs.hours || '24' }} \
|
||||||
|
--dump-data-file actions-job-snapshot.json
|
||||||
|
|
||||||
|
- name: Upload Actions data snapshot
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: actions-job-snapshot
|
||||||
|
path: actions-job-snapshot.json
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
# Single job filter mode
|
||||||
|
custom-report:
|
||||||
|
name: Custom Job Report
|
||||||
|
if: ${{ inputs.job_filter }}
|
||||||
|
needs: fetch-actions-data
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pip install tabulate
|
||||||
|
|
||||||
|
- name: Download Actions data snapshot
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: actions-job-snapshot
|
||||||
|
path: ci-data
|
||||||
|
|
||||||
- name: Generate Custom Job Report
|
- name: Generate Custom Job Report
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
run: |
|
run: |
|
||||||
@@ -47,6 +94,7 @@ jobs:
|
|||||||
--job "${{ inputs.job_filter }}" \
|
--job "${{ inputs.job_filter }}" \
|
||||||
--workflow "pr-test-amd.yml" \
|
--workflow "pr-test-amd.yml" \
|
||||||
--hours ${{ inputs.hours || '24' }} \
|
--hours ${{ inputs.hours || '24' }} \
|
||||||
|
--input-data-file ci-data/actions-job-snapshot.json \
|
||||||
--summary
|
--summary
|
||||||
|
|
||||||
# Parse workflow files to get job names dynamically
|
# Parse workflow files to get job names dynamically
|
||||||
@@ -57,6 +105,8 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
pr_jobs: ${{ steps.parse.outputs.pr_jobs }}
|
pr_jobs: ${{ steps.parse.outputs.pr_jobs }}
|
||||||
nightly_jobs: ${{ steps.parse.outputs.nightly_jobs }}
|
nightly_jobs: ${{ steps.parse.outputs.nightly_jobs }}
|
||||||
|
pr_rocm720_jobs: ${{ steps.parse.outputs.pr_rocm720_jobs }}
|
||||||
|
nightly_rocm720_jobs: ${{ steps.parse.outputs.nightly_rocm720_jobs }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -80,18 +130,32 @@ jobs:
|
|||||||
echo "nightly_jobs=$nightly_jobs" >> $GITHUB_OUTPUT
|
echo "nightly_jobs=$nightly_jobs" >> $GITHUB_OUTPUT
|
||||||
echo "Nightly jobs: $nightly_jobs"
|
echo "Nightly jobs: $nightly_jobs"
|
||||||
|
|
||||||
|
# Parse pr-test-amd-rocm720.yml (exclude utility jobs)
|
||||||
|
# Excluded: call-gate, check-changes, pr-test-amd-finish, cancel, check-all-jobs
|
||||||
|
pr_rocm720_jobs=$(yq -r '.jobs | keys | .[]' .github/workflows/pr-test-amd-rocm720.yml | \
|
||||||
|
grep -v -E '^(call-gate|check-changes|pr-test-amd-finish|cancel|check-all-jobs)$' | \
|
||||||
|
jq -R -s -c 'split("\n") | map(select(length > 0))')
|
||||||
|
echo "pr_rocm720_jobs=$pr_rocm720_jobs" >> $GITHUB_OUTPUT
|
||||||
|
echo "PR ROCm 7.2 jobs: $pr_rocm720_jobs"
|
||||||
|
|
||||||
|
# Parse nightly-test-amd-rocm720.yml (exclude utility jobs)
|
||||||
|
# Excluded: check-all-jobs
|
||||||
|
nightly_rocm720_jobs=$(yq -r '.jobs | keys | .[]' .github/workflows/nightly-test-amd-rocm720.yml | \
|
||||||
|
grep -v -E '^(check-all-jobs)$' | \
|
||||||
|
jq -R -s -c 'split("\n") | map(select(length > 0))')
|
||||||
|
echo "nightly_rocm720_jobs=$nightly_rocm720_jobs" >> $GITHUB_OUTPUT
|
||||||
|
echo "Nightly ROCm 7.2 jobs: $nightly_rocm720_jobs"
|
||||||
|
|
||||||
# PR CI reports using dynamic matrix
|
# PR CI reports using dynamic matrix
|
||||||
pr-ci-reports:
|
pr-ci-reports:
|
||||||
name: PR - ${{ matrix.job_name }}
|
name: PR - ${{ matrix.job_name }}
|
||||||
needs: parse-workflows
|
needs: [parse-workflows, fetch-actions-data]
|
||||||
if: ${{ !inputs.job_filter }}
|
if: ${{ !inputs.job_filter }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
job_name: ${{ fromJson(needs.parse-workflows.outputs.pr_jobs) }}
|
job_name: ${{ fromJson(needs.parse-workflows.outputs.pr_jobs) }}
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -104,6 +168,12 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip install tabulate
|
run: pip install tabulate
|
||||||
|
|
||||||
|
- name: Download Actions data snapshot
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: actions-job-snapshot
|
||||||
|
path: ci-data
|
||||||
|
|
||||||
- name: Generate Report
|
- name: Generate Report
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
run: |
|
run: |
|
||||||
@@ -112,20 +182,19 @@ jobs:
|
|||||||
--job "${{ matrix.job_name }}" \
|
--job "${{ matrix.job_name }}" \
|
||||||
--workflow "pr-test-amd.yml" \
|
--workflow "pr-test-amd.yml" \
|
||||||
--hours ${{ inputs.hours || '24' }} \
|
--hours ${{ inputs.hours || '24' }} \
|
||||||
|
--input-data-file ci-data/actions-job-snapshot.json \
|
||||||
--summary
|
--summary
|
||||||
|
|
||||||
# Nightly AMD test reports using dynamic matrix
|
# Nightly AMD test reports using dynamic matrix
|
||||||
nightly-reports:
|
nightly-reports:
|
||||||
name: Nightly - ${{ matrix.job_name }}
|
name: Nightly - ${{ matrix.job_name }}
|
||||||
needs: parse-workflows
|
needs: [parse-workflows, fetch-actions-data]
|
||||||
if: ${{ !inputs.job_filter }}
|
if: ${{ !inputs.job_filter }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
job_name: ${{ fromJson(needs.parse-workflows.outputs.nightly_jobs) }}
|
job_name: ${{ fromJson(needs.parse-workflows.outputs.nightly_jobs) }}
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -138,6 +207,12 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip install tabulate
|
run: pip install tabulate
|
||||||
|
|
||||||
|
- name: Download Actions data snapshot
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: actions-job-snapshot
|
||||||
|
path: ci-data
|
||||||
|
|
||||||
- name: Generate Nightly Report
|
- name: Generate Nightly Report
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
run: |
|
run: |
|
||||||
@@ -146,4 +221,118 @@ jobs:
|
|||||||
--job "${{ matrix.job_name }}" \
|
--job "${{ matrix.job_name }}" \
|
||||||
--workflow "nightly-test-amd.yml" \
|
--workflow "nightly-test-amd.yml" \
|
||||||
--hours ${{ inputs.hours || '24' }} \
|
--hours ${{ inputs.hours || '24' }} \
|
||||||
|
--input-data-file ci-data/actions-job-snapshot.json \
|
||||||
|
--summary
|
||||||
|
|
||||||
|
# PR ROCm 7.2 CI reports using dynamic matrix
|
||||||
|
pr-rocm720-ci-reports:
|
||||||
|
name: PR ROCm720 - ${{ matrix.job_name }}
|
||||||
|
needs: [parse-workflows, fetch-actions-data]
|
||||||
|
if: ${{ !inputs.job_filter }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
job_name: ${{ fromJson(needs.parse-workflows.outputs.pr_rocm720_jobs) }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pip install tabulate
|
||||||
|
|
||||||
|
- name: Download Actions data snapshot
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: actions-job-snapshot
|
||||||
|
path: ci-data
|
||||||
|
|
||||||
|
- name: Generate PR ROCm 7.2 Report
|
||||||
|
timeout-minutes: 15
|
||||||
|
run: |
|
||||||
|
python scripts/ci/utils/query_job_status.py \
|
||||||
|
--repo ${{ github.repository }} \
|
||||||
|
--job "${{ matrix.job_name }}" \
|
||||||
|
--workflow "pr-test-amd-rocm720.yml" \
|
||||||
|
--hours ${{ inputs.hours || '24' }} \
|
||||||
|
--input-data-file ci-data/actions-job-snapshot.json \
|
||||||
|
--summary
|
||||||
|
|
||||||
|
# Nightly ROCm 7.2 reports using dynamic matrix
|
||||||
|
nightly-rocm720-reports:
|
||||||
|
name: Nightly ROCm720 - ${{ matrix.job_name }}
|
||||||
|
needs: [parse-workflows, fetch-actions-data]
|
||||||
|
if: ${{ !inputs.job_filter }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
job_name: ${{ fromJson(needs.parse-workflows.outputs.nightly_rocm720_jobs) }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pip install tabulate
|
||||||
|
|
||||||
|
- name: Download Actions data snapshot
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: actions-job-snapshot
|
||||||
|
path: ci-data
|
||||||
|
|
||||||
|
- name: Generate Nightly ROCm 7.2 Report
|
||||||
|
timeout-minutes: 15
|
||||||
|
run: |
|
||||||
|
python scripts/ci/utils/query_job_status.py \
|
||||||
|
--repo ${{ github.repository }} \
|
||||||
|
--job "${{ matrix.job_name }}" \
|
||||||
|
--workflow "nightly-test-amd-rocm720.yml" \
|
||||||
|
--hours ${{ inputs.hours || '24' }} \
|
||||||
|
--input-data-file ci-data/actions-job-snapshot.json \
|
||||||
|
--summary
|
||||||
|
|
||||||
|
# Runner fleet report - cross-workflow runner analytics in a single pass
|
||||||
|
runner-fleet-report:
|
||||||
|
name: Runner Fleet Report
|
||||||
|
if: ${{ !inputs.job_filter }}
|
||||||
|
needs: fetch-actions-data
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pip install tabulate
|
||||||
|
|
||||||
|
- name: Download Actions data snapshot
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: actions-job-snapshot
|
||||||
|
path: ci-data
|
||||||
|
|
||||||
|
- name: Generate Runner Fleet Report
|
||||||
|
timeout-minutes: 30
|
||||||
|
run: |
|
||||||
|
python scripts/ci/utils/query_job_status.py \
|
||||||
|
--repo ${{ github.repository }} \
|
||||||
|
--runner-report \
|
||||||
|
--workflow "pr-test-amd.yml,nightly-test-amd.yml,pr-test-amd-rocm720.yml,nightly-test-amd-rocm720.yml" \
|
||||||
|
--hours ${{ inputs.hours || '24' }} \
|
||||||
|
--input-data-file ci-data/actions-job-snapshot.json \
|
||||||
--summary
|
--summary
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user