Skip to content

fix: use docker image instead#1932

Merged
HerringtonDarkholme merged 1 commit intomainfrom
bump-ver
Apr 14, 2025
Merged

fix: use docker image instead#1932
HerringtonDarkholme merged 1 commit intomainfrom
bump-ver

Conversation

@HerringtonDarkholme
Copy link
Copy Markdown
Member

@HerringtonDarkholme HerringtonDarkholme commented Apr 14, 2025

fix #1930

Summary by CodeRabbit

  • Chores
    • Streamlined the automated build process for the NAPI project, enhancing efficiency and reliability.
    • Updated Docker image for the aarch64-unknown-linux-gnu target and removed unnecessary installation commands.
    • Adjusted build commands to focus on essential steps, including environment sourcing for the build process.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 14, 2025

Walkthrough

The pull request updates the GitHub Actions workflow for building the NAPI project on the aarch64-unknown-linux-gnu target. It replaces the previous Docker image with a new pre-configured image and removes the manual installation of Node.js and Rust. With these modifications, the build process now directly leverages the Docker image’s environment, executing the yarn build command followed by stripping the generated .node files.

Changes

File(s) Change Summary
.github/workflows/napi.yml Updated Docker image for the aarch64 target; removed explicit Node.js and Rust installation commands; streamlined build commands and file stripping.

Sequence Diagram(s)

sequenceDiagram
    participant Actions as "GitHub Actions"
    participant Docker as "Docker Image (napi-aarch64-linux-gnu)"
    Actions->>Docker: Pull Docker Image
    Docker-->>Actions: Provide dependencies
    Actions->>Actions: Run yarn build in crates/napi
    Actions->>Actions: Strip .node files
Loading

Assessment against linked issues

Objective Addressed Explanation
[#1930] Move aarch64 action to docker

Poem

I'm a rabbit with a heart so light,
Hopping through code day and night.
Docker now leads the cheerful spree,
Leaving old installs where they should be.
A streamlined build, swift as can be! 🐰✨


📜 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 fc65c1b and 1cca627.

📒 Files selected for processing (1)
  • .github/workflows/napi.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/napi.yml

🪧 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.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.13%. Comparing base (67f80ea) to head (1cca627).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1932   +/-   ##
=======================================
  Coverage   87.13%   87.13%           
=======================================
  Files          99       99           
  Lines       15877    15877           
=======================================
  Hits        13835    13835           
  Misses       2042     2042           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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: 0

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

70-70: Docker Image Update for aarch64-unknown-linux-gnu Target

The Docker image on line 70 now uses ghcr.io/ast-grep/ast-grep/napi-aarch64-linux-gnu:latest. This change simplifies the build process by relying on a pre-configured image that should include all necessary dependencies (e.g., Node.js and Rust), thereby removing the need for manual installation commands. Please verify that:

  • The new image indeed provides all required toolchain components (including the aarch64-unknown-linux-gnu-strip utility used in line 75).
  • Using the latest tag meets your reproducibility requirements; consider pinning to a specific version if build consistency is critical.
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 67f80ea and b5cfa79.

📒 Files selected for processing (1)
  • .github/workflows/napi.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: stable - i686-pc-windows-msvc - node@18
  • GitHub Check: stable - aarch64-pc-windows-msvc - node@18
  • GitHub Check: stable - x86_64-pc-windows-msvc - node@18

@HerringtonDarkholme HerringtonDarkholme force-pushed the bump-ver branch 5 times, most recently from 940afb7 to fc65c1b Compare April 14, 2025 03:19
@HerringtonDarkholme HerringtonDarkholme added this pull request to the merge queue Apr 14, 2025
@HerringtonDarkholme HerringtonDarkholme removed this pull request from the merge queue due to a manual request Apr 14, 2025
@HerringtonDarkholme
Copy link
Copy Markdown
Member Author

it compiles

image

@HerringtonDarkholme HerringtonDarkholme added this pull request to the merge queue Apr 14, 2025
Merged via the queue into main with commit 5b0c98c Apr 14, 2025
6 checks passed
@HerringtonDarkholme HerringtonDarkholme deleted the bump-ver branch April 14, 2025 03:26
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

.github/workflows/napi.yml:70

  • Verify that the new Docker image includes all the necessary dependencies (e.g., Node.js and the Rust toolchain) since the installation steps have been removed.
docker: ghcr.io/ast-grep/ast-grep/napi-aarch64-linux-gnu:latest

.github/workflows/napi.yml:75

  • Confirm that sourcing the Cargo environment here is still required with the updated Docker image, ensuring that the Rust toolchain is properly configured.
. "$HOME/.cargo/env"

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.

[infra] move aarch64 action to docker

2 participants