Skip to content

cicd: add a github workflow for xfails report script#2273

Merged
yzh119 merged 2 commits intoflashinfer-ai:mainfrom
kahyunnam:knam/xfails_report_github_task
Jan 3, 2026
Merged

cicd: add a github workflow for xfails report script#2273
yzh119 merged 2 commits intoflashinfer-ai:mainfrom
kahyunnam:knam/xfails_report_github_task

Conversation

@kahyunnam
Copy link
Copy Markdown
Collaborator

@kahyunnam kahyunnam commented Dec 30, 2025

📌 Description

Adds workflow that runs weekly on Mondays (and can be triggered manually) to execute scripts/xfails_tracker.py, which scans the test suite for xfail markers and outputs a comprehensive report to reports/xfails_report.txt. If the report has changed, it automatically creates a pull request to commit the updated report to the repository.

🔍 Related Issues

cont. testing item from november roadmap

🚀 Pull Request Checklist

Thank you for contributing to FlashInfer! Before we review your pull request, please make sure the following items are complete.

✅ Pre-commit Checks

  • I have installed pre-commit by running pip install pre-commit (or used your preferred method).
  • I have installed the hooks with pre-commit install.
  • I have run the hooks manually with pre-commit run --all-files and fixed any reported issues.

If you are unsure about how to set up pre-commit, see the pre-commit documentation.

🧪 Tests

  • Tests have been added or updated as needed.
  • All tests are passing (unittest, etc.).

Reviewer Notes

Summary by CodeRabbit

  • Chores
    • Added an automated weekly report generation that detects changes and opens pull requests to incorporate updates.
    • Updated automation to remove generated-attribution boilerplate from automated commit/PR messages.

✏️ Tip: You can customize this high-level summary in your review settings.

@kahyunnam kahyunnam self-assigned this Dec 30, 2025
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 30, 2025

📝 Walkthrough

Walkthrough

Adds a new scheduled GitHub Actions workflow to generate and auto-PR an xfails report, and removes attribution boilerplate from an existing update-codeowners workflow commit/PR templates.

Changes

Cohort / File(s) Summary
New xfails report workflow
.github/workflows/update-xfails-report.yml
New workflow running weekly (Mon 00:00 UTC) and on manual dispatch: checks out repo, sets up Python 3.11, runs scripts/xfails_tracker.py to produce reports/xfails_report.txt, detects changes, and opens an automated PR via peter-evans/create-pull-request when the report is new/modified (author/committer set to flashinfer-bot, PR labeled automated, maintenance, testing).
Updated workflow templates
.github/workflows/update-codeowners.yml
Removed attribution/boilerplate lines (e.g., “🤖 Generated with [Claude Code]” and “Co-Authored-By: Claude”) from the create-pull-request commit message and PR body templates; no other control-flow changes.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Scheduler as "GitHub Scheduler\n(Weekly / Manual)"
    participant Actions as "GitHub Actions Runner"
    participant Repo as "Repository Files"
    participant Script as "scripts/xfails_tracker.py"
    participant PR_Action as "peter-evans/create-pull-request"

    Scheduler->>Actions: trigger workflow
    Actions->>Repo: checkout (shallow)
    Actions->>Actions: setup Python 3.11
    Actions->>Script: run script -> generate reports/xfails_report.txt
    alt script fails
        Script-->>Actions: exit non-zero + logs
        Actions-->>Scheduler: workflow fails
    else script succeeds
        Script-->>Repo: write reports/xfails_report.txt
        Actions->>Repo: git status / detect changes
        alt changes detected (new/modified)
            Actions->>PR_Action: create PR (branch auto-update-xfails-report)\nset author/committer flashinfer-bot, add labels
            PR_Action-->>Repo: push branch + create PR
        else no changes
            Actions-->>Scheduler: complete (no PR)
        end
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

automated, maintenance

Suggested reviewers

  • jimmyzho

Poem

🐰 I hopped through YAML under moonlit beams,
Ran scripts, gathered test-time dreams,
If xfails bloom, I’ll open a PR so bright,
Branches sprout and CI sleeps tight.

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a GitHub Actions workflow for the xfails report script.
Description check ✅ Passed The PR description covers the key sections from the template: it provides a clear description of changes, references related issues, and completes the checklist with pre-commit and test confirmations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a577825 and 4cbbaa5.

📒 Files selected for processing (2)
  • .github/workflows/update-codeowners.yml
  • .github/workflows/update-xfails-report.yml
💤 Files with no reviewable changes (1)
  • .github/workflows/update-codeowners.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/update-xfails-report.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Deploy Docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kahyunnam
Copy link
Copy Markdown
Collaborator Author

I haven't tested this out yet (I think it needs to be merged first to run the workflow). But it shouldn't interfere with any pre existing code

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/update-xfails-report.yml (1)

32-38: Consider separating error output from the report.

Redirecting stderr to the report file (2>&1) means any error messages or warnings will be mixed with the actual report content. If the script fails partway through, the report file could contain partial output plus error messages.

🔎 Optional refactor for cleaner error handling
       - name: Run XFails tracker
         run: |
-          python scripts/xfails_tracker.py > reports/xfails_report.txt 2>&1 || {
+          python scripts/xfails_tracker.py > reports/xfails_report.txt || {
             echo "Error: XFails tracker script failed"
-            cat reports/xfails_report.txt
+            echo "Script output:"
+            cat reports/xfails_report.txt 2>/dev/null || echo "(no output file generated)"
             exit 1
           }

This keeps stderr visible in the workflow logs separately from the report file.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 835a015 and a577825.

📒 Files selected for processing (1)
  • .github/workflows/update-xfails-report.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Deploy Docs
🔇 Additional comments (5)
.github/workflows/update-xfails-report.yml (5)

1-7: LGTM: Clear workflow configuration.

The workflow name is descriptive, and the triggers are well-configured with both scheduled (weekly on Mondays) and manual execution options.


9-11: LGTM: Appropriate permissions.

The permissions are correctly scoped for creating branches and pull requests.


13-16: LGTM: Sensible job configuration.

The ubuntu-latest runner and 30-minute timeout are appropriate for this reporting task.


29-30: LGTM: Safe directory creation.

The -p flag correctly handles the case where the directory already exists.


40-57: LGTM: Robust change detection.

The logic correctly handles both new and modified files, and uses the modern $GITHUB_OUTPUT syntax.

Comment on lines +18 to +22
- name: Checkout repository
uses: actions/checkout@v4.2.2
with:
fetch-depth: 1 # Shallow clone is sufficient for scanning test files
token: ${{ secrets.GITHUB_TOKEN }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

latest version of actions/checkout GitHub Action 2025

💡 Result:

The latest major version is v6 — use actions/checkout@v6. [1][2]

Sources:
[1] actions/checkout GitHub repository README.
[2] Checkout page on the GitHub Marketplace.


Update actions/checkout to the latest version.

The version v4.2.2 is outdated. The latest stable version is v6. Update to actions/checkout@v6 to ensure security patches and bug fixes are included.

🤖 Prompt for AI Agents
.github/workflows/update-xfails-report.yml around lines 18 to 22: the workflow
pins actions/checkout to v4.2.2 which is outdated; update the action reference
to actions/checkout@v6 by replacing the version string so the workflow uses the
latest stable v6 release, keeping the existing with: block (fetch-depth and
token) intact.

Comment on lines +59 to +106
- name: Create Pull Request
if: steps.check_changes.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.FLASHINFER_BOT_TOKEN }}
committer: flashinfer-bot <flashinfer-bot@users.noreply.github.com>
author: flashinfer-bot <flashinfer-bot@users.noreply.github.com>
commit-message: |
chore: update xfails report

Auto-generated xfails report based on current test suite markers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
branch: auto-update-xfails-report
base: main
delete-branch: true
title: 'chore: Update XFails Report'
body: |
## Summary

This PR updates the xfails report based on the current test suite.

## Changes

- Updated `reports/xfails_report.txt` with current xfail markers from the test suite

## How to Review

1. Review the changes to `reports/xfails_report.txt`
2. Check if the number of xfails has increased or decreased
3. Review the reasons for any new xfails
4. Consider addressing xfails that may no longer be needed

## Notes

- This is an automated PR generated weekly
- The report shows all `pytest.mark.xfail` markers in the test suite
- Grouped by reason for easy analysis

---

🤖 This PR was automatically generated by the [update-xfails-report workflow](.github/workflows/update-xfails-report.yml)
labels: |
automated
maintenance
testing
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

peter-evans/create-pull-request latest version GitHub Action

💡 Result:

The latest major release is v8 — use peter-evans/create-pull-request@v8 (you can pin to a specific patch like @v8.x.x). [1][2]

Sources:
[1] GitHub repo README (peter-evans/create-pull-request).
[2] GitHub Marketplace entry for Create Pull Request.


Upgrade peter-evans/create-pull-request to v8.

Update the action version from @v7 to @v8, which is the latest major release. The rest of the PR creation step is well-structured with appropriate bot attribution, comprehensive PR body, and automatic branch cleanup.

🤖 Prompt for AI Agents
.github/workflows/update-xfails-report.yml around lines 59 to 106: the workflow
uses peter-evans/create-pull-request@v7 and needs to be upgraded to @v8; update
the uses line to reference peter-evans/create-pull-request@v8 and ensure any
breaking-change inputs required by v8 are handled (verify token, committer,
author, commit-message, branch, base, delete-branch, title, body, and labels
inputs remain valid in v8 and adjust names or formats if the action changed
them).

Comment on lines +71 to +73
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add these (we should also remove them from the other workflows).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in most recent commit 4cbbaa5 to remove these lines from update-xfails-report.yml + other workflows (update-codeowners.yml)

@yzh119 yzh119 merged commit b09fbcb into flashinfer-ai:main Jan 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants