Skip to content

run codecov action at end of CI; only_pulls: true #2664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

djsaunde
Copy link
Member

@djsaunde djsaunde commented May 12, 2025

Description

Motivation and Context

How has this been tested?

Screenshots (if appropriate)

Types of changes

Social Handles (Optional)

Summary by CodeRabbit

  • Chores
    • Updated CI workflow to aggregate and upload test coverage data in a single step after all tests complete, improving reliability of coverage reporting.
    • Modified scripts to retrieve and save coverage reports from test runs, ensuring coverage data is consistently collected.
    • Removed direct coverage uploads from individual test jobs to streamline the process.

@djsaunde djsaunde self-assigned this May 13, 2025
@djsaunde djsaunde force-pushed the codecov-pulls-only branch from 9e98a81 to fb4ce2a Compare May 13, 2025 14:35
Copy link

codecov bot commented May 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@djsaunde djsaunde requested a review from winglian May 13, 2025 18:29
Copy link

coderabbitai bot commented May 14, 2025

Walkthrough

The continuous integration workflow was restructured to aggregate and upload test coverage data in a dedicated post-processing job, rather than uploading from individual test jobs. Supporting scripts were updated to extract, return, and persist coverage reports, while direct coverage uploads from within scripts were removed.

Changes

Files/Paths Change Summary
.github/workflows/tests.yml Refactored workflow: test jobs now upload coverage as artifacts; added upload-coverage job to aggregate and upload to Codecov.
cicd/cicd.sh Removed direct Codecov upload command; script now only generates coverage reports.
cicd/e2e_tests.py, cicd/multigpu.py Added logic to read, return, and locally save coverage XML data after tests.

Poem

In the warren where tests all run,
Coverage now gathers, one by one.
No more uploads from every nest—
A single hop now does the rest!
Artifacts collected, reports combined,
Codecov gets the data—perfectly timed.
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 639ddef and f3c8a25.

📒 Files selected for processing (3)
  • .github/workflows/tests.yml (4 hunks)
  • cicd/e2e_tests.py (2 hunks)
  • cicd/multigpu.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • cicd/multigpu.py
  • cicd/e2e_tests.py
  • .github/workflows/tests.yml
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: PyTest from Source Dist (3.11, 2.7.1)
  • GitHub Check: PyTest from Source Dist (3.11, 2.6.0)
  • GitHub Check: PyTest from Source Dist (3.11, 2.5.1)
  • GitHub Check: PyTest (3.11, 2.5.1)
  • GitHub Check: PyTest (3.11, 2.7.1)
  • GitHub Check: PyTest (3.11, 2.6.0)
  • GitHub Check: pre-commit
  • GitHub Check: pre-commit
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@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: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 7fa1089 and 2b12260.

📒 Files selected for processing (2)
  • .github/workflows/tests.yml (4 hunks)
  • cicd/cicd.sh (0 hunks)
💤 Files with no reviewable changes (1)
  • cicd/cicd.sh
🔇 Additional comments (3)
.github/workflows/tests.yml (3)

210-215: Artifact upload for PyTest job is correctly configured
The new actions/upload-artifact step will reliably capture coverage.xml per pytorch_version and github.run_id, ensuring unique artifact names. Retention of 1 day is sufficient for downstream aggregation.


338-345: Artifact upload for first Docker E2E tests is correctly configured
The Upload coverage artifacts step with if: always() guarantees coverage files from the initial E2E run (e2e-coverage.xml) are always preserved, even on failures.


400-407: Artifact upload for Docker E2E tests is correctly configured
Similarly, this upload step captures e2e-coverage.xml for the main E2E matrix. The naming convention includes CUDA and PyTorch versions, ensuring uniqueness.

@djsaunde djsaunde force-pushed the codecov-pulls-only branch from 2b12260 to 639ddef Compare June 17, 2025 17:33
Copy link
Contributor

@github-actions github-actions bot temporarily deployed to preview June 17, 2025 17:35 Inactive
Copy link

@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: 3

♻️ Duplicate comments (1)
.github/workflows/tests.yml (1)

355-361: Condition still runs on pushes to main – contradicts PR goal
Same issue flagged earlier: the job should execute only for PRs per the PR title/description.

-    if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
+    if: github.event_name == 'pull_request'
🧹 Nitpick comments (2)
cicd/multigpu.py (1)

80-85: Path hard-coding is acceptable but consider centralising the constant

The logic correctly returns coverage data when present.
If more GPU test scripts adopt the same pattern, factor the coverage path (/workspace/axolotl/multigpu-coverage.xml) into a shared constant or helper to avoid divergence in the future.

docs/config-reference.qmd (1)

6-25: Move type hints out of value position to keep the snippet valid YAML

Placing str | None, bool | None = False, or (required) after the colon makes the file invalid for anyone who tries to load it with a YAML parser.
Recommend:

  1. Keep just the default value (or null) after the colon.
  2. Convert the type information into preceding # comments or a rendered table.
  3. Add a short, visible note at the top that this block is illustrative and not meant to be parsed verbatim.

Example pattern:

# strict : bool | None   # default: false
strict: false

This preserves readability while staying machine-parsable.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2b12260 and 639ddef.

📒 Files selected for processing (5)
  • .github/workflows/tests.yml (4 hunks)
  • cicd/cicd.sh (0 hunks)
  • cicd/e2e_tests.py (2 hunks)
  • cicd/multigpu.py (1 hunks)
  • docs/config-reference.qmd (1 hunks)
💤 Files with no reviewable changes (1)
  • cicd/cicd.sh
🧰 Additional context used
🧬 Code Graph Analysis (2)
cicd/multigpu.py (1)
cicd/e2e_tests.py (2)
  • main (28-34)
  • cicd_pytest (16-24)
cicd/e2e_tests.py (1)
cicd/single_gpu.py (1)
  • run_cmd (63-68)
🪛 actionlint (1.7.7)
.github/workflows/tests.yml

374-374: input "carryforward" is not defined in action "codecov/codecov-action@v5". available inputs are "binary", "codecov_yml_path", "commit_parent", "directory", "disable_file_fixes", "disable_safe_directory", "disable_search", "dry_run", "env_vars", "exclude", "fail_ci_if_error", "files", "flags", "gcov_args", "gcov_executable", "gcov_ignore", "gcov_include", "git_service", "handle_no_reports_found", "job_code", "name", "network_filter", "network_prefix", "os", "override_branch", "override_build", "override_build_url", "override_commit", "override_pr", "plugins", "report_code", "report_type", "root_dir", "skip_validation", "slug", "swift_project", "token", "url", "use_legacy_upload_endpoint", "use_oidc", "verbose", "version", "working-directory"

(action)

⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: PyTest from Source Dist (3.11, 2.7.1)
  • GitHub Check: PyTest from Source Dist (3.11, 2.6.0)
  • GitHub Check: PyTest from Source Dist (3.11, 2.5.1)
  • GitHub Check: PyTest (3.11, 2.6.0)
  • GitHub Check: PyTest (3.11, 2.7.1)
  • GitHub Check: PyTest (3.11, 2.5.1)
  • GitHub Check: pre-commit
  • GitHub Check: pre-commit
  • GitHub Check: preview
🔇 Additional comments (6)
cicd/multigpu.py (1)

89-94: Remote result handling looks good

coverage = cicd_pytest.remote() is consistent with other Modal invocations and the file-write block safely guards against missing coverage. No issues spotted.

cicd/e2e_tests.py (2)

20-25: Mirrors multigpu pattern – OK

Coverage extraction logic is identical to cicd/multigpu.py, keeping behaviour consistent across test suites. Looks good.


29-34: LGTM – file write guard is sufficient

Local persistence of the XML is gated behind the truthiness check, preventing empty files. No further action required.

.github/workflows/tests.yml (3)

109-115: Artifact upload step works but relies on a single coverage.xml

Running three pytest invocations in the same job produces a single merged coverage.xml, so the path is fine. Just ensure future splits (e.g., sharded tests) keep writing to the same file or adjust the artifact list accordingly.


236-243: Good use of if: always()

This ensures coverage is still collected for failing E2E runs – nice touch.


307-314: Consistent artefact naming

Including run_id avoids collisions between concurrent CI runs. Looks solid.

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.

3 participants