Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-12915

Code change report comment doesn't handle new functions correctly (and errors out)

    • Storage Engines
    • Megabat - 2024-05-14

      Hi Hari & Jonas,
      It looks like we might have missed something in the code that pushes the code change summary to Git.
      Hari has hit an issue with his patch:

      Hi Jeremy, I got the following test failure in the PR testing of my PR. Is it a known issue?

      https://spruce.mongodb.com...

      The error is:

      [2024/04/29 20:13:37.796]     main()
      [2024/04/29 20:13:37.796]   File "/data/mci/94e1160e44abd1cf55a53102e3fbf3f4/wiredtiger/test/evergreen/code_change_report/code_change_report.py", line 608, in main
      [2024/04/29 20:13:37.796]     comment = build_pr_comment(code_change_info=code_change_info)
      [2024/04/29 20:13:37.796]   File "/data/mci/94e1160e44abd1cf55a53102e3fbf3f4/wiredtiger/test/evergreen/code_change_report/code_change_report.py", line 534, in build_pr_comment
      [2024/04/29 20:13:37.796]     complexity_warnings = [
      [2024/04/29 20:13:37.796]   File "/data/mci/94e1160e44abd1cf55a53102e3fbf3f4/wiredtiger/test/evergreen/code_change_report/code_change_report.py", line 538, in <listcomp>
      [2024/04/29 20:13:37.796]     if info['complexity'] > info['prev_complexity'] and info['complexity'] > threshold_to_warn
      [2024/04/29 20:13:37.818] KeyError: 'prev_complexity'

      It looks like we’re not handling the case when new functions are added (for which which the ‘prev_complexity’ value does not exist).
      It should be a simple fix - I’ll create a ticket.
      Cheers, Jeremy
      Created with Jira Integration+ for jonas.bergler (jonas.bergler@mongodb.com)

            Assignee:
            jonas.bergler@mongodb.com Jonas Bergler
            Reporter:
            jonas.bergler@mongodb.com Jonas Bergler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: