ci: add amd-ci-job-monitor for runner fleet reporting#4897
Open
amdfaa wants to merge 1 commit into
Open
Conversation
Port monitor workflow and scripts from ROCm/aiter with MIGraphX-specific exclude_jobs and runner-config for ROCM-Ubuntu. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an automated GitHub Actions “job monitor” workflow and supporting Python scripts to query recent Actions job history and publish a runner-fleet-report artifact (plus an intermediate snapshot) for downstream dashboard ingestion.
Changes:
- Introduces
.github/workflows/amd-ci-job-monitor.ymlto (a) discover workflow jobs, (b) fetch a repo-wide Actions snapshot, and (c) generate per-job summaries and a consolidated runner fleet report artifact. - Adds
.github/scripts/list_jobs.py(workflow/job discovery) and.github/scripts/query_job_status.py(GitHub API querying + report formatting). - Adds
.github/runner-config.ymlto map runner labels to hardware metadata for the runner fleet report.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| .github/workflows/amd-ci-job-monitor.yml | New scheduled/dispatchable workflow to generate Actions snapshot + runner fleet report artifacts. |
| .github/scripts/query_job_status.py | New report generator querying the Actions API (or a snapshot) and emitting markdown summaries. |
| .github/scripts/list_jobs.py | New workflow parser producing a workflow/job matrix and workflow→job map used by the workflow. |
| .github/runner-config.yml | New runner label→GPU metadata mapping consumed by runner report generation. |
Comment on lines
+48
to
+53
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: |
Comment on lines
+29
to
+34
| description: "Comma-separated job names to exclude" | ||
| required: false | ||
| default: "cancel,check_image,build_image,build_SLES_image" | ||
| type: string | ||
| job_filter: | ||
| description: "Single job name filter (optional)" |
Comment on lines
+27
to
+32
| ) | ||
| parser.add_argument( | ||
| "--exclude-jobs", | ||
| default="", | ||
| help="Comma-separated job names to skip.", | ||
| ) |
| rate_limit_reset_epoch = exc.reset_epoch | ||
| print("[warn] GitHub API rate limit exceeded during report generation.") | ||
| except requests.HTTPError as exc: | ||
| print(f"[warn] Failed to query workflow runs: {exc}") |
Comment on lines
+523
to
+545
| def build_queue_distribution(queue_times: list[float]): | ||
| if not queue_times: | ||
| return [] | ||
| ranges = [ | ||
| ("< 1 min", 0, 60), | ||
| ("1-5 min", 60, 300), | ||
| ("5-15 min", 300, 900), | ||
| ("15-30 min", 900, 1800), | ||
| ("30-60 min", 1800, 3600), | ||
| ("> 60 min", 3600, float("inf")), | ||
| ] | ||
| total = len(queue_times) | ||
| buckets = [] | ||
| for label, lower, upper in ranges: | ||
| count = sum(1 for value in queue_times if lower <= value < upper) | ||
| percentage = round(count / total * 100, 1) if total else 0.0 | ||
| buckets.append([label, count, f"{percentage}%"]) | ||
| return buckets | ||
|
|
||
|
|
||
| def build_runner_report_rows(job_rows: list[dict[str, Any]], report_time: datetime): | ||
| stats = defaultdict( | ||
| lambda: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
amd-ci-job-monitor.ymland supporting scripts (ported from ROCm/aiter) to publishrunner-fleet-reportartifacts for the AI Frameworks Dashboard import pipeline.MIGraphX-specific:
exclude_jobsfor image prep jobs;runner-config.ymlmapsROCM-Ubuntu.Made with Cursor