Skip to content

fix: Force CMake to run with the policy behavior of version 3.5 to avoid c…#3075

Merged
Mixficsol merged 1 commit intoOpenAtomFoundation:unstablefrom
Mixficsol:hotfix/fix_unstable_ci
Apr 3, 2025
Merged

fix: Force CMake to run with the policy behavior of version 3.5 to avoid c…#3075
Mixficsol merged 1 commit intoOpenAtomFoundation:unstablefrom
Mixficsol:hotfix/fix_unstable_ci

Conversation

@Mixficsol
Copy link
Copy Markdown
Collaborator

@Mixficsol Mixficsol commented Apr 2, 2025

…ases where a higher version of CMake does not compile

Summary by CodeRabbit

  • Chores
    • Refined automated build cleanup routines to retain important dependency directories and improve consistency.
    • Updated the build configuration with a minimum policy version setting to enhance compatibility across environments.

…ases where a higher version of CMake does not compile
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 2, 2025

Walkthrough

This pull request removes specific cleanup commands from the CI workflow configuration and adds a CMake policy enforcement argument. In the GitHub workflow file, cleanup steps no longer delete the ./deps directory (and, in one case, the ./buildtree directory) while still removing ./buildtrees. In the CMake configuration, the new argument -DCMAKE_POLICY_VERSION_MINIMUM=3.5 is added to multiple dependency build calls to enforce compatibility with CMake 3.5. No changes were made to any public or exported entities.

Changes

File(s) Change Summary
.github/workflows/pika.yml Removed rm -rf ./deps cleanup commands in the Ubuntu, CentOS, and macOS jobs, and removed rm -rf ./buildtree in the macOS job, while keeping the deletion of ./buildtrees intact.
CMakeLists.txt Added the -DCMAKE_POLICY_VERSION_MINIMUM=3.5 argument to ExternalProject_Add calls for dependencies (e.g., gtest, gflags, glog, snappy, zstd, fmt, lz4, zlib, protobuf, rocksdb, rediscache) to ensure CMake policy consistency.

Possibly related PRs

  • fix:fix CI #2924: Adjustments in the CI workflow cleanup commands in .github/workflows/pika.yml relate to similar modifications in this PR.

Suggested labels

🧹 Updates

Suggested reviewers

  • lqxhub
  • baerwang
  • AlexStocks

Poem

Hoppity hops and code so neat,
I nibble bugs for every treat.
Cleanup steps trimmed with a cheerful grace,
CMake sings a policy in its place.
A rabbit’s joy in each revised line,
Carrot-fueled code that’s simply divine!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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 the ☢️ Bug Something isn't working label Apr 2, 2025
@Mixficsol Mixficsol marked this pull request as ready for review April 2, 2025 12:39
Copy link
Copy Markdown

@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

🧹 Nitpick comments (1)
CMakeLists.txt (1)

155-157: Consistent Enforcement of CMake Policy Version
Multiple ExternalProject_Add blocks (e.g., for gtest, gflags, glog, snappy, zstd, fmt, lz4, zlib, gperftools, rocksdb, and rediscache) now include the argument:
  -DCMAKE_POLICY_VERSION_MINIMUM=3.5
This enforces that each dependency is built using the policy behavior of CMake 3.5, which is central to this PR’s objective.

Consider centralizing this flag into a CMake variable (for example, set(POLICY_3_5_FLAG "-DCMAKE_POLICY_VERSION_MINIMUM=3.5")) to reduce duplication and simplify future maintenance.

Also applies to: 196-199, 273-275, 315-317, 357-359, 394-396, 437-439, 475-477, 508-510, 631-632, 674-675

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between adc7253 and 3caa2ef.

📒 Files selected for processing (2)
  • .github/workflows/pika.yml (2 hunks)
  • CMakeLists.txt (12 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: build_on_centos
  • GitHub Check: build_on_macos
  • GitHub Check: build_on_ubuntu
  • GitHub Check: Analyze (go)
🔇 Additional comments (3)
.github/workflows/pika.yml (2)

108-111: CI Cleanup Modification – Preserve Dependency Artifacts
The removal of any commands deleting the ./deps (and in macOS, the ./buildtree) directory is clearly intentional. In the CentOS job, only the ./buildtrees directory is removed (line 110), which should help preserve dependency artifacts between builds.

Please verify that retaining these directories does not lead to stale files interfering with subsequent builds.


167-172: macOS Cleanup Adjustment – Selective Deletion
In the macOS job, the cleanup step now retains dependency directories while removing only the ./buildtrees directory (line 171). This aligns with the objective of keeping dependencies intact for stability.

Ensure that any files copied from deps/lib (lines 169–170) remain consistent with the build requirements over time.

CMakeLists.txt (1)

1-7: CMake Version and Policy Notes
The project already requires CMake 3.18 (line 1) yet enforces an older policy behavior for external projects. This deliberate mismatch is acceptable if the older policy improves compatibility with certain dependency builds.

Please ensure that enforcing the 3.5 policy does not introduce any unforeseen incompatibilities with project code or newer CMake features used elsewhere.

@Mixficsol Mixficsol added the 4.0.2 label Apr 2, 2025
@Mixficsol Mixficsol merged commit 297a8cc into OpenAtomFoundation:unstable Apr 3, 2025
14 checks passed
@Mixficsol Mixficsol deleted the hotfix/fix_unstable_ci branch April 3, 2025 01:58
byseea11 pushed a commit to byseea11/pikiwidb that referenced this pull request Sep 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.0.2 ☢️ Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant