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

Write Python script to compute test failures rates from Evergreen API

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.8
    • Affects Version/s: None
    • Component/s: Testing Infrastructure
    • None
    • Fully Compatible
    • TIG 2017-05-08, TIG 2017-05-29

      A /projects/{project_id}/test_history API endpoint was added as part of EVG-1378 that returns information about test failures from Evergreen task failures. This endpoint should be used to retrieve per-test execution information of Evergreen tasks that have run in the last 4 weeks. A possible command line interface for this script may look like the following:

      --since=<date_since>        (defaults to 1 week ago)
      --until=<date_until>        (defaults to now)
      --group=[daily|weekly]      (defaults to "weekly")
      --task=<task_display_name>
      --variant=<variant_id>
      --distro=<distro_id>
      test1 [test2 ...]
      

      where the output of the script is the per-day failure rate or the per-week failure rate for each (test name, task name, build variant, distro) combination. In addition to outputting, the Python script should be able to be used as a Python module in order to be able to update etc/test_lifecycle.yml as part of SERVER-28786.

      Additionally, the Python script should attempt to read the Evergreen API credentials from ~/.evergreen.yml if the file is present.

      Note: Since the script needs to compute the ratio of (fail + timeout) / (fail + timeout + pass), a large number of API requests may need to be made to get the entire test execution history of a 4 week period. We'll need to consider a different approach or possible optimizations of only examining tests that have failed at least once before retrieving the entire test execution history.

            Assignee:
            jonathan.abrahams Jonathan Abrahams
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: