Skip to content
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

Fix CIBW_SKIP for musllinux in the release workflow #1032

Merged
merged 1 commit into from
Jan 17, 2025
Merged

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Jan 17, 2025

The check should have been for musllinux instead of musl

The check should have been for musllinux instead of musl
Copy link

codspeed-hq bot commented Jan 17, 2025

CodSpeed Performance Report

Merging #1032 will not alter performance

Comparing fix_cibw_skip (5ea4eaf) with main (6bf3bf6)

Summary

✅ 2 untouched benchmarks

Copy link
Contributor

coderabbitai bot commented Jan 17, 2025

Walkthrough

The pull request modifies the GitHub Actions release workflow configuration, specifically adjusting the CIBW_SKIP environment variable in the build_wheels job. The change involves updating the condition for the musl matrix variable from checking for musl to checking for musllinux. This modification impacts the wheel-building process by altering the logic for skipping specific wheel configurations during the release workflow.

Changes

File Change Summary
.github/workflows/release.yml Updated CIBW_SKIP environment variable condition from matrix.musl == 'musl' to matrix.musl == 'musllinux'

Sequence Diagram

sequenceDiagram
    participant Workflow as GitHub Actions Workflow
    participant Builder as Wheel Builder
    
    Workflow->>Builder: Trigger wheel build
    Builder->>Builder: Evaluate CIBW_SKIP conditions
    alt Skip based on musllinux
        Builder->>Workflow: Skip specific wheel configurations
    else Build wheels
        Builder->>Workflow: Generate wheels
    end
Loading

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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. (Beta)
  • @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
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: 0

🧹 Nitpick comments (1)
.github/workflows/release.yml (1)

Line range hint 15-22: Consider renaming the matrix variable for clarity.

The matrix variable musl could be renamed to linux_variant or platform_variant since it specifically distinguishes between standard Linux (empty string) and musllinux builds. This would make the configuration more self-documenting.

 strategy:
   matrix:
     os: [ubuntu-24.04-arm, ubuntu-latest, macos-13, macos-latest]
-    musl: ["", "musllinux"]
+    linux_variant: ["", "musllinux"]
     exclude:
       - os: macos-13
-        musl: "musllinux"
+        linux_variant: "musllinux"
       - os: macos-latest
-        musl: "musllinux"
+        linux_variant: "musllinux"
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6bf3bf6 and 5ea4eaf.

📒 Files selected for processing (1)
  • .github/workflows/release.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: py 3.13 on ubuntu-latest (use_cython)
  • GitHub Check: py 3.9 on ubuntu-latest (use_cython)
  • GitHub Check: Run benchmarks
🔇 Additional comments (2)
.github/workflows/release.yml (2)

Line range hint 1-83: The workflow configuration follows security best practices.

Notable security and best practices implementations:

  • Minimal permissions using contents: read
  • Trusted actions with pinned versions
  • Proper environment isolation for PyPI publishing
  • Secure PyPI publishing using OIDC token (id-token: write)

36-36: LGTM! Verify the wheel build outputs.

The condition update from musl to musllinux correctly aligns with the matrix configuration. This should properly control the wheel building process by skipping manylinux wheels for musllinux builds and vice versa.

Let's verify the impact on wheel building by checking recent workflow runs:

✅ Verification successful

Verified: CIBW_SKIP configuration is correct and properly configured

The wheel building setup is properly configured:

  • Matrix values correctly define musl="" for manylinux and musl="musllinux" for musl builds
  • CIBW_SKIP condition matches these matrix values exactly
  • Proper exclusions prevent musllinux builds on macOS
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check recent workflow runs to verify wheel building behavior
# Expected: Should see different wheel types being built/skipped based on the linux_variant

gh run list --workflow=release.yml --limit 2 --json conclusion,databaseId | \
  jq -r '.[].databaseId' | \
  while read -r run_id; do
    echo "Checking run $run_id"
    gh run view "$run_id" --log | grep -A 5 "cibuildwheel: Building wheels for"
  done

Length of output: 429


Script:

#!/bin/bash
# Check workflow configuration and cibuildwheel setup
echo "=== Workflow Configuration ==="
cat .github/workflows/release.yml

echo -e "\n=== Searching for cibuildwheel config ==="
fd -e toml -e ini -e cfg -e conf . | xargs grep -l -i "cibuildwheel\|CIBW" || true

echo -e "\n=== Searching for CIBW environment variables ==="
rg "CIBW_" -A 2 -B 2

Length of output: 2343

@bdraco bdraco merged commit 25c5feb into main Jan 17, 2025
16 checks passed
@bdraco bdraco deleted the fix_cibw_skip branch January 17, 2025 19:13
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (6bf3bf6) to head (5ea4eaf).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1032   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           17        17           
  Lines         2681      2681           
=========================================
  Hits          2681      2681           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant