Skip to content

refactor(packages): update nextgen tiflash builder#989

Merged
ti-chi-bot[bot] merged 1 commit into
mainfrom
refactor/use-rocky8-based-builder-image-for-tiflash-nextgen
Jun 4, 2026
Merged

refactor(packages): update nextgen tiflash builder#989
ti-chi-bot[bot] merged 1 commit into
mainfrom
refactor/use-rocky8-based-builder-image-for-tiflash-nextgen

Conversation

@wuhuizuo
Copy link
Copy Markdown
Contributor

@wuhuizuo wuhuizuo commented Jun 4, 2026

No description provided.

Copy link
Copy Markdown

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

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 refactors the packages.yaml.tmpl to update the TiFlash builder images based on the release version and profile conditions. It introduces a new conditional builder for "nextgen" or "experiment" profiles starting from version 8.5.0, while preserving the existing builder for other profiles from 8.2.0 onwards. The change is clear and logically segmented, improving the build matrix with more precise conditions. Overall, the patch is concise and mostly well-structured.


Code Improvements:

  • Complex conditional expressions (packages/packages.yaml.tmpl, lines ~1877-1882):
    The new conditional logic uses nested and and has functions inside the if statement, which can be hard to read and maintain. Consider extracting these conditions into named template variables or helper functions to improve readability and maintainability, for example:

    {{ $isNextGen := has (coll.Slice "nextgen" "experiment") .Release.profile }}
    {{ $versionGTE8_5 := semver.CheckConstraint ">= 8.5.0-0" .Release.version }}
    
    builders:
      - if: {{ and $versionGTE8_5 $isNextGen }}
        image: ghcr.io/pingcap-qe/cd/builders/tiflash:v2025.4.15-rocky8-llvm-17.0.6-v2
      - if: {{ and (semver.CheckConstraint ">= 8.2.0-0" .Release.version) (not $isNextGen) }}
        image: ghcr.io/pingcap-qe/cd/builders/tiflash:v2025.8.10-2-gc9e3144-centos7

    This approach improves clarity and reduces the chance of subtle logic bugs.

  • Version boundary consistency:
    The new nextgen profile builder is gated at >= 8.5.0-0, while the fallback builder remains at >= 8.2.0-0. Ensure this version split was intentional and documented somewhere, as it might cause confusion or unexpected builder selections for versions between 8.2.0 and 8.5.0 with a nextgen profile.


Best Practices:

  • Lack of PR description:
    The PR description is empty. Please add a short summary explaining the motivation behind this refactor, especially the introduction of the "nextgen" and "experiment" profile conditions and their impact on the build process. This helps reviewers and future maintainers understand the rationale and context of the change.

  • Testing coverage:
    There is no indication of tests verifying these conditional branches. Please ensure that the build matrix or CI configuration is tested with release versions and profiles covering:

    • Version >= 8.5.0 with "nextgen" or "experiment" profiles
    • Version >= 8.2.0 without those profiles
    • Version < 8.2.0 (existing behavior)

    Adding automated tests or at least documented manual test instructions would improve confidence in this change.


No critical issues detected, but improving readability and adding documentation/testing will make the refactor more robust and maintainable.

@ti-chi-bot ti-chi-bot Bot added the size/XS label Jun 4, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Jun 4, 2026

@JaySon-Huang: adding LGTM is restricted to approvers and reviewers in OWNERS files.

Details

In response to this:

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.

@JaySon-Huang
Copy link
Copy Markdown

related changes: pingcap/tiflash#10887

@wuhuizuo
Copy link
Copy Markdown
Contributor Author

wuhuizuo commented Jun 4, 2026

/approve

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Jun 4, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JaySon-Huang, 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 approved label Jun 4, 2026
@ti-chi-bot ti-chi-bot Bot merged commit 99e1b3d into main Jun 4, 2026
4 checks passed
@ti-chi-bot ti-chi-bot Bot deleted the refactor/use-rocky8-based-builder-image-for-tiflash-nextgen branch June 4, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants