[SERVER-72264] clang-tidy task doesn't process proper schema for fixes Created: 19/Dec/22  Updated: 29/Oct/23  Resolved: 20/Dec/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Bug Priority: Major - P3
Reporter: Matt Kneiser Assignee: Matt Kneiser
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2022-12-26
Participants:

 Description   

When the clang-tidy task generates feedback for failures, the mapping of fields like "FilePath" and "FileOffset" do not line up with the current toolchain version's schema for these fields. This leads to failures like this in evergreen:

[2022/12/15 16:36:39.995] Traceback (most recent call last):
[2022/12/15 16:36:39.995]   File "/data/mci/7594444316347d82613f1fd3d6404fce/src/buildscripts/clang_tidy.py", line 176, in <module>
[2022/12/15 16:36:39.995]     sys.exit(main())
[2022/12/15 16:36:39.995]   File "/data/mci/7594444316347d82613f1fd3d6404fce/src/buildscripts/clang_tidy.py", line 161, in main
[2022/12/15 16:36:39.995]     failed_files = _combine_errors(Path(args.output_dir, args.fixes_file), files_to_parse)
[2022/12/15 16:36:39.995]   File "/data/mci/7594444316347d82613f1fd3d6404fce/src/buildscripts/clang_tidy.py", line 71, in _combine_errors
[2022/12/15 16:36:40.015]     fix["FilePath"], {}).setdefault(
[2022/12/15 16:36:40.015] KeyError: 'FilePath' 

When the correct output should look like this:

 The number of jobs completed is 1/1. Duration 0:00:06.252210
clang_tidy_fixes/
clang_tidy_fixes/src/
clang_tidy_fixes/src/mongo/
clang_tidy_fixes/src/mongo/util/
clang_tidy_fixes/src/mongo/util/represent_as_test.yml
clang_tidy_fixes/src/mongo/util/represent_as_test.fail
clang_tidy_fixes/src/mongo/util/represent_as_test.pass
clang_tidy_fixes/clang_tidy_fixes.json 



 Comments   
Comment by Githook User [ 20/Dec/22 ]

Author:

{'name': 'Matt Kneiser', 'email': 'matt.kneiser@mongodb.com', 'username': 'themattman'}

Message: SERVER-72264 Clang-tidy task needs fix schema update
Branch: master
https://github.com/mongodb/mongo/commit/8175ee27163fe9206f92ea36a2ce1d53c8b6b9ae

Generated at Thu Feb 08 06:21:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.