-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix:Unstable ci #3201
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:Unstable ci #3201
Changes from all commits
0752ca1
2b1aae9
5ef35c2
3b43023
1cb1bfe
4de3e65
9d09def
ad1af35
7a44a34
2e68271
15e0bcf
573d530
46c2530
d9591c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -19,6 +19,14 @@ jobs: | |||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||
| - name: Free Disk Space | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| sudo rm -rf /usr/share/dotnet | ||||||||||||||||||||||||||||||||||||||
| sudo rm -rf /opt/ghc | ||||||||||||||||||||||||||||||||||||||
| sudo rm -rf /usr/local/share/boost | ||||||||||||||||||||||||||||||||||||||
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||||||||||||||||||||||||||||||||||||||
| df -h | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Set up Go | ||||||||||||||||||||||||||||||||||||||
|
|
@@ -45,9 +53,11 @@ jobs: | |||||||||||||||||||||||||||||||||||||
| # Build your program with the given configuration | ||||||||||||||||||||||||||||||||||||||
| run: cmake --build build --config ${{ env.BUILD_TYPE }} | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Cleanup | ||||||||||||||||||||||||||||||||||||||
| - name: Cleanup Build Trees | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| rm -rf ./buildtrees | ||||||||||||||||||||||||||||||||||||||
| rm -rf ./deps | ||||||||||||||||||||||||||||||||||||||
| df -h | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - uses: actions/upload-artifact@v4 | ||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||
|
|
@@ -64,6 +74,14 @@ jobs: | |||||||||||||||||||||||||||||||||||||
| working-directory: ${{ github.workspace }} | ||||||||||||||||||||||||||||||||||||||
| run: ./pikatests.sh all clean | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Cleanup Build Artifacts | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| find ./build -name "*.o" -type f -delete | ||||||||||||||||||||||||||||||||||||||
| find ./build -name "*.a" -type f -delete | ||||||||||||||||||||||||||||||||||||||
| rm -rf ./build/CMakeFiles | ||||||||||||||||||||||||||||||||||||||
| rm -rf ./build/_deps | ||||||||||||||||||||||||||||||||||||||
| df -h | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # master on port 9221, slave on port 9231, all with 2 db | ||||||||||||||||||||||||||||||||||||||
| - name: Start codis, pika master and pika slave | ||||||||||||||||||||||||||||||||||||||
| working-directory: ${{ github.workspace }}/build | ||||||||||||||||||||||||||||||||||||||
|
|
@@ -83,13 +101,35 @@ jobs: | |||||||||||||||||||||||||||||||||||||
| chmod +x integrate_test.sh | ||||||||||||||||||||||||||||||||||||||
| sh integrate_test.sh | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Cleanup Test Data | ||||||||||||||||||||||||||||||||||||||
| if: always() | ||||||||||||||||||||||||||||||||||||||
| working-directory: ${{ github.workspace }}/build | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| pkill -9 pika || true | ||||||||||||||||||||||||||||||||||||||
| pkill -9 codis || true | ||||||||||||||||||||||||||||||||||||||
| rm -rf master_data slave_data rename_data acl1_data acl2_data acl3_data | ||||||||||||||||||||||||||||||||||||||
| rm -rf codis_data_1 codis_data_2 | ||||||||||||||||||||||||||||||||||||||
| rm -rf *.conf *.conf.bak | ||||||||||||||||||||||||||||||||||||||
| df -h | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| build_on_centos: | ||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||
| container: | ||||||||||||||||||||||||||||||||||||||
| image: cheniujh/pika-centos7-ci:v5 | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||
| - name: Free Disk Space | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| rm -rf /usr/share/dotnet | ||||||||||||||||||||||||||||||||||||||
| rm -rf /opt/ghc | ||||||||||||||||||||||||||||||||||||||
| rm -rf /usr/local/share/boost | ||||||||||||||||||||||||||||||||||||||
| find / -type f -name "*.log" -delete 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||
| find / -type f -name "*.tmp" -delete 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||
| find / -name '*cache*' -type d -exec rm -rf {} + 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||
| find / -name '*.bak' -type f -delete 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||
| df -h | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Checkout | ||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v1 | ||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||
|
|
@@ -105,9 +145,14 @@ jobs: | |||||||||||||||||||||||||||||||||||||
| source /opt/rh/devtoolset-10/enable | ||||||||||||||||||||||||||||||||||||||
| cmake --build build --config ${{ env.BUILD_TYPE }} | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Cleanup | ||||||||||||||||||||||||||||||||||||||
| - name: Cleanup Build Trees | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| rm -rf ./buildtrees | ||||||||||||||||||||||||||||||||||||||
| rm -rf ./deps | ||||||||||||||||||||||||||||||||||||||
| # Clean build intermediate files but keep binaries | ||||||||||||||||||||||||||||||||||||||
| find ./build -name "*.o" -type f -delete || true | ||||||||||||||||||||||||||||||||||||||
| find ./build -name "*.a" -type f -delete || true | ||||||||||||||||||||||||||||||||||||||
| df -h | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Test | ||||||||||||||||||||||||||||||||||||||
| working-directory: ${{ github.workspace }}/build | ||||||||||||||||||||||||||||||||||||||
|
|
@@ -117,13 +162,48 @@ jobs: | |||||||||||||||||||||||||||||||||||||
| working-directory: ${{ github.workspace }} | ||||||||||||||||||||||||||||||||||||||
| run: ./pikatests.sh all clean | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Cleanup After Unit Test | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| # Clean up test data to free space before integration tests | ||||||||||||||||||||||||||||||||||||||
| rm -rf ./log* ./db* ./dump* ./dbsync* || true | ||||||||||||||||||||||||||||||||||||||
| df -h | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Extreme Disk Cleanup | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| rm -rf /usr/local/share/* || true | ||||||||||||||||||||||||||||||||||||||
| rm -rf /usr/share/doc/* || true | ||||||||||||||||||||||||||||||||||||||
| rm -rf /usr/share/man/* || true | ||||||||||||||||||||||||||||||||||||||
| rm -rf /var/cache/* || true | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| find ${{ github.workspace }} -name "*.o" -type f -delete || true | ||||||||||||||||||||||||||||||||||||||
| find ${{ github.workspace }} -name "*.a" -type f -delete || true | ||||||||||||||||||||||||||||||||||||||
| find ${{ github.workspace }} -name "*.la" -type f -delete || true | ||||||||||||||||||||||||||||||||||||||
| find ${{ github.workspace }} -name "*.so" -type f -delete || true | ||||||||||||||||||||||||||||||||||||||
| find ${{ github.workspace }} -name "*.pyc" -type f -delete || true | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| rm -rf ${{ github.workspace }}/.git || true | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| df -h | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| echo "Largest directories:" | ||||||||||||||||||||||||||||||||||||||
| du -h --max-depth=2 / 2>/dev/null | sort -hr | head -20 | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Create Log Directories | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| mkdir -p /__w/pikiwidb/pikiwidb/codis/admin/../log | ||||||||||||||||||||||||||||||||||||||
| mkdir -p /__w/pikiwidb/pikiwidb/log | ||||||||||||||||||||||||||||||||||||||
| mkdir -p ./bin || true | ||||||||||||||||||||||||||||||||||||||
| df -h | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+192
to
+197
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hardcoded absolute path in Create Log Directories step may not work across environments. Line 195 uses a hardcoded absolute path: This path is specific to the GitHub Actions runner layout and will fail if:
Replace with a workspace-relative path using the provided variable: - name: Create Log Directories
run: |
- mkdir -p /__w/pikiwidb/pikiwidb/codis/admin/../log
- mkdir -p /__w/pikiwidb/pikiwidb/log
+ mkdir -p ${{ github.workspace }}/codis/log
+ mkdir -p ${{ github.workspace }}/log
mkdir -p ./bin || true
df -h🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Start codis, pika master and pika slave | ||||||||||||||||||||||||||||||||||||||
| working-directory: ${{ github.workspace }}/build | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| 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.sh | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Run Go E2E Tests | ||||||||||||||||||||||||||||||||||||||
| working-directory: ${{ github.workspace }}/build | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
|
|
@@ -133,6 +213,15 @@ jobs: | |||||||||||||||||||||||||||||||||||||
| chmod +x integrate_test.sh | ||||||||||||||||||||||||||||||||||||||
| sh integrate_test.sh | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Cleanup Test Data | ||||||||||||||||||||||||||||||||||||||
| if: always() | ||||||||||||||||||||||||||||||||||||||
| working-directory: ${{ github.workspace }}/build | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| rm -rf master_data slave_data rename_data acl1_data acl2_data acl3_data | ||||||||||||||||||||||||||||||||||||||
| rm -rf codis_data_1 codis_data_2 | ||||||||||||||||||||||||||||||||||||||
| rm -rf *.conf *.conf.bak | ||||||||||||||||||||||||||||||||||||||
| df -h | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+216
to
+223
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major Add process termination to CentOS Cleanup Test Data for consistency. The ubuntu Cleanup Test Data (lines 108–109) explicitly terminates pika and codis processes, but the centos equivalent (lines 175–182) omits - name: Cleanup Test Data
if: always()
working-directory: ${{ github.workspace }}/build
run: |
+ pkill -9 pika || true
+ pkill -9 codis || true
rm -rf master_data slave_data rename_data acl1_data acl2_data acl3_data
rm -rf codis_data_1 codis_data_2
rm -rf *.conf *.conf.bak
df -h📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| build_on_macos: | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
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.
Extreme Disk Cleanup is overly aggressive and risks breaking the build.
This step removes files that may be needed during the build or for binary execution:
find ... *.so ... -delete): Removing shared libraries could break the pika binary if it depends on runtime.sofiles in the build directory or system paths.rm -rf ... .git): Removing the.gitdirectory in CI workflows is risky; some build steps may reference git metadata or history./usr/local/share,/usr/share/doc,/var/cache) may interfere with dependencies or system tools needed by the build.Consider replacing this with targeted, phase-specific cleanup:
.git, shared libraries, and system dependencies.Suggested replacement (conservative approach):
- name: Extreme Disk Cleanup run: | - - rm -rf /usr/local/share/* || true - rm -rf /usr/share/doc/* || true - rm -rf /usr/share/man/* || true - rm -rf /var/cache/* || true - - find ${{ github.workspace }} -name "*.o" -type f -delete || true - find ${{ github.workspace }} -name "*.a" -type f -delete || true - find ${{ github.workspace }} -name "*.la" -type f -delete || true - find ${{ github.workspace }} -name "*.so" -type f -delete || true - find ${{ github.workspace }} -name "*.pyc" -type f -delete || true - - rm -rf ${{ github.workspace }}/.git || true - - df -h - - echo "Largest directories:" - du -h --max-depth=2 / 2>/dev/null | sort -hr | head -20 + # Clean only CMake intermediate files and test artifacts + find ${{ github.workspace }}/build -name "*.o" -type f -delete || true + find ${{ github.workspace }}/build -name "*.a" -type f -delete || true + rm -rf ${{ github.workspace }}/build/CMakeFiles || true + rm -rf ${{ github.workspace }}/build/_deps || true + + # Do NOT remove: + # - .so files (may be runtime dependencies) + # - .git (git metadata may be needed) + # - System files (could break build tools) + + df -h🤖 Prompt for AI Agents