From 90d0aab85e558ee52c3e71a75082d387e38fcd87 Mon Sep 17 00:00:00 2001 From: Adam Saleh Date: Mar 01 2021 12:51:39 +0000 Subject: The runner should file issue on exceptions as well as failures. --- diff --git a/monitor_gating/runner.py b/monitor_gating/runner.py index 0724a70..64369f6 100644 --- a/monitor_gating/runner.py +++ b/monitor_gating/runner.py @@ -150,18 +150,24 @@ def schedule(conf): except Exception as err: print(f"Tests failed with: {err}", flush=True) print(sys.exc_info()[0]) - print("-"*60) + print("-" * 60) print(sys.exc_info()) - print("="*60) + print("=" * 60) import traceback traceback.print_exc(file=sys.stdout) - print("-"*60) + print("-" * 60) traceback.print_stack() - notify( topic=f"multi-build.end.error", message={"runid": runid, "exception": str(err)}, ) + report_failure( + report_project, + report_api_token, + report_env, + "multi-package", + monit_utils, + ) delay_when_failing = conf["delay_when_failing"] blocker_tags = conf["blocker_tags"] @@ -198,7 +204,7 @@ def main(): except KeyboardInterrupt: from code import InteractiveConsole - InteractiveConsole(locals={"s": s}).interact( + InteractiveConsole(locals={"s": scheduler}).interact( "ENTERING THE DEBUG CONSOLE:\n s is the scheduler\n ^d to quit", "LEAVING THE DEBUG CONSOLE", )