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

[CI] Upgrade to a newer version of clang-format #2578

Closed
marcalff opened this issue Mar 6, 2024 · 8 comments · Fixed by open-telemetry/cpp-build-tools#8 or #2684
Closed

[CI] Upgrade to a newer version of clang-format #2578

marcalff opened this issue Mar 6, 2024 · 8 comments · Fixed by open-telemetry/cpp-build-tools#8 or #2684
Assignees
Labels
bug Something isn't working triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@marcalff
Copy link
Member

marcalff commented Mar 6, 2024

To Discuss:

  • which version of clang-format to use
  • fix docker images accordingly (including cpp-build-tools)
@marcalff marcalff added the bug Something isn't working label Mar 6, 2024
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Mar 6, 2024
@marcalff marcalff changed the title [CI] Upgrade to a newwer version of clang-format [CI] Upgrade to a newer version of clang-format Mar 6, 2024
@esigo esigo added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 11, 2024
@esigo
Copy link
Member

esigo commented Mar 11, 2024

SIG meeting 03.11.2024: default clang-format from Ubuntu 24.04 will be used.

@esigo esigo self-assigned this Mar 11, 2024
@marcalff
Copy link
Member Author

marcalff commented Apr 22, 2024

Per the github runner images:

https://github.com/actions/runner-images/blob/ubuntu22/20240414.1/images/ubuntu/Ubuntu2204-Readme.md

Available versions in Ubuntu 24.04 22.04 are: Clang-format: 13.0.1, 14.0.0, 15.0.7

I suggest to use Clang-format 15, as it will be available longer than 13 and 14 on this platform, saving another upgrade.

@lalitb
Copy link
Member

lalitb commented Apr 22, 2024

A quick look into the ubuntu24.04 docker image (of dev-brach) shows below versions

root@3d32d77d0cd2:/# cat /etc/os-release  | grep VERSION
VERSION_ID="24.04"
VERSION="24.04 LTS (Noble Numbat)"
VERSION_CODENAME=noble
root@3d32d77d0cd2:/# apt-cache search clang-format
clang-format - Tool to format C/C++/Obj-C code
clang-format-14 - Tool to format C/C++/Obj-C code
clang-format-15 - Tool to format C/C++/Obj-C code
clang-format-16 - Tool to format C/C++/Obj-C code
clang-format-17 - Tool to format C/C++/Obj-C code
clang-format-18 - Tool to format C/C++/Obj-C code
libcode-tidyall-plugin-clangformat-perl - module to run clang-format using Code::TidyAll
$

I don't know if the runner images would have different versions of clang supported from that of docker images. But going with the pattern of supporting last 3 stable releases of clang, it could eventually be 16, 17 and 18.

@marcalff
Copy link
Member Author

A quick look into the ubuntu24.04 docker image (of dev-brach) shows below versions

root@3d32d77d0cd2:/# cat /etc/os-release  | grep VERSION
VERSION_ID="24.04"
VERSION="24.04 LTS (Noble Numbat)"
VERSION_CODENAME=noble
root@3d32d77d0cd2:/# apt-cache search clang-format
clang-format - Tool to format C/C++/Obj-C code
clang-format-14 - Tool to format C/C++/Obj-C code
clang-format-15 - Tool to format C/C++/Obj-C code
clang-format-16 - Tool to format C/C++/Obj-C code
clang-format-17 - Tool to format C/C++/Obj-C code
clang-format-18 - Tool to format C/C++/Obj-C code
libcode-tidyall-plugin-clangformat-perl - module to run clang-format using Code::TidyAll
$

I don't know if the runner images would have different versions of clang supported from that of docker images. But going with the pattern of supporting last 3 stable releases of clang, it could eventually be 16, 17 and 18.

I made a typo in my previous comment, now fixed: the latest ubuntu available as a runner image in github is 22.04, not 24.04.

So, the most up to date version we can use now is clang-format 15.

Of course, by the time the runner upgrades to 24.04, we can upgrade clang-format as well if we want to.

@lalitb
Copy link
Member

lalitb commented Apr 22, 2024

Of course, by the time the runner upgrades to 24.04, we can upgrade clang-format as well if we want to.

ubuntu 24.04 is planned to be released on 25th April. I think we can wait for that.
https://www.omgubuntu.co.uk/2023/10/ubuntu-24-04-release-date-set-for-april-25-2024

@marcalff
Copy link
Member Author

Related:

We sure can wait for April 25, 2024, but will the runner be available in github then ? Most likely not.

@lalitb
Copy link
Member

lalitb commented Apr 22, 2024

Probably we can wait till 25th April to see if clang-format-15 is available in 24.04. If it is available, our decision would be easy to go with the upgrade immediately within 22.04 itself.
22.04 was added as runner on Aug 9th, so it could be the similar timeline for 24.04.

@marcalff marcalff reopened this May 27, 2024
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label May 27, 2024
@marcalff
Copy link
Member Author

Reopen: the docker image is updated, but we still need to run clang-format-18 on opentelemetry-cpp.

@marcalff marcalff removed the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
3 participants