Skip to content
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(tiflash): upgrade to LLVM17 & remove useless prepare tool stage #2901

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

Lloyd-Pottiger
Copy link
Contributor

@Lloyd-Pottiger Lloyd-Pottiger commented Apr 10, 2024

$ docker run -it --rm  hub.pingcap.net/tiflash/tiflash-llvm-base:amd64-llvm-17.0.6 /bin/bash
[root@d7d2c6310768 root]# which clang-format
/usr/local/bin/clang-format
[root@d7d2c6310768 root]# which clang-tidy  
/usr/local/bin/clang-tidy
[root@d7d2c6310768 root]# clang-tidy --version
LLVM (http://llvm.org/):
  LLVM version 17.0.6
  Optimized build.
[root@d7d2c6310768 root]# clang-format --version
clang-format version 17.0.6 (/llvm-project/clang 6009708b4367171ccdbf4b5905cb6a803753fe18)
[root@d7d2c6310768 root]# which ccahe
/usr/bin/which: no ccahe in (/root//.cargo/bin:/opt/cmake/bin:/usr/local/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/root/.cargo/bin)
[root@d7d2c6310768 root]# which ccache
/usr/local/bin/ccache
[root@d7d2c6310768 root]# ccache --version
ccache version 4.5.1
Features: file-storage http-storage redis-storage

Copyright (C) 2002-2007 Andrew Tridgell
Copyright (C) 2009-2021 Joel Rosdahl and other contributors

See <https://ccache.dev/credits.html> for a complete list of contributors.

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.
[root@d7d2c6310768 root]# cmake --version
cmake version 3.24.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
[root@d7d2c6310768 root]# gcovr --version
bash: gcovr: command not found
[root@d7d2c6310768 root]# gcov --version
gcov (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.

The image has contained all necessary tools.

@ti-chi-bot ti-chi-bot bot requested review from purelind and wuhuizuo April 10, 2024 10:14
@ti-chi-bot ti-chi-bot bot added the size/S label Apr 10, 2024
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
@Lloyd-Pottiger Lloyd-Pottiger changed the title feat(tiflash): install clang-format-17 if not exist feat(tiflash): remove useless prepare tool stage Jun 25, 2024
Copy link

ti-chi-bot bot commented Jun 25, 2024

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

This pull request seems to be about changing the version of clang-format used in the tiflash pipeline from version 12 or 15 to version 17. The pull request also updates the docker image used in the pipeline.

Key changes:

  1. The docker image was changed from hub.pingcap.net/tiflash/tiflash-llvm13-amd64:v20231214 to hub.pingcap.net/tiflash/tiflash-llvm-base:amd64-llvm-17.0.6 in several files.

  2. The Prepare tools stage that was installing several tools like ccache, cmake3, clang-format, clang-format-15, clang-tidy, and gcovr, was completely removed from the pipeline in several groovy files.

Potential problems:

  1. The pull request is missing a detailed description. It would be helpful to provide a rationale for these changes.

  2. By removing the Prepare tools stage, the pipeline now assumes that all required tools are pre-installed in the new docker image. If this is not the case, the pipeline could fail.

  3. The change in clang-format version may have implications on the codebase if the new version introduces any breaking changes or behaves differently from the previous version.

Fixing suggestions:

  1. Add a detailed description explaining the reasons for the changes, the impact, and the benefits.

  2. Ensure that all the tools previously installed in the Prepare tools stage are indeed present in the new Docker image.

  3. Test the pipeline with the new clang-format version to make sure it behaves as expected.

@Lloyd-Pottiger Lloyd-Pottiger changed the title feat(tiflash): remove useless prepare tool stage feat(tiflash): upgrade to LLVM17 & remove useless prepare tool stage Jun 25, 2024
@purelind
Copy link
Collaborator

/hold

Copy link
Collaborator

@purelind purelind left a comment

Choose a reason for hiding this comment

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

/lgtm

@ti-chi-bot ti-chi-bot bot added the lgtm label Jun 25, 2024
Copy link

ti-chi-bot bot commented Jun 25, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-25 06:32:29.121395787 +0000 UTC m=+701275.606884621: ☑️ agreed by purelind.

@ti-chi-bot ti-chi-bot bot added the approved label Jun 25, 2024
@purelind
Copy link
Collaborator

/cc @JaySon-Huang

@ti-chi-bot ti-chi-bot bot requested a review from JaySon-Huang June 25, 2024 06:32
Copy link
Contributor

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Jun 25, 2024

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

In response to this:

LGTM

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/test-infra repository.

Copy link

ti-chi-bot bot commented Jun 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JaySon-Huang, purelind

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

The pull request process is described here

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

@purelind
Copy link
Collaborator

/unhold

@ti-chi-bot ti-chi-bot bot merged commit 956568f into PingCAP-QE:main Jun 25, 2024
2 checks passed
@Lloyd-Pottiger Lloyd-Pottiger deleted the upgrade-clang-format branch June 25, 2024 06: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.

3 participants