open-telemetry / opentelemetry-cpp

The OpenTelemetry C++ Client
https://opentelemetry.io/
Apache License 2.0
811 stars 391 forks source link

[CI] Upgrade to clang-format 18 #2684

Closed marcalff closed 1 month ago

marcalff commented 1 month ago

Fixes #2578

Changes

Please provide a brief description of the changes here.

For significant contributions please make sure you have completed the following items:

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 96.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 87.68%. Comparing base (497eaf4) to head (cdb299a). Report is 69 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2684/graphs/tree.svg?width=650&height=150&src=pr&token=FJESTYQ2AD&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2684?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) ```diff @@ Coverage Diff @@ ## main #2684 +/- ## ========================================== + Coverage 87.12% 87.68% +0.56% ========================================== Files 200 190 -10 Lines 6109 5849 -260 ========================================== - Hits 5322 5128 -194 + Misses 787 721 -66 ``` | [Files](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2684?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [api/include/opentelemetry/common/kv\_properties.h](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2684?src=pr&el=tree&filepath=api%2Finclude%2Fopentelemetry%2Fcommon%2Fkv_properties.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-YXBpL2luY2x1ZGUvb3BlbnRlbGVtZXRyeS9jb21tb24va3ZfcHJvcGVydGllcy5o) | `98.91% <ø> (-0.06%)` | :arrow_down: | | [api/include/opentelemetry/common/spin\_lock\_mutex.h](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2684?src=pr&el=tree&filepath=api%2Finclude%2Fopentelemetry%2Fcommon%2Fspin_lock_mutex.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-YXBpL2luY2x1ZGUvb3BlbnRlbGVtZXRyeS9jb21tb24vc3Bpbl9sb2NrX211dGV4Lmg=) | `27.78% <ø> (+2.78%)` | :arrow_up: | | [api/include/opentelemetry/logs/event\_logger.h](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2684?src=pr&el=tree&filepath=api%2Finclude%2Fopentelemetry%2Flogs%2Fevent_logger.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-YXBpL2luY2x1ZGUvb3BlbnRlbGVtZXRyeS9sb2dzL2V2ZW50X2xvZ2dlci5o) | `90.91% <100.00%> (-1.39%)` | :arrow_down: | | [api/include/opentelemetry/logs/logger.h](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2684?src=pr&el=tree&filepath=api%2Finclude%2Fopentelemetry%2Flogs%2Flogger.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-YXBpL2luY2x1ZGUvb3BlbnRlbGVtZXRyeS9sb2dzL2xvZ2dlci5o) | `63.89% <100.00%> (-0.69%)` | :arrow_down: | | [api/include/opentelemetry/logs/provider.h](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2684?src=pr&el=tree&filepath=api%2Finclude%2Fopentelemetry%2Flogs%2Fprovider.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-YXBpL2luY2x1ZGUvb3BlbnRlbGVtZXRyeS9sb2dzL3Byb3ZpZGVyLmg=) | `100.00% <100.00%> (ø)` | | | [api/include/opentelemetry/nostd/unique\_ptr.h](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2684?src=pr&el=tree&filepath=api%2Finclude%2Fopentelemetry%2Fnostd%2Funique_ptr.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-YXBpL2luY2x1ZGUvb3BlbnRlbGVtZXRyeS9ub3N0ZC91bmlxdWVfcHRyLmg=) | `100.00% <100.00%> (ø)` | | | [api/include/opentelemetry/nostd/utility.h](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2684?src=pr&el=tree&filepath=api%2Finclude%2Fopentelemetry%2Fnostd%2Futility.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-YXBpL2luY2x1ZGUvb3BlbnRlbGVtZXRyeS9ub3N0ZC91dGlsaXR5Lmg=) | `83.34% <100.00%> (ø)` | | | [api/include/opentelemetry/trace/span.h](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2684?src=pr&el=tree&filepath=api%2Finclude%2Fopentelemetry%2Ftrace%2Fspan.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-YXBpL2luY2x1ZGUvb3BlbnRlbGVtZXRyeS90cmFjZS9zcGFuLmg=) | `85.72% <ø> (+1.51%)` | :arrow_up: | | [api/include/opentelemetry/trace/tracer.h](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2684?src=pr&el=tree&filepath=api%2Finclude%2Fopentelemetry%2Ftrace%2Ftracer.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-YXBpL2luY2x1ZGUvb3BlbnRlbGVtZXRyeS90cmFjZS90cmFjZXIuaA==) | `100.00% <ø> (ø)` | | | [...nclude/opentelemetry/sdk/common/empty\_attributes.h](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2684?src=pr&el=tree&filepath=sdk%2Finclude%2Fopentelemetry%2Fsdk%2Fcommon%2Fempty_attributes.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c2RrL2luY2x1ZGUvb3BlbnRlbGVtZXRyeS9zZGsvY29tbW9uL2VtcHR5X2F0dHJpYnV0ZXMuaA==) | `100.00% <100.00%> (ø)` | | | ... and [7 more](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2684?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | | ... and [49 files with indirect coverage changes](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/2684/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)
lalitb commented 1 month ago

We can also update Dockerfile to use the appropriate docker image so that:

./ci/run_docker.sh ./ci/do_ci.sh format

use the correct version.

marcalff commented 1 month ago

CI failures seen in github logs:

Running kernel seems to be up-to-date.

Restarting services...
 systemctl restart chrony.service containerd.service cron.service haveged.service hv-kvp-daemon.service multipathd.service packagekit.service php8.3-fpm.service polkit.service rsyslog.service runner-provisioner.service systemd-journald.service systemd-networkd.service systemd-resolved.service systemd-udevd.service udisks2.service walinuxagent.service
Error: Process completed with exit code 143.

I assume this comes from the infrastructure, not from the opentelemetry-cpp codebase.

lalitb commented 1 month ago

I assume this comes from the infrastructure, not from the opentelemetry-cpp codebase.

Weird it's only coming for maintainer mode CI checks.