-
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 rocky linux env in ci test (#2806) #2817
Conversation
WalkthroughThe recent changes enhance the CI/CD workflows by introducing support for Rocky Linux, replacing CentOS in GitHub Actions configurations. New jobs for building and releasing software specifically for Rocky Linux have been added, along with adjustments in related scripts and configuration files. This transition improves compatibility and stability within the build environment, ensuring that the software can be effectively tested and deployed on Rocky Linux systems. Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant Build Job
participant Release Job
participant Rocky Linux
GitHub Actions->>Build Job: Trigger build_on_rocky
Build Job->>Rocky Linux: Setup environment
Build Job->>Rocky Linux: Install dependencies
Build Job->>Rocky Linux: Run tests
Rocky Linux-->>Build Job: Return test results
GitHub Actions->>Release Job: Trigger rocky
Release Job->>Rocky Linux: Prepare release artifacts
Release Job->>Rocky Linux: Upload artifacts
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: 0
Outside diff range, codebase verification and nitpick comments (3)
.github/workflows/pika.yml (1)
160-166
: Ensure successful execution of integration tests.The integration tests fail due to the missing
pika
binary. Ensure that thepika
binary is built and available in the expected location before running the integration tests. Verify the setup steps to include building or installingpika
.
- Missing
pika
binary required for integration tests.- Ensure the
pika
binary is built and available in the expected location.Analysis chain
Ensure successful execution of integration tests.
The integration tests include starting codis, pika master, and pika slave. Ensure that all integration tests execute successfully on Rocky Linux.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the execution of integration tests on Rocky Linux. # Test: Check if integration tests execute successfully. Expect: No errors. cd build && chmod +x ../tests/integration/start_master_and_slave.sh && ../tests/integration/start_master_and_slave.sh chmod +x ../tests/integration/start_codis.sh && ../tests/integration/start_codis.shLength of output: 228
Script:
#!/bin/bash # Description: Verify the existence of the build directory and the integration test scripts. # Search for the build directory fd build --type d # Search for the start_master_and_slave.sh script fd start_master_and_slave.sh # Search for the start_codis.sh script fd start_codis.shLength of output: 147
Script:
#!/bin/bash # Description: Verify the execution of integration test scripts from their current location. # Make the scripts executable and run them chmod +x tests/integration/start_master_and_slave.sh && tests/integration/start_master_and_slave.sh chmod +x tests/integration/start_codis.sh && tests/integration/start_codis.shLength of output: 3492
Script:
#!/bin/bash # Description: Verify the existence of required configuration files and binaries for integration tests. # Search for the pika.conf file fd pika.conf # Search for the pika binary fd pika --type f # Search for the codis directory fd codis --type dLength of output: 4830
CMakeLists.txt (2)
321-324
: Issues found with Snappy library paths for Rocky Linux.The
libsnappy.a
file does not exist at the expected path${CMAKE_CURRENT_SOURCE_DIR}/deps/lib64/libsnappy.a
. Please verify the library setup and ensure that the file is correctly placed.
CMakeLists.txt
line 321-324Analysis chain
Verify the library paths for Snappy on Rocky Linux.
The library paths for Snappy are conditionally set for Rocky Linux. Ensure that these paths are correct and the libraries are available at the specified locations.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the library paths for Snappy on Rocky Linux. # Test: Check if the Snappy libraries exist at the specified paths. Expect: Files exist. [ -f "${INSTALL_LIBDIR_64}/libsnappy.a" ]Length of output: 25
Script:
#!/bin/bash # Search for the definition of INSTALL_LIBDIR_64 in the codebase rg 'INSTALL_LIBDIR_64'Length of output: 756
Script:
#!/bin/bash # Search for the definition of STAGED_INSTALL_PREFIX in the codebase rg 'STAGED_INSTALL_PREFIX'Length of output: 1873
Script:
#!/bin/bash # Verify the existence of the libsnappy.a file at the constructed path if [ -f "$(pwd)/deps/lib64/libsnappy.a" ]; then echo "libsnappy.a exists" else echo "libsnappy.a does not exist" fiLength of output: 124
398-401
: Fmt libraries not found at the specified paths.The fmt libraries were not found at the expected paths (
${STAGED_INSTALL_PREFIX}/lib64/libfmtd.a
or${STAGED_INSTALL_PREFIX}/lib64/libfmt.a
). Please verify the library paths for Rocky Linux.
- Ensure that the paths are correct and the libraries are available at the specified locations.
Analysis chain
Verify the library paths for fmt on Rocky Linux.
The library paths for fmt are conditionally set for Rocky Linux. Ensure that these paths are correct and the libraries are available at the specified locations.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the library paths for fmt on Rocky Linux. # Test: Check if the fmt libraries exist at the specified paths. Expect: Files exist. [ -f "${INSTALL_LIBDIR_64}/${LIB_FMT}" ]Length of output: 14
Script:
#!/bin/bash # Description: Find the definitions of INSTALL_LIBDIR_64 and LIB_FMT in the codebase. # Search for the definition of INSTALL_LIBDIR_64 rg "set\(INSTALL_LIBDIR_64" -A 2 # Search for the definition of LIB_FMT rg "set\(LIB_FMT" -A 2Length of output: 368
Script:
#!/bin/bash # Description: Verify the existence of fmt libraries at the specified paths on Rocky Linux. # Search for the definition of STAGED_INSTALL_PREFIX rg "set\(STAGED_INSTALL_PREFIX" -A 2 # Check if the fmt libraries exist at the specified paths if [ -n "${STAGED_INSTALL_PREFIX}" ]; then [ -f "${STAGED_INSTALL_PREFIX}/lib64/libfmtd.a" ] || [ -f "${STAGED_INSTALL_PREFIX}/lib64/libfmt.a" ] else echo "STAGED_INSTALL_PREFIX is not defined." fiLength of output: 356
Script:
#!/bin/bash # Description: Verify the existence of fmt libraries at the specified paths on Rocky Linux. # Manually set STAGED_INSTALL_PREFIX based on the definition in CMakeLists.txt STAGED_INSTALL_PREFIX=$(pwd)/deps # Check if the fmt libraries exist at the specified paths if [ -n "${STAGED_INSTALL_PREFIX}" ]; then if [ -f "${STAGED_INSTALL_PREFIX}/lib64/libfmtd.a" ] || [ -f "${STAGED_INSTALL_PREFIX}/lib64/libfmt.a" ]; then echo "Fmt libraries found." else echo "Fmt libraries not found." fi else echo "STAGED_INSTALL_PREFIX is not defined." fiLength of output: 255
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (5)
- .github/workflows/pika.yml (1 hunks)
- .github/workflows/release.yml (1 hunks)
- CMakeLists.txt (8 hunks)
- ci/release-build.sh (1 hunks)
- utils/Get_OS_Version.sh (1 hunks)
Additional comments not posted (16)
utils/Get_OS_Version.sh (1)
11-13
: Add Rocky Linux detection.The new conditional check for Rocky Linux is correctly added and follows the existing pattern for other distributions.
ci/release-build.sh (1)
25-27
: Add Rocky Linux configuration in CMake.The new conditional branch for Rocky Linux correctly enables the GCC toolset version 13 and configures CMake with AddressSanitizer for debugging.
.github/workflows/release.yml (2)
50-90
: Add Rocky Linux job in GitHub Actions workflow.The new job for Rocky Linux is correctly added with steps for installing dependencies, checking out the source code, executing the release build script, calculating checksums, and uploading artifacts.
93-93
: Updaterelease
job dependencies.The
release
job dependencies are correctly updated to include the newrocky
job..github/workflows/pika.yml (7)
116-122
: Check the installation of dependencies.The dependencies are installed using DNF. Ensure that all required packages are available in the Rocky Linux repositories and the installation commands execute successfully.
134-137
: Ensure correct CMake configuration.The CMake configuration step sets various build options. Ensure that the configuration is correct and compatible with Rocky Linux.
Verification successful
CMake configuration appears correct and compatible with Rocky Linux.
The CMake configuration options in the
CMakeLists.txt
file align with the settings specified in the script. TheCMAKE_BUILD_TYPE
,USE_PIKA_TOOLS
, andCMAKE_CXX_FLAGS_DEBUG
options are correctly set or available for configuration.
CMAKE_BUILD_TYPE
is set toRELEASE
by default.USE_PIKA_TOOLS
is an available option.CMAKE_CXX_FLAGS_DEBUG
includes the-fsanitize=address
flag but is commented out.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the CMake configuration for Rocky Linux. # Test: Check if CMake configuration executes successfully. Expect: No errors. cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_PIKA_TOOLS=ON -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address .Length of output: 188
Script:
#!/bin/bash # Searching for CMake configuration options in the codebase rg -A 5 'set\(CMAKE_BUILD_TYPE' . rg -A 5 'option\(USE_PIKA_TOOLS' . rg -A 5 'set\(CMAKE_CXX_FLAGS_DEBUG' .Length of output: 2250
87-109
: Verify the mirror setup for Rocky Linux.The mirror setup for Rocky Linux is configured to use Aliyun mirrors. Ensure that these mirrors are reliable and accessible from the CI environment.
152-158
: Ensure successful execution of tests.The test steps include running CTest and unit tests. Ensure that all tests execute successfully on Rocky Linux.
168-175
: Ensure successful execution of Go E2E tests.The Go E2E tests include running tests for pika keys analysis and integration tests. Ensure that all Go E2E tests execute successfully on Rocky Linux.
111-114
: Ensure the GPG key import and DNF cache setup.The GPG key is imported and the DNF cache is cleaned and rebuilt. Ensure that the key import URL is correct and the DNF commands execute successfully.
148-150
: Ensure successful build execution.The build step uses CMake to build the project. Ensure that the build executes successfully on Rocky Linux.
CMakeLists.txt (5)
25-25
: Verify the link directory for GCC toolset.The link directory for the GCC toolset is added. Ensure that this directory is correct and necessary for the build process.
359-362
: Verify the library paths for Zstandard on Rocky Linux.The library paths for Zstandard are conditionally set for Rocky Linux. Ensure that these paths are correct and the libraries are available at the specified locations.
723-726
: Verify the library paths for RocksDB on Rocky Linux.The library paths for RocksDB are conditionally set for Rocky Linux. Ensure that these paths are correct and the libraries are available at the specified locations.
286-289
: Verify the library paths for Glog on Rocky Linux.The library paths for Glog are conditionally set for Rocky Linux. Ensure that these paths are correct and the libraries are available at the specified locations.
Line range hint
163-169
: Verify the library paths for Google Test on Rocky Linux.The library paths for Google Test are conditionally set for Rocky Linux. Ensure that these paths are correct and the libraries are available at the specified locations.
there are some error |
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.
elif grep -Eqii "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then | ||
DISTRO='Rocky' | ||
PM='nfs' |
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.
Correctly identify Rocky Linux but verify the package manager.
The logic correctly identifies "Rocky" Linux. However, the package manager is set to 'nfs', which seems incorrect. The appropriate package manager for Rocky Linux should be 'yum' or 'dnf'.
- PM='nfs'
+ PM='yum'
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.
elif grep -Eqii "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then | |
DISTRO='Rocky' | |
PM='nfs' | |
elif grep -Eqii "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then | |
DISTRO='Rocky' | |
PM='yum' |
fix: #2806
Summary by CodeRabbit
New Features
Bug Fixes
Documentation