Skip to content

fix(tikv/rust-rocksdb): migrate CI from CentOS 7 to Rocky Linux 8#4564

Merged
ti-chi-bot[bot] merged 1 commit into
PingCAP-QE:mainfrom
liyishuai:fix/rust-rocksdb-rocky8
Apr 29, 2026
Merged

fix(tikv/rust-rocksdb): migrate CI from CentOS 7 to Rocky Linux 8#4564
ti-chi-bot[bot] merged 1 commit into
PingCAP-QE:mainfrom
liyishuai:fix/rust-rocksdb-rocky8

Conversation

@liyishuai

Copy link
Copy Markdown
Contributor

Problem

openssl-sys v0.9.114 (released ~April 2026) dropped support for OpenSSL < 1.1.0. The current CentOS 7 builder image installs openssl-devel from the CentOS 7 repos, which provides OpenSSL 1.0.2k — now rejected at compile time with:

"This crate is only compatible with OpenSSL (version 1.1.0, 1.1.1, 3.x, or 4.x), but a different version of OpenSSL was found."

This breaks the encryption feature build for all PRs targeting tikv/rust-rocksdb (confirmed also broken on PR #849, an unrelated change).

Upstream issue: tikv/rust-rocksdb#850

Fix

Switch all three jobs (pull-rust-rocksdb-lint, pull-rust-rocksdb-test-x86, pull-rust-rocksdb-test-arm) to the same Rocky Linux 8 builder image that tikv/tikv latest presubmits already use (v2026.3.22-3-g892e449).

Rocky Linux 8 ships OpenSSL 1.1.1 and a modern GCC system-wide, so:

  • yum install -y openssl-devel is removed (pre-installed in the image)
  • The devtoolset-8 source block is removed (system GCC is sufficient)
  • The CentOS-specific llvm-toolset-7.0 SCL install is replaced with dnf install -y clang-tools-extra

Precedent

tikv/tikv latest presubmits already run on this image (see PR #4383).

Copilot AI review requested due to automatic review settings April 29, 2026 07:48
@pingcap-cla-assistant

pingcap-cla-assistant Bot commented Apr 29, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@ti-chi-bot ti-chi-bot Bot added the size/S label Apr 29, 2026

@ti-chi-bot ti-chi-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I have already done a preliminary review for you, and I hope to help you do a better job.

Summary:
This PR updates the CI builder images for tikv/rust-rocksdb presubmit jobs from CentOS 7 to Rocky Linux 8 to fix build failures caused by outdated OpenSSL (1.0.2k) on CentOS 7. The approach replaces the base image, removes redundant OpenSSL and GCC setup commands, and adjusts package installation commands accordingly. Overall, the changes are minimal, focused, and coherent with the rationale provided. The migration aligns with existing usage in tikv/tikv. The modifications appear correct and well-targeted to fix the immediate build breakage.


Code Improvements

  • Hardcoded version tags in image references

    • Files: prow-jobs/tikv/rust-rocksdb/latest-presubmits.yaml (multiple lines: ~23, ~72, ~149)
    • Issue: The image tags are pinned to a specific commit (v2026.3.22-3-g892e449). This can cause maintenance overhead when the image is updated or rebuilt.
    • Suggestion: Consider using a floating tag like latest or a date-based tag updated regularly, or centralize the image tag in a variable to ease future updates. For example:
      - image: ghcr.io/pingcap-qe/cd/builders/tikv:v2026-latest
      And document the image update policy.
  • Reliance on dnf in the container

    • Files: latest-presubmits.yaml (~lines 38-43)
    • Issue: The script installs clang-tools-extra via dnf if clang-format is missing. Since the image is controlled, it’s better to ensure the required tools are pre-installed in the image to avoid CI flakiness or slowness caused by package installs during job runtime.
    • Suggestion: Update the builder image to consistently include clang-format and required tools, removing the conditional install block from the presubmit job.
  • Remove redundant comments about GCC setup

    • Files: latest-presubmits.yaml (~lines 78-84, 149-155)
    • Issue: The comments and conditionals for sourcing devtoolset-8 are removed, which is good, but the leftover comments in the PR description or other docs should also be updated to avoid confusion about GCC setup.

Best Practices

  • Add a comment about the image upgrade decision

    • Files: latest-presubmits.yaml (top of the file or near image references)
    • Issue: It would be helpful for future maintainers to see a brief comment explaining why the image was upgraded (OpenSSL version incompatibility).
    • Suggestion:
      # Updated base image to Rocky Linux 8 to fix OpenSSL version incompatibility with openssl-sys 0.9.114+
  • Testing coverage

    • Files: N/A (CI config)
    • Issue: The PR does not mention if jobs were manually tested or if there are nightly runs on these images to catch regressions early.
    • Suggestion: Confirm that the new image has been validated or add a temporary test presubmit job to verify all build matrix combinations pass.

Minor

  • Consistent use of package manager
    • Files: latest-presubmits.yaml (~lines 38-43)
    • Issue: The code replaces yum install llvm-toolset-7.0 with dnf install clang-tools-extra, which is correct for Rocky Linux 8, but make sure no other places rely on yum commands that could fail.
    • Suggestion: Check other scripts or jobs for similar package manager assumptions and update accordingly.

Overall, this PR addresses the critical build breakage effectively with minimal and clear changes. Addressing the above suggestions will improve maintainability and robustness of the CI configuration.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the CI environment for rust-rocksdb by migrating to a newer Docker image and removing redundant runtime dependency installations like openssl-devel and devtoolset-8. Feedback suggests further optimizing the CI pipeline by baking clang-tools-extra directly into the Docker image instead of installing it at runtime to improve performance and reliability.

if [ -f /opt/rh/llvm-toolset-7.0/enable ]; then
source /opt/rh/llvm-toolset-7.0/enable
fi
dnf install -y clang-tools-extra

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

According to the general rules, dependencies should be baked into the Docker image instead of being installed at runtime in CI scripts to improve performance and reliability. Since openssl-devel is already pre-installed in the new Rocky Linux 8 image, consider also baking clang-tools-extra (which provides clang-format) into the image and removing this runtime installation block.

References
  1. For better CI performance and reliability, bake dependencies into the Docker image instead of installing them at runtime in CI scripts.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the tikv/rust-rocksdb Prow presubmit jobs to use a Rocky Linux 8-based builder image so CI can compile openssl-sys (which now requires OpenSSL ≥ 1.1.0), fixing the currently broken encryption feature builds on CentOS 7.

Changes:

  • Switch all tikv/rust-rocksdb presubmit jobs to ghcr.io/pingcap-qe/cd/builders/tikv:v2026.3.22-3-g892e449 (Rocky Linux 8-based).
  • Remove CentOS 7-specific setup steps (openssl-devel install and devtoolset-8 enable) from test jobs.
  • Replace the CentOS SCL-based clang-format installation with dnf install -y clang-tools-extra in the lint job.

openssl-sys v0.9.114 dropped support for OpenSSL < 1.1.0, which breaks
the encryption feature build on CentOS 7 (OpenSSL 1.0.2k). The Rocky
Linux 8 tikv builder image already ships openssl-devel 1.1.1 and a
modern GCC, so no extra install steps are needed.

Signed-off-by: Yishuai Li <yishuai.li@pingcap.com>
@liyishuai
liyishuai force-pushed the fix/rust-rocksdb-rocky8 branch from 24662f3 to 1f9ce20 Compare April 29, 2026 08:22

@ti-chi-bot ti-chi-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I have already done a preliminary review for you, and I hope to help you do a better job.

Summary:

This PR updates the CI configuration for tikv/rust-rocksdb by migrating the builder image from CentOS 7 to Rocky Linux 8 to resolve OpenSSL version compatibility issues. The migration removes explicit installation of openssl-devel and software collections for GCC and LLVM, relying instead on the newer base image's pre-installed packages. The changes are straightforward and focused on updating the CI environment, with no changes to application code. Overall, the approach is sound and aligns with upstream decisions in tikv/tikv CI.


Code Improvements:

  • Yum vs Dnf usage consistency (prow-jobs/tikv/rust-rocksdb/latest-presubmits.yaml lines ~40 and elsewhere):
    The PR replaces yum install -y llvm-toolset-7.0 with dnf install -y clang-tools-extra but leaves some references to yum install commented out or removed. Since Rocky Linux 8 uses dnf as the default package manager, ensure all package installation commands use dnf consistently in CI scripts to avoid subtle issues.
    Suggestion: Replace all yum commands with dnf in relevant scripts or verify the base image's compatibility.

  • Idempotency of dnf install commands (prow-jobs/tikv/rust-rocksdb/latest-presubmits.yaml lines ~40):
    CI jobs should be idempotent and fail fast if dependencies are not met. The current script installs clang-tools-extra only if clang-format is missing, which is good. However, consider adding -y and --setopt=install_weak_deps=False or --quiet flags to reduce noise and avoid interactive prompts.

  • Environment Variables or Setup Scripts for Toolchain (prow-jobs/tikv/rust-rocksdb/latest-presubmits.yaml lines ~80-90 & ~150-160):
    The removal of devtoolset-8 sourcing assumes the system GCC version is sufficient. Confirm that the gcc/g++ versions in the new image meet minimum requirements for building rust-rocksdb, and document this assumption in the job or README to avoid confusion.


Best Practices:

  • Documentation Update (prow-jobs/tikv/rust-rocksdb/latest-presubmits.yaml):
    The PR description is excellent, but it would be helpful to add a brief comment in the YAML file near the image declarations explaining the switch and referencing this PR or the reason (OpenSSL version compatibility). This aids future maintainers in understanding why this specific builder image is used.

  • Testing Coverage:
    The PR affects CI infrastructure. Ensure that the changed presubmit jobs have been run successfully with the new image on multiple PRs to confirm no regressions or unexpected failures in the build, lint, or test steps.

  • Consistent Image Tagging:
    The new image tag v2026.3.22-3-g892e449 is used in three places. Consider extracting the image tag to a single variable or comment to reduce duplication and ease future updates.


Critical Issues:

No critical issues found. The PR addresses a known and blocking build problem and makes appropriate environment updates in CI config files only.

@wuhuizuo

Copy link
Copy Markdown
Contributor

/cc @lybcodes

@ti-chi-bot
ti-chi-bot Bot requested a review from lybcodes April 29, 2026 09:55
@wuhuizuo

Copy link
Copy Markdown
Contributor

/assign @lybcodes

@lybcodes

Copy link
Copy Markdown
Contributor

/lgtm

I reviewed the change and it looks reasonable to me.

The migration from the CentOS 7 builder to ghcr.io/pingcap-qe/cd/builders/tikv:v2026.3.22-3-g892e449 addresses the OpenSSL compatibility issue for openssl-sys >= 0.9.114. The new image supports both linux/amd64 and linux/arm64, and includes Rocky Linux 8.10 with openssl-devel 1.1.1k, gcc/g++ 8.5, and cmake, so removing the old openssl-devel install and devtoolset-8 setup makes sense.

Non-blocking follow-up: before merge please trigger a real tikv/rust-rocksdb run for:

  • pull-rust-rocksdb-lint
  • pull-rust-rocksdb-test-x86
  • pull-rust-rocksdb-test-arm
    or please trigger them immediately after this config is merged.

@ti-chi-bot

ti-chi-bot Bot commented Apr 29, 2026

Copy link
Copy Markdown

@lybcodes: adding LGTM is restricted to approvers and reviewers in OWNERS files.

Details

In response to this:

/lgtm

I reviewed the change and it looks reasonable to me.

The migration from the CentOS 7 builder to ghcr.io/pingcap-qe/cd/builders/tikv:v2026.3.22-3-g892e449 addresses the OpenSSL compatibility issue for openssl-sys >= 0.9.114. The new image supports both linux/amd64 and linux/arm64, and includes Rocky Linux 8.10 with openssl-devel 1.1.1k, gcc/g++ 8.5, and cmake, so removing the old openssl-devel install and devtoolset-8 setup makes sense.

Non-blocking follow-up: before merge please trigger a real tikv/rust-rocksdb run for:

  • pull-rust-rocksdb-lint
  • pull-rust-rocksdb-test-x86
  • pull-rust-rocksdb-test-arm
    or please trigger them immediately after this config is merged.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ti-chi-bot

ti-chi-bot Bot commented Apr 29, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lybcodes, wuhuizuo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added the lgtm label Apr 29, 2026
@ti-chi-bot

ti-chi-bot Bot commented Apr 29, 2026

Copy link
Copy Markdown

[LGTM Timeline notifier]

Timeline:

  • 2026-04-29 10:21:37.203492781 +0000 UTC m=+2766102.408852828: ☑️ agreed by wuhuizuo.

@ti-chi-bot ti-chi-bot Bot added the approved label Apr 29, 2026
@ti-chi-bot
ti-chi-bot Bot merged commit 0905ad8 into PingCAP-QE:main Apr 29, 2026
6 checks passed
@liyishuai
liyishuai deleted the fix/rust-rocksdb-rocky8 branch April 29, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

4 participants