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: change sloglog to INFO #2926

Closed
wants to merge 23 commits into from
Closed

Conversation

Mixficsol
Copy link
Collaborator

@Mixficsol Mixficsol commented Oct 18, 2024

将慢日志的日志级别从 ERROR 日志调整为 INFO 日志

Summary by CodeRabbit

  • Chores
    • Updated the macOS build environment to use macOS 13 for improved compatibility.
    • Modified dependency installation commands to ensure the correct compiler configuration, replacing [email protected] with [email protected].

@github-actions github-actions bot added the ☢️ Bug Something isn't working label Oct 18, 2024
@Mixficsol Mixficsol marked this pull request as ready for review October 18, 2024 02:30
Copy link

coderabbitai bot commented Oct 18, 2024

Walkthrough

The changes in the .github/workflows/pika.yml file focus on the build_on_macos job, updating the runs-on attribute from macos-12 to macos-13. The Install Deps step has been modified to replace [email protected] with [email protected], while other dependencies like protobuf and llvm remain unchanged. The overall structure of the workflow remains intact, with no additions or deletions of jobs or steps.

Changes

File Change Summary
.github/workflows/pika.yml - Updated runs-on to macos-13 in build_on_macos job.
- Modified Install Deps to replace [email protected] with [email protected].
- Retained other dependencies like protobuf and llvm.
- No changes to other jobs or steps.

Possibly related PRs

  • fix:fix CI #2924: The changes in the build_on_macos job in both PRs involve updates to the installation commands and step names, indicating a direct relationship in modifying the macOS build process.

🐰 In the meadow, a change took flight,
Dependencies lightened, oh what a sight!
With python updated, we hop with glee,
For smoother builds, as bright as can be!
With each little tweak, our workflow will shine,
In the world of code, everything aligns! 🌼


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between ca9c71b and ef9aed8.

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

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.

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

🧹 Outside diff range and nitpick comments (1)
.github/workflows/pika.yml (1)

Line range hint 1-284: Consider harmonizing build environments across jobs

While the changes to the macOS build job are generally good, they introduce some inconsistencies with the other build jobs (Ubuntu and Rocky Linux). To ensure consistent behavior across all environments, consider the following:

  1. Align Python versions: The macOS job now uses Python 3.13 (which we've suggested changing to 3.12), while other jobs might be using different versions. Consider specifying the same Python version across all jobs.

  2. Compiler versions: The macOS job explicitly uses gcc-10, while other jobs might be using different compiler versions. If possible, try to use consistent compiler versions across all environments.

  3. Build flags and options: Ensure that build flags and options (like -DUSE_PIKA_TOOLS=ON and -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address) are consistent across all jobs where applicable.

To improve maintainability and consistency, consider creating a shared configuration file or using GitHub Actions' composite actions to define common setup steps and configurations that can be reused across different jobs.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between e26f45c and b230175.

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

Line range hint 182-184: Explicit C compiler setting looks good

The explicit setting of the C compiler to gcc-10 is a good practice for ensuring build consistency. This change aligns well with the installation of gcc@10 in the previous step.

For improved clarity and consistency, consider moving the CC environment variable setting to the same line as the cmake command:

-          export CC=/usr/local/opt/gcc@10/bin/gcc-10 
-          cmake -B build -DCMAKE_C_COMPILER=/usr/local/opt/gcc@10/bin/gcc-10 -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=/usr/local/opt/gcc@10/bin/gcc-10 -DCMAKE_CXX_COMPILER=/usr/local/opt/gcc@10/bin/g++-10 -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

This change removes the redundant export and ensures that both C and C++ compilers are explicitly set.


177-177: ⚠️ Potential issue

Caution: Python 3.13 is not yet released and --overwrite flag usage

The update to Python 3.13 is premature as this version is not yet released (as of October 2024). This could lead to compatibility issues or failed builds. Consider reverting to a stable version like 3.11 or 3.12.

Additionally, the --overwrite flag has been added to the brew install command. While this can resolve conflicts, it may potentially overwrite important files. Use this flag with caution and ensure it's necessary for your build process.

Consider applying this change:

-          brew install --overwrite [email protected] autoconf protobuf llvm wget git
+          brew install [email protected] autoconf protobuf llvm wget git

To check the latest stable Python version available in Homebrew, you can run:

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 67dc8d3 and f9183f0.

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

159-159: label "macos-11" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-14.0", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-13.0", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "macos-12.0", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

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

Line range hint 180-183: LGTM: Explicit compiler configuration

Good improvement on explicitly setting the C compiler path. This makes the build more deterministic and helps prevent compiler mismatches.


Line range hint 1-1: PR objective and changes mismatch

The PR description mentions changing slow log levels from ERROR to INFO, but the actual changes are modifying the macOS CI configuration. This suggests either:

  1. The PR description is incorrect
  2. The log level changes are missing
  3. Wrong files were committed

Please clarify the intended changes and ensure the PR description matches the actual modifications.

🧰 Tools
🪛 actionlint

159-159: label "macos-11" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-14.0", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-13.0", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "macos-12.0", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)


177-178: Verify Python dependency requirements

The removal of [email protected] from the brew install command might impact build requirements. Please verify that Python is not needed for:

  1. Build scripts
  2. Test execution
  3. Development tools

@@ -169,12 +169,12 @@ jobs:
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: macos-12
key: macos-11
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Update cache key to match supported runner version

The cache key should be updated to match the runner version for consistency.

-          key: macos-11
+          key: macos-12
📝 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
key: macos-11
key: macos-12

@@ -156,7 +156,7 @@
sh integrate_test.sh
build_on_macos:
runs-on: macos-12
runs-on: macos-11
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Warning: Unsupported macOS runner version

The macos-11 runner label is not in the list of supported GitHub-hosted runners. Consider using one of the following supported versions:

  • macos-latest
  • macos-13
  • macos-12
-    runs-on: macos-11
+    runs-on: macos-12
📝 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
runs-on: macos-11
runs-on: macos-12
🧰 Tools
🪛 actionlint

159-159: label "macos-11" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-14.0", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-13.0", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "macos-12.0", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

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 cc05d0c and e96a63b.

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

181-181: shellcheck reported issue in this script: SC2046:warning:2:88: Quote this to prevent word splitting

(shellcheck)

🪛 yamllint
.github/workflows/pika.yml

[error] 182-182: trailing spaces

(trailing-spaces)

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

159-159: LGTM: Runner version and cache key are consistent.

The update to macos-13 and corresponding cache key update are appropriate and maintain consistency.

Also applies to: 172-172


Line range hint 159-183: Changes seem unrelated to PR objective.

The PR's objective is to change slog log level from ERROR to INFO, but the changes in this file are focused on updating the macOS build environment. Please clarify if these changes are necessary for the log level modification or if they should be in a separate PR.

#!/bin/bash
# Search for files containing log level configurations
rg -l "ERROR.*log|INFO.*log|log.*level" --type cpp --type hpp --type c --type h
🧰 Tools
🪛 actionlint

181-181: shellcheck reported issue in this script: SC2046:warning:2:88: Quote this to prevent word splitting

(shellcheck)

🪛 yamllint

[error] 182-182: trailing spaces

(trailing-spaces)

Comment on lines 182 to 183
export CC=/usr/local/opt/gcc@10/bin/gcc-10
cmake -B build -DCMAKE_C_COMPILER=/usr/local/opt/gcc@10/bin/gcc-10 -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=/usr/local/opt/gcc@10/bin/gcc-10 -DCMAKE_PREFIX_PATH=$(brew --prefix zlib) -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

Fix potential word splitting in CMake configuration.

The command substitution should be quoted to prevent word splitting issues.

Apply this fix:

-          cmake -B build -DCMAKE_C_COMPILER=/usr/local/opt/gcc@10/bin/gcc-10 -DCMAKE_PREFIX_PATH=$(brew --prefix zlib) -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=/usr/local/opt/gcc@10/bin/gcc-10 -DCMAKE_PREFIX_PATH="$(brew --prefix zlib)" -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
📝 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
export CC=/usr/local/opt/gcc@10/bin/gcc-10
cmake -B build -DCMAKE_C_COMPILER=/usr/local/opt/gcc@10/bin/gcc-10 -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=/usr/local/opt/gcc@10/bin/gcc-10 -DCMAKE_PREFIX_PATH=$(brew --prefix zlib) -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
export CC=/usr/local/opt/gcc@10/bin/gcc-10
cmake -B build -DCMAKE_C_COMPILER=/usr/local/opt/gcc@10/bin/gcc-10 -DCMAKE_PREFIX_PATH="$(brew --prefix zlib)" -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
🧰 Tools
🪛 yamllint

[error] 182-182: trailing spaces

(trailing-spaces)

Comment on lines 177 to 178
brew install --overwrite python@3.13 protobuf llvm zlib
brew install gcc@10 automake cmake make binutils
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Based on the analysis of the codebase and requirements files, I can now provide a definitive response about the Python version change:

Revert Python version to 3.12 and remove unnecessary zlib dependency.

The Python version update to 3.13 is not justified as:

  1. No Python dependencies in the project require Python 3.13
  2. Python 3.13 is currently in alpha stage and could introduce instability
  3. The change is unrelated to the PR's objective of modifying slog log level
🔗 Analysis chain

Verify the Python version update.

The change to [email protected] might introduce instability as it's currently in alpha/development stage. Consider keeping [email protected] which is the current stable version.

Additionally, this change seems unrelated to the PR's objective of changing slog log level from ERROR to INFO.


Let me search for any Python-related files and workflow configurations to better understand the Python version requirements and usage in the project.


Let me check the requirements files to see if there are any Python version dependencies.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if Python 3.13 is required by any dependencies
rg -l "python.*3\.13|python.*>=.*3\.13" --type yaml --type cmake

Length of output: 109


Script:

#!/bin/bash
# Check for Python version requirements in requirements files and setup files
fd -e txt -e in requirements
fd setup.py
fd pyproject.toml

# Check for Python-related configurations in workflow files
fd -e yml -e yaml . .github/workflows/ --exec cat {} \; 

Length of output: 25739


Script:

#!/bin/bash
# Check Python version requirements in the requirements file
cat tools/codis2pika/test/requirements.txt

# Check if there are any Python files that might indicate version requirements
fd -e py . --exec cat {} \;

Length of output: 105317

@Mixficsol Mixficsol closed this by deleting the head repository Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☢️ Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant