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:CI #2931

Open
wants to merge 2 commits into
base: unstable
Choose a base branch
from
Open

fix:CI #2931

wants to merge 2 commits into from

Conversation

chejinge
Copy link
Collaborator

@chejinge chejinge commented Oct 25, 2024

Summary by CodeRabbit

  • New Features
    • Introduced a new job to build a Docker image, enhancing deployment capabilities.
  • Improvements
    • Streamlined the macOS build process by simplifying dependency installations.
    • Updated compiler configuration for improved compatibility with the latest tools.

Copy link

coderabbitai bot commented Oct 25, 2024

Walkthrough

The changes in this pull request focus on updating the .github/workflows/pika.yml file, particularly enhancing the macOS build job and introducing a new Docker image build job. The macOS build job has been simplified by removing specific dependency installations and adjusting the CMake configuration to utilize clang compilers. A new job, build_pika_image, has been added to facilitate the building of a Docker image, incorporating various setup steps while maintaining the overall workflow structure.

Changes

File Change Summary
.github/workflows/pika.yml - Modified build_on_macos job to remove [email protected] and gcc@10 installations.
- Updated CMake configuration to use clang and clang++.
- Changed CMAKE_CXX_FLAGS_DEBUG to use double quotes around -fsanitize=address.
- Added build_pika_image job for Docker image creation, including setup and build steps.

Possibly related PRs

  • fix:fix CI #2924: The changes in this PR also involve modifications to the .github/workflows/pika.yml file, specifically updating the build_on_macos job and adding the build_pika_image job, which aligns closely with the changes made in the main PR.

Suggested labels

☢️ Bug

Suggested reviewers

  • Mixficsol

Poem

🐇 In the meadow where code does play,
The rabbit hops, brightening the day.
With clang and Docker, we build with cheer,
Simplifying tasks, our path is clear.
So let’s celebrate, with a joyful bounce,
For every change, let the code renounce! 🌼


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 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.

@github-actions github-actions bot added 🧹 Updates This will not be worked on Invalid PR Title labels Oct 25, 2024
@chejinge chejinge changed the title Update pika.yml fix:CI Oct 25, 2024
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

📥 Commits

Files that changed from the base of the PR and between 218b68b and c84d07f.

📒 Files selected for processing (1)
  • .github/workflows/pika.yml (1 hunks)
🔇 Additional comments (2)
.github/workflows/pika.yml (2)

177-178: LGTM: Simplified MacOS dependencies

The dependency list has been streamlined to use the system clang compiler instead of gcc, with necessary additions like llvm for additional tooling.


Line range hint 224-267: LGTM: Well-structured Docker image build job

The Docker image build job is well configured with:

  • Proper dependency on ubuntu build
  • Latest Docker GitHub Actions
  • Secure configuration (no push on PR)
  • Correct artifact handling

@github-actions github-actions bot added the ☢️ Bug Something isn't working label Oct 25, 2024
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: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between c84d07f and 48b0605.

📒 Files selected for processing (1)
  • .github/workflows/pika.yml (1 hunks)
🧰 Additional context used
🪛 yamllint
.github/workflows/pika.yml

[error] 179-179: trailing spaces

(trailing-spaces)

🔇 Additional comments (1)
.github/workflows/pika.yml (1)

Line range hint 229-269: LGTM: Docker image build job implementation.

The new Docker image build job is well-structured and follows best practices:

  • Proper dependency management
  • Secure artifact handling
  • Uses official Docker actions
  • Security-conscious (no push on PR builds)
🧰 Tools
🪛 yamllint

[error] 179-179: trailing spaces

(trailing-spaces)

Comment on lines +184 to +187
cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-DUSE_PIKA_TOOLS=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DCMAKE_CXX_FLAGS_DEBUG="-fsanitize=address" \
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Improve CMake configuration formatting and flags.

The CMake configuration can be improved by:

  1. Removing spaces after -D flags
  2. Moving sanitizer flags to CMAKE_CXX_FLAGS as the build type is RelWithDebInfo
-          cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-                -DUSE_PIKA_TOOLS=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-                -DCMAKE_CXX_FLAGS_DEBUG="-fsanitize=address" \
-                -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
+          cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
+                -DUSE_PIKA_TOOLS=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
+                -DCMAKE_CXX_FLAGS="-fsanitize=address" \
+                -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-DUSE_PIKA_TOOLS=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DCMAKE_CXX_FLAGS_DEBUG="-fsanitize=address" \
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-DUSE_PIKA_TOOLS=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DCMAKE_CXX_FLAGS="-fsanitize=address" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache

Comment on lines +177 to +180
brew install autoconf protobuf llvm wget git [email protected]
brew install automake cmake make binutils

brew link --overwrite [email protected]
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

⚠️ Potential issue

Python 3.13 is not required, recommend using Python 3.12

The codebase shows no explicit requirements for Python 3.13:

  • Python scripts use generic python3 shebang
  • requirements.txt only lists package versions without Python version constraints
  • No Python version-specific features are used in the scripts

Recommend using Python 3.12 which is the latest stable release:

-          brew install autoconf protobuf llvm wget git [email protected]
+          brew install autoconf protobuf llvm wget git [email protected]
-          brew link --overwrite [email protected]
+          brew link --overwrite [email protected]
🔗 Analysis chain

Consider using a stable Python version instead of 3.13.

Python 3.13 is currently in development/alpha stage and might introduce instability. Consider using Python 3.12 which is the latest stable version.

-          brew install autoconf protobuf llvm wget git [email protected]
-          brew install automake cmake make binutils
-          
-          brew link --overwrite [email protected]
+          brew install autoconf protobuf llvm wget git [email protected]
+          brew install automake cmake make binutils
+          brew link --overwrite [email protected]

Let's verify Python version requirements in the codebase:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for Python version requirements
rg -l "python3|python\s+3" "*.txt" "*.md" "*.sh"

Length of output: 186


Script:

#!/bin/bash
# Check for Python version requirements in all files
rg -l "python3|python\s+3"

# Check for Python dependencies or version specifications
fd -e txt -e md -e sh -e cmake -e py . -x cat {} \; | rg "python.*3\.[0-9]+"

# Look for setup.py, requirements.txt, or similar Python config files
fd "setup.py|requirements.*\.txt|pyproject.toml"

# Check CMakeLists.txt for Python requirements
fd "CMakeLists.txt" -x cat {} \; | rg -i "python"

Length of output: 766


Script:

#!/bin/bash
# Check content of Python files for version requirements
cat tools/pika_benchmark/gen_chart.py
cat run_clang_tidy.py

# Check content of requirements.txt
cat tools/codis2pika/test/requirements.txt

# Check if there are any other Python version specifications in the workflow file
cat .github/workflows/pika.yml | rg -i "python"

Length of output: 20804

🧰 Tools
🪛 yamllint

[error] 179-179: trailing spaces

(trailing-spaces)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☢️ Bug Something isn't working 🧹 Updates This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant