Allow notifications to be retried when an error occurs (#1026)

This commit is contained in:
Cheick Keita
2021-06-30 11:05:25 -07:00
committed by GitHub
parent a1502b7d58
commit 1e90ed6092
4 changed files with 52 additions and 19 deletions

View File

@ -127,7 +127,9 @@ def get_queue_tasks() -> Sequence[Tuple[Task, Sequence[str]]]:
return results
def new_files(container: Container, filename: str) -> None:
def new_files(
container: Container, filename: str, fail_task_on_transient_error: bool
) -> None:
notifications = get_notifications(container)
report = get_report_or_regression(
@ -149,7 +151,13 @@ def new_files(container: Container, filename: str) -> None:
continue
if isinstance(notification.config, ADOTemplate):
notify_ado(notification.config, container, filename, report)
notify_ado(
notification.config,
container,
filename,
report,
fail_task_on_transient_error,
)
if isinstance(notification.config, GithubIssueTemplate):
github_issue(notification.config, container, filename, report)