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

Improve error logging from cyclomatic test failures

    • 3
    • Storage Engines - 2022-06-27

      Summary

      When the cyclomatic complexity limit is breached, the a failure looks like:

      [2022/03/29 05:44:08.399] [LOG]: INFO:	Processing: ./
      [2022/03/29 05:44:08.399] [LOG]: INFO:	Applying limit: 'std.code.complexity:cyclomatic' > 95.0 [applied to 'any' region type(s)]
      [2022/03/29 05:44:08.402] ./reconcile/rec_visibility.c:400: warning: Metric 'std.code.complexity:cyclomatic' for region '__wt_rec_upd_select' exceeds the limit.
      [2022/03/29 05:44:08.402] 	Metric name    : std.code.complexity:cyclomatic
      [2022/03/29 05:44:08.402] 	Region name    : __wt_rec_upd_select
      [2022/03/29 05:44:08.402] 	Metric value   : 96
      [2022/03/29 05:44:08.402] 	Modified       : None
      [2022/03/29 05:44:08.402] 	Change trend   : None
      [2022/03/29 05:44:08.402] 	Limit          : 95.0
      [2022/03/29 05:44:08.402] 	Suppressed     : False
      [2022/03/29 05:44:08.402] ./:: info: 1 regions exceeded the limit 'std.code.complexity:cyclomatic' > 95.0 [applied to 'any' region type(s)]
      [2022/03/29 05:44:08.405] [LOG]: WARNING:	Done (0.01 seconds). Exit code: 1
      

      There aren't any good keywords in the output to auto-search for when parsing logs, which makes triage of such failures more manual.

      It would be worthwhile adding more auto-searchable keywords to such failures.

      Specifically the interesting outputs are tagged with info or INFO, when in reality we key a test failure off that, so having an ERROR tag would make auto-extracting the information more possible.

      Motivation

      Make triaging test failures better and more automated.

      • Does this affect any team outside of WT?
        No
      • If the problem does occur, what are the consequences and how severe are they?

      Annoying and wasted engineer time.

      Acceptance Criteria (Definition of Done)

      The Build Baron auto-triage tool will output lines related to cyclomatic testing failures.

            Assignee:
            ruby.chen@mongodb.com Ruby Chen
            Reporter:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: