Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-72264

clang-tidy task doesn't process proper schema for fixes

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2022-12-26

    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 

      Attachments

        Activity

          People

            matt.kneiser@mongodb.com Matt Kneiser
            matt.kneiser@mongodb.com Matt Kneiser
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: