-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: add a new test env (rocky linux) in github ci. (#2806) #2823
feat: add a new test env (rocky linux) in github ci. (#2806) #2823
Conversation
WalkthroughThe recent updates enhance the CI/CD workflows by integrating support for Rocky Linux, replacing CentOS. This transition is facilitated through the addition of new jobs in GitHub Actions, updated dependency management, and modifications in scripts and configuration files to ensure compatibility with the Rocky environment. These changes improve the reliability and performance of builds and tests on the Rocky Linux platform. Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant Build Environment
participant CMake
participant Tests
GitHub Actions->>Build Environment: Start Rocky Linux job
Build Environment->>CMake: Configure build with dependencies
CMake->>Build Environment: Build project
Build Environment->>Tests: Run unit and integration tests
Tests-->>Build Environment: Return test results
Build Environment-->>GitHub Actions: Complete job
Assessment against linked issues
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this 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
Outside diff range, codebase verification and nitpick comments (4)
CMakeLists.txt (4)
321-324
: The specified Snappy library paths do not exist.The paths "/path/to/install/lib64/libsnappy.a" and "/path/to/install/lib/libsnappy.a" are placeholders. Please verify and update the correct paths for the Snappy library in the project.
Analysis chain
Verify the Snappy library paths.
Ensure that the specified paths for Snappy libraries are correct and necessary for the project.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the Snappy library paths are correct and exist. # Test: Check if the libraries exist. Expect: Libraries exist. if [ -f "/path/to/install/lib64/libsnappy.a" ] || [ -f "/path/to/install/lib/libsnappy.a" ]; then echo "libsnappy.a exists." else echo "libsnappy.a does not exist." fiLength of output: 158
25-25
: The specified link directory path does not exist.The directory
/opt/rh/gcc-toolset-13/root/lib/gcc/x86_64-redhat-linux/13
specified in thelink_directories
directive does not exist. Please verify the path or ensure that the necessary toolset is installed.
- Line 25 in
CMakeLists.txt
:link_directories("/opt/rh/gcc-toolset-13/root/lib/gcc/x86_64-redhat-linux/13")
Analysis chain
Verify the link directory path.
Ensure that the specified path
/opt/rh/gcc-toolset-13/root/lib/gcc/x86_64-redhat-linux/13
is correct and necessary for the project.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the link directory path is correct and exists. # Test: Check if the directory exists. Expect: Directory exists. if [ -d "/opt/rh/gcc-toolset-13/root/lib/gcc/x86_64-redhat-linux/13" ]; then echo "Directory exists." else echo "Directory does not exist." fiLength of output: 132
723-726
: Verify the RocksDB library paths.The specified paths for the RocksDB library,
${INSTALL_LIBDIR_64}/librocksdb.a
and${INSTALL_LIBDIR}/librocksdb.a
, do not exist. Please verify and correct the paths to ensure the libraries are correctly referenced.
- Paths checked:
/home/jailuser/git/deps/lib/librocksdb.a
and/home/jailuser/git/deps/lib64/librocksdb.a
Analysis chain
Verify the RocksDB library paths.
Ensure that the specified paths for RocksDB libraries are correct and necessary for the project.
To verify the correct paths for the RocksDB library, we need to search the codebase for the actual installation paths used. Let's look for occurrences of
librocksdb.a
within the CMakeLists.txt and other relevant files to identify the correct paths.
To determine the actual values of the placeholders
${INSTALL_LIBDIR_64}
and${INSTALL_LIBDIR}
, we need to search for their definitions or assignments in the codebase.
To verify the actual paths for the RocksDB library, we need to determine the value of
STAGED_INSTALL_PREFIX
. Let's search for the definition or assignment ofSTAGED_INSTALL_PREFIX
in the codebase.
To verify the existence of the actual paths for the RocksDB library, we need to check if
${CMAKE_CURRENT_SOURCE_DIR}/deps/lib/librocksdb.a
and${CMAKE_CURRENT_SOURCE_DIR}/deps/lib64/librocksdb.a
exist in the repository.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the RocksDB library paths are correct and exist. # Test: Check if the libraries exist. Expect: Libraries exist. if [ -f "/path/to/install/lib64/librocksdb.a" ] || [ -f "/path/to/install/lib/librocksdb.a" ]; then echo "librocksdb.a exists." else echo "librocksdb.a does not exist." fiLength of output: 162
Script:
#!/bin/bash # Search for occurrences of 'librocksdb.a' in the codebase to find the actual installation paths. rg 'librocksdb.a' -A 3Length of output: 411
Script:
#!/bin/bash # Search for definitions or assignments of INSTALL_LIBDIR_64 and INSTALL_LIBDIR in the codebase. rg 'INSTALL_LIBDIR_64|INSTALL_LIBDIR' -A 3Length of output: 4426
Script:
#!/bin/bash # Search for definitions or assignments of STAGED_INSTALL_PREFIX in the codebase. rg 'STAGED_INSTALL_PREFIX' -A 3Length of output: 4487
Script:
#!/bin/bash # Verify the existence of the actual paths for the RocksDB library. if [ -f "$(pwd)/deps/lib/librocksdb.a" ] || [ -f "$(pwd)/deps/lib64/librocksdb.a" ]; then echo "librocksdb.a exists." else echo "librocksdb.a does not exist." fiLength of output: 190
286-289
: Issues found with GLog library paths.The specified paths for
libglog.a
do not exist in the expected directories. Please verify the correct paths for the GLog libraries and update theCMakeLists.txt
file accordingly.
CMakeLists.txt
: Lines 286-289Analysis chain
Verify the GLog library paths.
Ensure that the specified paths for GLog libraries are correct and necessary for the project.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the GLog library paths are correct and exist. # Test: Check if the libraries exist. Expect: Libraries exist. if [ -f "/path/to/install/lib64/libglog.a" ] || [ -f "/path/to/install/lib/libglog.a" ]; then echo "libglog.a exists." else echo "libglog.a does not exist." fiLength of output: 150
Script:
#!/bin/bash # Description: Search for the libglog.a file in the project directory to identify the correct paths. # Find all instances of libglog.a in the project directory fd -H -I -t f -i 'libglog.a'Length of output: 28
Script:
#!/bin/bash # Description: Search for all library paths set in the CMakeLists.txt to identify any potential issues. # Find all lines setting library paths in the CMakeLists.txt rg 'set\(.*_LIBRARY' -A 2Length of output: 3089
Script:
#!/bin/bash # Description: Search for the definitions of INSTALL_LIBDIR and INSTALL_LIBDIR_64 in the CMakeLists.txt file. # Find all lines defining INSTALL_LIBDIR and INSTALL_LIBDIR_64 in the CMakeLists.txt rg 'set\(INSTALL_LIBDIR' -A 2 rg 'set\(INSTALL_LIBDIR_64' -A 2Length of output: 468
Script:
#!/bin/bash # Description: Search for the definition of STAGED_INSTALL_PREFIX in the CMakeLists.txt file. # Find all lines defining STAGED_INSTALL_PREFIX in the CMakeLists.txt rg 'set\(STAGED_INSTALL_PREFIX' -A 2Length of output: 255
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (6)
- .github/workflows/pika.yml (1 hunks)
- .github/workflows/release.yml (1 hunks)
- CMakeLists.txt (8 hunks)
- ci/release-build.sh (2 hunks)
- codis/Makefile (1 hunks)
- utils/Get_OS_Version.sh (1 hunks)
Files skipped from review due to trivial changes (1)
- codis/Makefile
Additional comments not posted (21)
utils/Get_OS_Version.sh (1)
11-13
: Verify the package manager setting for Rocky Linux.The package manager (
PM
) is set to 'nfs', which seems unusual. It might be a typo and should likely be 'dnf'.- PM='nfs' + PM='dnf'ci/release-build.sh (2)
12-17
: LGTM!The added support for Rocky Linux in the
install_deps
function looks good. The necessary dependencies are appropriately installed usingdnf
.
31-33
: LGTM!The added support for Rocky Linux in the
configure_cmake
function looks good. The GCC toolset environment is appropriately sourced, and CMake is configured with address sanitization for debugging..github/workflows/release.yml (4)
50-90
: LGTM!The addition of the
rocky
job in the GitHub Actions workflow looks good. The job is well-configured to run onubuntu-latest
within a Rocky Linux 9 container and performs all necessary steps for the build and release process.
59-63
: LGTM!The installation of dependencies in the
rocky
job looks good. The necessary packages are appropriately installed usingdnf
.
65-69
: LGTM!The checkout of source code in the
rocky
job looks good. Theactions/checkout@v3
action is used with a fetch depth of 0, which is appropriate for the build process.
70-89
: LGTM!The build and checksum steps in the
rocky
job look good. Theci/release-build.sh
script is appropriately used to perform the installation, build, and checksum calculation..github/workflows/pika.yml (11)
124-128
: Set up Go environment.The Go environment setup looks good. Ensure that the specified Go version is compatible with the project requirements.
129-133
: Checkout repository.The repository checkout step looks good. Ensure that the
fetch-depth: 0
is necessary for the project's requirements.
134-138
: Ensure CMake configuration compatibility.The CMake configuration step looks good. Ensure that the specified options and flags are compatible with the Rocky Linux environment.
139-148
: Utilize caching effectively.The caching steps look good. Ensure that the cache keys are unique and effective in reducing build times.
149-153
: Build project.The build step looks good. Ensure that the
source /opt/rh/gcc-toolset-13/enable
command is necessary and correctly enables the required toolset.
154-157
: Run tests.The test step looks good. Ensure that the tests are comprehensive and cover all critical functionality.
158-160
: Run unit tests.The unit test step looks good. Ensure that the
./pikatests.sh all
script is correctly configured and covers all unit tests.
162-168
: Start services for integration tests.The step to start services for integration tests looks good. Ensure that the scripts
start_master_and_slave.sh
andstart_codis.sh
are correctly configured and start the necessary services.
170-177
: Run Go E2E tests.The Go E2E test step looks good. Ensure that the tests are comprehensive and cover all critical functionality.
111-114
: Verify the GPG key URL.Ensure that the GPG key URL is correct and accessible. Consider using a more reliable source if necessary.
Verification successful
The GPG key URL is correct and accessible.
The URL
https://mirrors.jlu.edu.cn/rocky/RPM-GPG-KEY-Rocky-9
returned an HTTP/2 200 status, confirming its validity.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the GPG key URL is correct and accessible. # Test: Fetch the GPG key. Expect: Successful fetch. curl -I https://mirrors.jlu.edu.cn/rocky/RPM-GPG-KEY-Rocky-9Length of output: 683
81-85
: Ensure the container image is up-to-date.The job is configured to use the
rockylinux:9
container image. Ensure that this image is up-to-date and includes the latest security patches.CMakeLists.txt (3)
359-362
: Verify the Zstd library paths.Ensure that the specified paths for Zstd libraries are correct and necessary for the project.
398-401
: Verify the Fmt library paths.Ensure that the specified paths for Fmt libraries are correct and necessary for the project.
Verification successful
Verify the Fmt library paths.
The paths for the Fmt libraries are correctly set based on the OS version and build type in the CMakeLists.txt file. Ensure that the actual files exist in the specified paths in the correct environment.
- Definitions:
INSTALL_LIBDIR_64
is set to${STAGED_INSTALL_PREFIX}/lib64
INSTALL_LIBDIR
is set to${STAGED_INSTALL_PREFIX}/lib
LIB_FMT
is conditionally set to eitherlibfmtd.a
orlibfmt.a
based on theLIB_BUILD_TYPE
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the Fmt library paths are correct and exist. # Test: Check if the libraries exist. Expect: Libraries exist. if [ -f "/path/to/install/lib64/libfmt.a" ] || [ -f "/path/to/install/lib/libfmt.a" ]; then echo "libfmt.a exists." else echo "libfmt.a does not exist." fiLength of output: 146
Script:
#!/bin/bash # Description: Search for the definitions of INSTALL_LIBDIR_64, INSTALL_LIBDIR, and LIB_FMT in the CMakeLists.txt and related files. # Find the definition of INSTALL_LIBDIR_64 echo "Searching for INSTALL_LIBDIR_64 definition:" rg --context 5 'INSTALL_LIBDIR_64' CMakeLists.txt # Find the definition of INSTALL_LIBDIR echo "Searching for INSTALL_LIBDIR definition:" rg --context 5 'INSTALL_LIBDIR' CMakeLists.txt # Find the definition of LIB_FMT echo "Searching for LIB_FMT definition:" rg --context 5 'LIB_FMT' CMakeLists.txtLength of output: 9145
Line range hint
163-168
:
Verify the GTest library paths.Ensure that the specified paths for GTest libraries are correct and necessary for the project.
please handle the rabbit AI review comment. |
There was a problem hiding this 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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- .github/workflows/pika.yml (1 hunks)
- .github/workflows/release.yml (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- .github/workflows/pika.yml
- .github/workflows/release.yml
…ion#2806) (OpenAtomFoundation#2823) * add a new test env (rocky linux) in github ci.
…ion#2806) (OpenAtomFoundation#2823) * add a new test env (rocky linux) in github ci.
fix: #2806
Summary by CodeRabbit
New Features
Bug Fixes
Chores