{{ message }}
Repository navigation
Move to tidy-check diff again - #23196
Merged
Merged
Conversation
pull Bot
pushed a commit
to Deepakanandrao/duckdb
that referenced
this pull request
Jul 29, 2026
Originally, clangd-tidy was enabled [here](duckdb#21745). The CI check for `clangd-tidy` was disabled in [this](duckdb#23196) PR because the CI job ran very slowly: <img width="822" height="550" alt="Screenshot 2026-07-29 at 10 40 35" src="https://github.com/user-attachments/assets/38d540c5-a188-4ec4-8f39-51533df183f0" /> The job failed because the script exhausted all disk space (160 GiB!). The script kept recreating precompiled header files from scratch after a tidy error, but it did not remove the previously created files. Fixes duckdblabs/duckdb-internal#9770. ### Changes - Re-enable the `clangd-tidy` check in CI (for PRs and on main). - Write `clangd-tidy` disk stats and tidy attempts to CI output. - Use 8 evenly sized chunks and print failures immediately in CI output. - Stop after max 3 failed chunks (so at most 3x 2000 error lines, 3x ~200 files). ### Tidy fixes - Fix `performance-unnecessary-copy-initialization` error (missing `const auto`). - Remove ineffective `std::move()` calls. ### Disk usage The disk usage is kept at 40 GiB (25% of that CI runner instance): ``` attempt 1 (retry 0/2, files 204): tools/utils/test_platform.cpp attempt 1 finished exit=0 in 38.2s; pch size: 5.8 GiB attempt 2 (retry 0/2, files 204): src/optimizer/window_self_join.cpp attempt 2 finished exit=0 in 36.1s; pch size: 11.0 GiB attempt 3 (retry 0/2, files 203): src/planner/binder/tableref/bind_showref.cpp attempt 3 finished exit=0 in 29.0s; pch size: 14.8 GiB attempt 4 (retry 0/2, files 203): src/parser/peg/transformer/transform_copy.cpp attempt 4 finished exit=0 in 27.3s; pch size: 18.8 GiB attempt 5 (retry 0/2, files 203): src/function/scalar/system/aggregate_export.cpp attempt 5 finished exit=0 in 32.0s; pch size: 23.7 GiB attempt 6 (retry 0/2, files 203): src/common/crypto/md5.cpp attempt 6 finished exit=0 in 29.9s; pch size: 28.1 GiB attempt 7 (retry 0/2, files 203): src/execution/operator/helper/physical_disconnect.cpp attempt 7 finished exit=0 in 38.5s; pch size: 34.3 GiB attempt 8 (retry 0/2, files 203): src/main/relation/delim_get_relation.cpp attempt 8 finished exit=0 in 35.7s; pch size: 40.4 GiB ``` ### Measurements Originally, clangd-tidy took ~9 min to run. I did some experiments on how to use the CI instance (16 vCPU, 32 GiB RAM) more efficiently: chunks | concurrency | average CPU | duration --- | --- | --- | --- 100-file chunks | `-j4` | 53% | [10m17s](https://cloud.namespace.so/rrete04q43id4/actions/job/90520079762) 200-file chunks | `-j4` | 55% | [6m59s](https://cloud.namespace.so/rrete04q43id4/actions/job/90520079762) 10 evenly sized chunks | `-j8` | 95% | [4m16s](https://cloud.namespace.so/rrete04q43id4/actions/job/90523783761) 8 evenly sized chunks | `-j8` | 93% | [4m28s](https://cloud.namespace.so/rrete04q43id4/actions/job/90525308431) It's better to use fewer (10 -> 8) chunks because an error clears the precompiled header directory causing clangd to rebuild included header files from scratch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.