Open Bug 1977172 Opened 1 month ago

weekly intermittents commenter run failed

Categories

(Tree Management :: Treeherder, defect)

defect

Tracking

(Not tracked)

People

(Reporter: aryx, Unassigned)

Details

The weekly intermittent commenter run failed:

Traceback (most recent call last):
  File "/app/./manage.py", line 16, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.10/site-packages/newrelic/hooks/framework_django.py", line 962, in _nr_wrapper_BaseCommand_run_from_argv_
    return BackgroundTaskWrapper(wrapped, application, subcommand, "Django")(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/newrelic/api/background_task.py", line 111, in wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 413, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 459, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.10/site-packages/newrelic/api/function_trace.py", line 157, in literal_wrapper
    return wrapped(*args, **kwargs)
  File "/app/treeherder/intermittents_commenter/management/commands/run_intermittents_commenter.py", line 36, in handle
    process.run()
  File "/app/treeherder/intermittents_commenter/commenter.py", line 74, in run
    all_bug_changes = self.generate_bug_changes(startday, endday, alt_startday, alt_endday)
  File "/app/treeherder/intermittents_commenter/commenter.py", line 91, in generate_bug_changes
    bug_map = self.build_bug_map(bugs, option_collection_map, days)
  File "/app/treeherder/intermittents_commenter/commenter.py", line 467, in build_bug_map
    run_count = self.get_task_labels_and_count(manifest, days, job_name)
  File "/app/treeherder/intermittents_commenter/commenter.py", line 402, in get_task_labels_and_count
    fetch.fetch_summary_groups(days) if self.summary_groups is None else self.summary_groups
  File "/app/treeherder/intermittents_commenter/fetch.py", line 31, in fetch_summary_groups
    return {key: summary_groups[key] for key in days}
  File "/app/treeherder/intermittents_commenter/fetch.py", line 31, in <dictcomp>
    return {key: summary_groups[key] for key in days}
KeyError: '2025-07-13'

This is a regression from https://github.com/mozilla/treeherder/commit/bd6988d4ed53b9a339adf25357c6b1ff5c1826e5 which changed the behavior from returning the test-run-info artifact to a dict with the days as key. The investigation showed the commenter runs on Monday (d), fetches the latest test-run-info artifact generated on Sunday (d-1) which itself only contains data until Saturday (d-2). The old code handled the missing data by skipping it but was still technically incorrect because it was missing the data for Sunday.

You need to log in before you can comment on or make changes to this bug.